Sha256: 09d904dda322d9486b344a3cd1884ed1bda26067d934a12b60a7558436057008
Contents?: true
Size: 1.74 KB
Versions: 1
Compression:
Stored size: 1.74 KB
Contents
- content_for(:page_header) do %h1= index_header %p= link_to "Добавить #{taccusative('<%= resource_name %>')}", [:new, :admin, :<%= resource_name %>] - unless @<%= plural_resource_name %>.empty? %table.list<%= ".sortable" 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 asset_path("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 <%- if column_names.include?("position") -%> = sortable sort_admin_<%= plural_resource_name %>_path <%- end -%>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
redde-0.1.0 | lib/generators/redde/scaffold/templates/index.html.haml |