Rename users to hidden users in admin
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class Admin::UsersController < Admin::BaseController
|
||||
class Admin::HiddenUsersController < Admin::BaseController
|
||||
has_filters %w{without_confirmed_hide all with_confirmed_hide}, only: :index
|
||||
|
||||
before_action :load_user, only: [:confirm_hide, :restore]
|
||||
@@ -30,4 +30,4 @@ class Admin::UsersController < Admin::BaseController
|
||||
@user = User.with_hidden.find(params[:id])
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -17,7 +17,7 @@ module AdminHelper
|
||||
end
|
||||
|
||||
def menu_moderated_content?
|
||||
["proposals", "debates", "comments", "users"].include? controller_name
|
||||
["proposals", "debates", "comments", "hidden_users"].include? controller_name
|
||||
end
|
||||
|
||||
def menu_budget?
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
<%= link_to t("admin.menu.hidden_comments"), admin_comments_path %>
|
||||
</li>
|
||||
|
||||
<li <%= "class=active" if controller_name == "users" %>>
|
||||
<%= link_to t("admin.menu.hidden_users"), admin_users_path %>
|
||||
<li <%= "class=active" if controller_name == "hidden_users" %>>
|
||||
<%= link_to t("admin.menu.hidden_users"), admin_hidden_users_path %>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="small-12 medium-4 column">
|
||||
<p>
|
||||
<strong><%= t("admin.budget_investments.show.by") %>:</strong>
|
||||
<%= link_to @investment.author.name, admin_user_path(@investment.author) %>
|
||||
<%= link_to @investment.author.name, admin_hidden_user_path(@investment.author) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<h2><%= t("admin.users.index.title") %></h2>
|
||||
<h2><%= t("admin.hidden_users.index.title") %></h2>
|
||||
|
||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.users.index" %>
|
||||
<%= render 'shared/filter_subnav', i18n_namespace: "admin.hidden_users.index" %>
|
||||
|
||||
<h3><%= page_entries_info @users %></h3>
|
||||
|
||||
@@ -8,18 +8,18 @@
|
||||
<% @users.each do |user| %>
|
||||
<tr id="<%= dom_id(user) %>">
|
||||
<td>
|
||||
<p><%= link_to user.name, admin_user_path(user) %></p>
|
||||
<p><%= link_to user.name, admin_hidden_user_path(user) %></p>
|
||||
</td>
|
||||
|
||||
<td class="text-right">
|
||||
<%= link_to t("admin.actions.restore"),
|
||||
restore_admin_user_path(user, request.query_parameters),
|
||||
restore_admin_hidden_user_path(user, request.query_parameters),
|
||||
method: :put,
|
||||
data: { confirm: t("admin.actions.confirm") },
|
||||
class: "button hollow on-hover" %>
|
||||
<% unless user.confirmed_hide? %>
|
||||
<%= link_to t("admin.actions.confirm_hide"),
|
||||
confirm_hide_admin_user_path(user, request.query_parameters),
|
||||
confirm_hide_admin_hidden_user_path(user, request.query_parameters),
|
||||
method: :put,
|
||||
class: "button hollow warning on-hover" %>
|
||||
<% end %>
|
||||
@@ -1,11 +1,11 @@
|
||||
<%= render 'shared/back_link' %>
|
||||
|
||||
<h2><%= t("admin.users.show.title", user: @user.name) %></h2>
|
||||
<h2><%= t("admin.hidden_users.show.title", user: @user.name) %></h2>
|
||||
|
||||
<p>
|
||||
<strong><%= t("admin.users.show.email") %></strong> <%= @user.email %> |
|
||||
<strong><%= t("admin.users.show.registered_at") %></strong> <%= @user.confirmed_at %> |
|
||||
<strong><%= t("admin.users.show.hidden_at") %></strong> <%= @user.hidden_at %>
|
||||
<strong><%= t("admin.hidden_users.show.email") %></strong> <%= @user.email %> |
|
||||
<strong><%= t("admin.hidden_users.show.registered_at") %></strong> <%= @user.confirmed_at %> |
|
||||
<strong><%= t("admin.hidden_users.show.hidden_at") %></strong> <%= @user.hidden_at %>
|
||||
</p>
|
||||
|
||||
<% if @debates.present? %>
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="small-12 medium-4 column">
|
||||
<p>
|
||||
<strong><%= t("admin.spending_proposals.show.by") %>:</strong>
|
||||
<%= link_to @spending_proposal.author.name, admin_user_path(@spending_proposal.author) %>
|
||||
<%= link_to @spending_proposal.author.name, admin_hidden_user_path(@spending_proposal.author) %>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
<% @users.each do |user| %>
|
||||
<tr id="<%= dom_id(user) %>">
|
||||
<td>
|
||||
<%= link_to user.name, admin_user_path(user) %>
|
||||
<%= link_to user.name, admin_hidden_user_path(user) %>
|
||||
</td>
|
||||
<td>
|
||||
<%= render "pending_step", user: user %>
|
||||
@@ -17,4 +17,4 @@
|
||||
<% end %>
|
||||
</table>
|
||||
|
||||
<%= paginate @users %>
|
||||
<%= paginate @users %>
|
||||
|
||||
Reference in New Issue
Block a user