Sha256: e84a2990532abe0a85bf5dc2a97aaf41b6c391be8568af11a9d6d0ce2e4a3ccc
Contents?: true
Size: 1.65 KB
Versions: 45
Compression:
Stored size: 1.65 KB
Contents
- content_for(:page_header) do %h1= tplural <%= model_name.demodulize %> %p= link_to "Добавить #{taccusative('<%= resource_name %>')}", [:new, :admin, :<%= resource_name %>] - unless @<%= plural_resource_name %>.empty? %table.list<%= ".sortable{ 'data-sortable' => true }" if column_names.include?('position') %> %colgroup <%- columns.each do |column| -%> %col<%= '.w1' if ['position', 'visible'].include? column.name %> <%- end -%> %col.w1 %thead %tr <%- columns.each do |column| -%> %th<%- unless ['position', 'visible'].include? column.name %>= <%= model_name.demodulize %>.human_attribute_name('<%= column.name %>')<% end %> <%- end -%> %th - @<%= plural_resource_name %>.each do |<%= resource_name %>| <%- if column_names.include?('position') -%> %tr{ id: "pos_#{<%= resource_name %>.id}" } <%- else -%> %tr <%- end -%> <%- columns.each do |column| -%> <%- if column.name == 'position' -%> %td.handle= image_tag 'admin/move_handler.png' <%- elsif column.name == 'visible' -%> %td.show= link_to '', admin_<%= singular_controller_routing_path %>_path(<%= resource_name %>, <%= resource_name %>: { visible: !<%= resource_name %>.visible} ), class: <%= resource_name %>.visible ? nil : 'not-show', data: { method: 'put' } <%- else -%> %td= link_to <%= resource_name %>.<%= column.name %>, [:edit, :admin, <%= resource_name %>] <%- end -%> <%- end -%> %td= link_to 'Удалить', [:admin, <%= resource_name %>], method: :delete, data: { confirm: 'Точно Удалить?' }, class: :del
Version data entries
45 entries across 45 versions & 1 rubygems