Advertisement
Lukkor

search.html.haml

Feb 12th, 2016
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 1.10 KB | None | 0 0
  1. .searchbar_min
  2.   =render 'layouts/searchbar'
  3. %table.table.table-striped
  4.   %thead
  5.     %tr
  6.       %th Wyrażenie
  7.       %th Znaczenie
  8.       %th
  9.       %th
  10.       %th
  11.  
  12.   %tbody
  13.     = will_paginate @pg_search_documents
  14.     - @pg_search_documents.each do |pg_search_document|
  15.       %tr
  16.         =pg_search_document.inspect
  17.         %td= pg_search_document.searchable.expression
  18.         %td= HTML_Truncator.truncate(pg_search_document.searchable.meaning, 40).html_safe
  19.         %td
  20.           = link_to vocabulary_path(pg_search_document), class: "btn btn-link" do
  21.             %i.glyphicon.glyphicon-eye-open
  22.             Pokaż
  23.         -if current_user && current_user.admin?
  24.           %td
  25.             = link_to edit_vocabulary_path(pg_search_document), class: "btn btn-link" do
  26.               %i.glyphicon.glyphicon-edit
  27.               Edytuj
  28.           %td
  29.             = link_to vocabulary_path(pg_search_document), :method => :delete, :data => { :confirm => 'Jesteś pewny/a?' }, class: "btn btn-link" do
  30.               %i.glyphicon.glyphicon-trash
  31.               Usuń
  32. %br
  33.   = will_paginate @pg_search_documents
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement