- @window_title = "Content" - @page_title = "<%= plural_class_name %>" .row-fluid = render :partial => "/gluttonberg/admin/content/main/sidebar" .span9 .row-fluid .page-header %h1 = @page_title .subnav = sub_nav do = nav_link('New', new_admin_<%= singular_name %>_path) <% if importable? %> = nav_link('Import', admin_<%= plural_name %>_import_path) = nav_link('Export', admin_<%= plural_name %>_export_path) <% end %> <% unless draggable? %> - if !@<%= plural_name %>.blank? || !params[:query].blank? - form_tag(admin_<%=plural_name%>_path, :method => :get , :id => "list_search_form") do = text_field_tag :query, params[:query] = submit_tag "Search" , :class => "button" <%end%> - if @<%= plural_name %>.empty? %p.empty No <%= plural_class_name %> - else <% if draggable? %> %table{:id => 'pages_table', :class => "table table-bordered #{(can?(:reorder , <%=class_name%>) ? "#{drag_tree_table_class} " : " " )}", :cellpadding => 0, :cellspacing => 0, :rel => "" , :summary => "<%= plural_name %>" , :rel => drag_tree_url } <%else%> %table{:cellpadding => 0, :cellspacing => 0 , :class => "table table-bordered"} <%end%> %thead %tr <% if draggable? %> %th Name %th Published At %th Created At <%else %> %th= sortable_column("<%= attributes.find{|attr| attr.name == "name"}.blank? ? "title" : "name" %>" , "Name") %th= sortable_column("published_at" , "Published At") %th= sortable_column("created_at" , "Created At") <%end %> %th.controls Controls %tbody - @<%= plural_name %>.each do |<%= singular_name %>| <% if draggable? %> %tr{:id => drag_tree_row_id(<%= singular_name %>), :class => drag_tree_row_class(<%= singular_name %>) + " #{cycle("even", "odd")}"} <%else%> %tr{ :class => "#{cycle("even", "odd")}"} <%end%> %td <% if draggable? %> %span{:class => "#{drag_tree_drag_point_class} page" , :rel => drag_tree_row_id(<%= singular_name %>)} <%end%> = link_to <%= singular_name %>.title_or_name?, edit_admin_<%= singular_name %>_path(<%= singular_name %>) %td - unless <%= singular_name%>.published_at.blank? = <%= singular_name%>.published_at.strftime("%d/%m/%Y at %H:%M") %td = <%= singular_name%>.created_at.strftime("%d/%m/%Y at %H:%M") %td.controls .btn-group %a{ :class => "btn dropdown-toggle" , "data-toggle" => "dropdown" , :href => "#"} Actions %span.caret %ul.dropdown-menu %li= link_to "Show", admin_<%= singular_name %>_path(<%= singular_name %>) , :class => "" %li= link_to "Edit", edit_admin_<%= singular_name %>_path(<%= singular_name %>) , :class => "" %li.divider %li= link_to "Duplicate", duplicate_admin_<%= singular_name %>_path(<%= singular_name %>) , :class => "" - if can? :destroy , <%= class_name %> %li.divider %li= link_to "Delete", delete_admin_<%= singular_name %>_path(<%= singular_name %>) , :class => "" <% unless draggable? %> = will_paginate @<%= plural_name %> <%end%>