Home

Pages Classes Methods

    Pages

    • admin.js
    • admin.css
    • edit.html.haml
    • index.html.haml
    • edit.html.haml
    • index.html.haml
    • redde_tasks.rake
    • 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

    Validate

    Generated by RDoc 6.3.2.

    Based on Darkfish by Michael Granger.