Sha256: 29ea07e172852f708d49cf958977a4793834e92f848be11f828fe5f217f1ea8b

Contents?: true

Size: 1.86 KB

Versions: 5

Compression:

Stored size: 1.86 KB

Contents

<%- if @sections.empty? -%>
  <p><em>No sections have been created yet.</em></p>
<%- else -%>
  <p>To reorder the sections below, drag and drop the row using the drag icon on the right hand side of the table.</p>

  <table class="standard">
    <thead>
      <tr>
        <th>Title</th>
        <th>URL</th>
        <th>Content</th>
        <th></th>
        <th><%= image_tag '/images/icons/move_white.png' -%></th>
      </tr>
    </thead>
    <tbody id="content_list">
    <%- @sections.each do |section| -%>
      <tr class="<%= cycle('odd', 'even') -%>" id="section_<%= section.id -%>">
        <td><%= link_to section.headline, admin_publication_managed_content_section_path(@publication, @managed_content, section) -%></td>
        <td><%= section.humanize_path -%></td>
        <td><%= strip_tags(section.content.to_s).truncate(75) -%></td>
        <td class="crud_links">
          <%= link_to image_tag('/images/icons/view.png'), admin_publication_managed_content_section_path(@publication, @managed_content, section) -%>
          <%= link_to image_tag('/images/icons/edit.png'), edit_admin_publication_managed_content_section_path(@publication, @managed_content, section) -%>
          <%= link_to image_tag('/images/icons/delete.png'), admin_publication_managed_content_section_path(@publication, @managed_content, section), :method => :delete, :confirm => 'Are you sure? This action cannot be undone.' -%>
        </td>
        <td style="width: 19px; cursor: move; " id="content_<%= section.id -%>">
          <img src="/images/icons/drag.png" alt="Move" width="19" height="19" class="move_icon" />
        </td>
      </tr>
    <%- end -%>
    </tbody>
  </table>

  <%= sortable_element 'content_list', :update => nil, :url => admin_publication_managed_content_reorder_sections_path(@publication, @managed_content), :method => :put, :tag => 'tr' unless Rails.env.test? -%>

<%- end -%>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
editorial_logic-1.3.3 app/views/admin/sections/_index.html.erb
editorial_logic-1.3.2 app/views/admin/sections/_index.html.erb
editorial_logic-1.3.1 app/views/admin/sections/_index.html.erb
editorial_logic-1.3.0 app/views/admin/sections/_index.html.erb
editorial_logic-1.1.6 app/views/admin/sections/_index.html.erb