Add the index to moderate the notifications
Add the index for moderating the notifications. The tranlations needed have also been added, along with the JS to make it disappear at that moment.
This commit is contained in:
3
app/views/moderation/proposal_notifications/hide.js.erb
Normal file
3
app/views/moderation/proposal_notifications/hide.js.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
var proposal_notification_id = '<%= dom_id(@proposal_notification) %>';
|
||||
App.ModeratorProposalNotifications.add_class_faded(proposal_notification_id);
|
||||
App.ModeratorProposalNotifications.hide_moderator_actions(proposal_notification_id);
|
||||
@@ -0,0 +1,67 @@
|
||||
<h2><%= t("moderation.proposal_notifications.index.title") %></h2>
|
||||
|
||||
<%= render 'shared/filter_subnav', i18n_namespace: "moderation.proposal_notifications.index" %>
|
||||
|
||||
<h3 class="inline-block"><%= page_entries_info @proposal_notifications %></h3>
|
||||
<div class="float-right">
|
||||
<%= t("moderation.proposal_notifications.index.order") %>
|
||||
<%= render 'shared/order_selector', i18n_namespace: "moderation.proposal_notifications.index" %>
|
||||
</div>
|
||||
|
||||
<%= form_tag moderate_moderation_proposal_notifications_path(request.query_parameters), method: :put do %>
|
||||
<p class="js-check">
|
||||
<%= t('shared.check') %>:
|
||||
<%= link_to t('shared.check_all'), '#', data: {check_all: "proposal_notification_ids[]"} %>
|
||||
|
|
||||
<%= link_to t('shared.check_none'), '#', data: {check_none: "proposal_notification_ids[]"} %>
|
||||
</p>
|
||||
|
||||
<table class="clear">
|
||||
<tr>
|
||||
<th>
|
||||
<%= t("moderation.proposal_notifications.index.headers.proposal_notification") %>
|
||||
</th>
|
||||
<th>
|
||||
<%= t("moderation.proposal_notifications.index.headers.moderate") %>
|
||||
</th>
|
||||
</tr>
|
||||
<% @proposal_notifications.each do |proposal_notification| %>
|
||||
<tr id="proposal_notification_<%= proposal_notification.id %>">
|
||||
<td>
|
||||
<%= link_to proposal_notification.title, proposal_notification, target: "_blank" %>
|
||||
<br>
|
||||
<span class="date"><%= l proposal_notification.updated_at.to_date %></span>
|
||||
<br>
|
||||
<div class="moderation-description">
|
||||
<%= proposal_notification.body %>
|
||||
</div>
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<%= check_box_tag "proposal_notification_ids[]", proposal_notification.id, nil, id: "#{dom_id(proposal_notification)}_check" %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= submit_tag t('moderation.proposal_notifications.index.block_authors'),
|
||||
name: "block_authors",
|
||||
class: "button hollow alert",
|
||||
data: {confirm: t('moderation.proposal_notifications.index.confirm')}
|
||||
%>
|
||||
|
||||
<div class="float-right">
|
||||
<%= submit_tag t('moderation.proposal_notifications.index.hide_proposal_notifications'),
|
||||
name: "hide_proposal_notifications",
|
||||
class: "button hollow alert",
|
||||
data: {confirm: t('moderation.proposal_notifications.index.confirm')}
|
||||
%>
|
||||
<%= submit_tag t('moderation.proposal_notifications.index.ignore_flags'),
|
||||
name: "ignore_flags",
|
||||
class: "button hollow",
|
||||
data: {confirm: t('moderation.proposal_notifications.index.confirm')}
|
||||
%>
|
||||
</div>
|
||||
|
||||
<%= paginate @proposal_notifications %>
|
||||
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user