<h2><%= t("admin.hidden_proposals.index.title") %></h2>
<%= render Admin::SearchComponent.new(label: t("admin.shared.search.label.proposals")) %>
<p><%= t("admin.shared.moderated_content") %></p>

<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_proposals.index" %>

<% if @proposals.any? %>
  <h3><%= page_entries_info @proposals %></h3>

  <table>
    <thead>
      <th scope="col"><%= t("admin.shared.title") %></th>
      <th scope="col" class="small-6"><%= t("admin.shared.description") %></th>
      <th scope="col" class="small-4"><%= t("admin.shared.actions") %></th>
    </thead>
    <tbody>
      <% @proposals.each do |proposal| %>
        <tr id="<%= dom_id(proposal) %>">
          <td class="align-top">
            <strong><%= proposal.title %></strong>
          </td>
          <td>
            <div class="moderation-description">
              <p><small><%= proposal.summary %></small></p>
              <%= wysiwyg(proposal.description) %>
              <% if proposal.video_url.present? %>
                <p><%= sanitize_and_auto_link proposal.video_url %></p>
              <% end %>
            </div>
          </td>
          <td class="align-top">
            <%= render Admin::HiddenTableActionsComponent.new(proposal) %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>

  <%= paginate @proposals %>
<% else %>
  <div class="callout primary margin">
    <%= t("admin.hidden_proposals.index.no_hidden_proposals") %>
  </div>
<% end %>
