Skip to content

Commit

Permalink
Unban label for banned user (publiclab#9230)
Browse files Browse the repository at this point in the history
* Unban label for banned user

* Changed label format

Co-authored-by: imajit <ajit.171it233@nitk.edu.in>
  • Loading branch information
2 people authored and reginaalyssa committed Oct 16, 2021
1 parent 77575fe commit d9aeffb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/views/users/list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,13 @@
<li><a style="color: #808080; cursor: no-drop;">Joined <%= distance_of_time_in_words(user.created_at, Time.current, { include_seconds: false, scope: 'datetime.time_ago_in_words' }) %></a></li>
<li><a href='/notes/author/<%= user.name %>'><%= user.note_count %> Research Notes</a></li>
<li><a style="color: #808080; cursor: no-drop;"><%= user.nodes.count %> Wiki Edits</a></li>
<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 %>
<li class="btn-success"><a style="color: white;" href="/profile/<%= user.username %>"><i class="fa fa-check-circle fa-white"></i> Unban on profile</a></li>
<i class='fa fa-ban' style="color:#a00;"></i> <%= translation('users.list.banned') %>
<% elsif user.status == 1 && user != current_user %>
<li><a data-confirm="<%= translation('users.list.are_you_sure') %>" href="/ban/<%= user.uid %>" ><i class='fa fa-ban'></i> <%= translation('users.list.ban') %></a></li>
<li><a href="/profile/<%= user.username %>">See Full Profile</a></li>
<li class="btn-danger"><a style="color: white;" data-confirm="<%= translation('users.list.are_you_sure') %>" href="/ban/<%= user.uid %>" ><i class="fa fa-ban fa-white"></i> <%= translation('users.list.ban') %></a></li>
<% end %>
<% end %>
</ul>
Expand Down

0 comments on commit d9aeffb

Please sign in to comment.