Sha256: f6cce4fdf7aa7705e2e519f2fde6cc11f765014c541c87f02646bb5f65a1522e

Contents?: true

Size: 1.98 KB

Versions: 6

Compression:

Stored size: 1.98 KB

Contents

<%- if @managed_content.empty? -%>

  <p><em>No FAQs have been added yet.</em></p>

<%- else -%>

  <p>To reorder the questions and answers, drag and drop the rows below using the drag icon on the right hand side of the table.</p>

  <table class="standard">
    <thead>
      <tr>
        <th><%= @publication.headline_label -%></th>
        <th><%= @publication.content_label -%></th>
        <th>Status</th>
        <th>Publication Date</th>
        <th>Revision Date</th>
        <th> </th>
        <th><%= image_tag '/images/icons/move_white.png' -%></th>
      </tr>
    </thead>
    <tbody id="content_list">
      <%- @managed_content.each do |managed_content| -%>
        <tr class="<%= cycle('odd', 'even') -%>" id="content_<%= managed_content.id -%>">
          <td><%= link_to managed_content.headline, admin_publication_managed_content_path(@publication, managed_content) -%></td>
          <td><%= strip_tags(managed_content.content).truncate(100).html_safe -%></td>
          <td><%= managed_content.state.capitalize -%></td>
          <td><%= managed_content.publication_date ? managed_content.publication_date.to_s(:concise) : '-' -%></td>
          <td><%= managed_content.revision_date ? managed_content.revision_date.to_s(:concise) : '-' -%></td>
          <td class="crud_links"><%= crud_links_for_actions_and_paths(:destroy => admin_publication_managed_content_path(@publication, managed_content), :edit => edit_admin_publication_managed_content_path(@publication, managed_content), :show => admin_publication_managed_content_path(@publication, managed_content)) -%></td>
          <td style="width: 19px; cursor: move; " id="content_<%= managed_content.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_reorder_managed_contents_path(@publication), :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/managed_contents/_faq_index.html.erb
editorial_logic-1.1.4 app/views/admin/managed_contents/_faq_index.html.erb
editorial_logic-1.1.3 app/views/admin/managed_contents/_faq_index.html.erb
editorial_logic-1.1.2 app/views/admin/managed_contents/_faq_index.html.erb
editorial_logic-1.1.1 app/views/admin/managed_contents/_faq_index.html.erb
editorial_logic-1.1.0 app/views/admin/managed_contents/_faq_index.html.erb