-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
index.html.erb
53 lines (49 loc) · 1.82 KB
/
index.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<h2><%= t("admin.hidden_proposals.index.title") %></h2>
<p><%= t("admin.shared.moderated_content") %></p>
<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_proposals.index" %>
<% if @proposals.any? %>
<h3 class="margin"><%= 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>
<%= proposal.description %>
<% if proposal.video_url.present? %>
<p><%= text_with_links proposal.video_url %></p>
<% end %>
</div>
</td>
<td class="align-top">
<%= link_to t("admin.actions.restore"),
restore_admin_hidden_proposal_path(proposal, request.query_parameters),
method: :put,
data: { confirm: t("admin.actions.confirm") },
class: "button hollow warning" %>
<% unless proposal.confirmed_hide? %>
<%= link_to t("admin.actions.confirm_hide"),
confirm_hide_admin_hidden_proposal_path(proposal, request.query_parameters),
method: :put,
class: "button" %>
<% end %>
</td>
</tr>
<% end %>
</tbody>
</table>
<%= paginate @proposals %>
<% else %>
<div class="callout primary margin">
<%= t("admin.hidden_proposals.index.no_hidden_proposals") %>
</div>
<% end %>