Merge pull request #3376 from LextrendIT/3350_rename_debates_comments_admin
Refactor admin/debates and admin/comments to hidden
This commit is contained in:
@@ -141,8 +141,8 @@
|
||||
<% end %>
|
||||
|
||||
<% if feature?(:debates) %>
|
||||
<li <%= "class=is-active" if controller_name == "debates" %>>
|
||||
<%= link_to t("admin.menu.hidden_debates"), admin_debates_path %>
|
||||
<li <%= "class=is-active" if controller_name == "hidden_debates" %>>
|
||||
<%= link_to t("admin.menu.hidden_debates"), admin_hidden_debates_path %>
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
@@ -152,8 +152,8 @@
|
||||
</li>
|
||||
<% end %>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "comments" %>>
|
||||
<%= link_to t("admin.menu.hidden_comments"), admin_comments_path %>
|
||||
<li <%= "class=is-active" if controller_name == "hidden_comments" %>>
|
||||
<%= link_to t("admin.menu.hidden_comments"), admin_hidden_comments_path %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=is-active" if controller_name == "proposal_notifications" %>>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
admin_budget_budget_investments_path(csv_params),
|
||||
class: "float-right small clear" %>
|
||||
|
||||
|
||||
<% if params[:advanced_filters].include?("winners") %>
|
||||
<% if display_calculate_winners_button?(@budget) %>
|
||||
<%= link_to calculate_winner_button_text(@budget),
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
<h2><%= t("admin.comments.index.title") %></h2>
|
||||
<h2><%= t("admin.hidden_comments.index.title") %></h2>
|
||||
<p><%= t("admin.shared.moderated_content") %></p>
|
||||
|
||||
<%= render "shared/filter_subnav", i18n_namespace: "admin.comments.index" %>
|
||||
|
||||
<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_comments.index" %>
|
||||
|
||||
<% if @comments.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @comments %></h3>
|
||||
@@ -17,20 +18,20 @@
|
||||
<td>
|
||||
<%= text_with_links comment.body %><br>
|
||||
<% if comment.commentable.hidden? %>
|
||||
(<%= t("admin.comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
|
||||
(<%= t("admin.hidden_comments.index.hidden_#{comment.commentable_type.downcase}") %>: <%= comment.commentable.title %>)
|
||||
<% else %>
|
||||
<%= link_to comment.commentable.title, commentable_path(comment) %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_comment_path(comment, request.query_parameters),
|
||||
restore_admin_hidden_comment_path(comment, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow warning" %>
|
||||
<% unless comment.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_comment_path(comment, request.query_parameters),
|
||||
confirm_hide_admin_hidden_comment_path(comment, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button" %>
|
||||
<% end %>
|
||||
@@ -43,6 +44,6 @@
|
||||
<%= paginate @comments %>
|
||||
<% else %>
|
||||
<div class="callout primary margin">
|
||||
<%= t("admin.comments.index.no_hidden_comments") %>
|
||||
<%= t("admin.hidden_comments.index.no_hidden_comments") %>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -1,7 +1,8 @@
|
||||
<h2><%= t("admin.debates.index.title") %></h2>
|
||||
<h2><%= t("admin.hidden_debates.index.title") %></h2>
|
||||
<p><%= t("admin.shared.moderated_content") %></p>
|
||||
|
||||
<%= render "shared/filter_subnav", i18n_namespace: "admin.debates.index" %>
|
||||
|
||||
<%= render "shared/filter_subnav", i18n_namespace: "admin.hidden_debates.index" %>
|
||||
|
||||
<% if @debates.any? %>
|
||||
<h3 class="margin"><%= page_entries_info @debates %></h3>
|
||||
@@ -25,13 +26,13 @@
|
||||
</td>
|
||||
<td class="align-top">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_debate_path(debate, request.query_parameters),
|
||||
restore_admin_hidden_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow warning" %>
|
||||
<% unless debate.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_debate_path(debate, request.query_parameters),
|
||||
confirm_hide_admin_hidden_debate_path(debate, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button" %>
|
||||
<% end %>
|
||||
@@ -44,6 +45,6 @@
|
||||
<%= paginate @debates %>
|
||||
<% else %>
|
||||
<div class="callout primary margin">
|
||||
<%= t("admin.debates.index.no_hidden_debates") %>
|
||||
<%= t("admin.hidden_debates.index.no_hidden_debates") %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user