Sha256: 7847976173e30e1ca000bbe48b4465499149b81cf57a31b3a8e2d9eb21fe1b9f

Contents?: true

Size: 1.84 KB

Versions: 6

Compression:

Stored size: 1.84 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' -%>

<%- end -%>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
editorial_logic-1.1.5 app/views/admin/sections/_index.html.erb
editorial_logic-1.1.4 app/views/admin/sections/_index.html.erb
editorial_logic-1.1.3 app/views/admin/sections/_index.html.erb
editorial_logic-1.1.2 app/views/admin/sections/_index.html.erb
editorial_logic-1.1.1 app/views/admin/sections/_index.html.erb
editorial_logic-1.1.0 app/views/admin/sections/_index.html.erb