Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unban functionality in dropdown #7510

Closed
wants to merge 12 commits into from
6 changes: 3 additions & 3 deletions app/views/users/list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@
<li><a href="/profile/<%= user.username %>">See Full Profile</a></li>
<% if current_user && (current_user.role == "admin" || current_user.role == "moderator") %>
<% if user.status == 0 %>
<i class='fa fa-ban' style="color:#a00;"></i> <%= t('users.list.banned') %>
<% elsif user.status == 1 && user != current_user %>
<li><a data-confirm="<%= t('users.list.are_you_sure') %>" href="/ban/<%= user.uid %>" ><i class='fa fa-ban'></i> <%= t('users.list.ban') %></a></li>
<li><a data-confirm="<%= t('users.list.are_you_sure_to_unban') %>" href="/unban/<%= user.uid %>" ><i class='fa fa-ban' style="color:#a00;"></i> <%= t('users.list.unban') %></a></li>
<% elsif user.status == 1 && user != current_user %>
<li><a data-confirm="<%= t('users.list.are_you_sure') %>" href="/ban/<%= user.uid %>" ><i class='fa fa-ban'></i> <%= t('users.list.ban') %></a></li>
<% end %>
<% end %>
</ul>
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ en:
notes_and_edits: "research notes and wiki edits"
banned: "Banned"
are_you_sure: "Are you sure? The user will no longer be able to log in or publish."
are_you_sure_to_unban: "Are you sure? The user will be eligible to log in or publish."
ban: "Ban"
unban: "Unban"
_photo:
profile_photo: "Profile photo"
drag_and_drop_image: "Drag and drop to add an image, or"
Expand Down