Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions app/views/shared/_user_mod_sidebar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,52 +17,52 @@
<div class="widget--body">
<div class="menu">
<%= link_to mod_user_path(user),
class: "menu--item #{current_page?(mod_user_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(mod_user_path(user))}" do %>
<i class="fas fa-tachometer-alt fa-fw"></i>
Dashboard
<% end %>
<div class="menu--heading">Activity</div>
<%= link_to full_user_log_path(user),
class: "menu--item #{current_page?(full_user_log_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(full_user_log_path(user))}" do %>
<i class="fas fa-history fa-fw"></i>
Full Activity Log
<% end %>
<%= link_to user_annotations_path(user),
class: "menu--item #{current_page?(user_annotations_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(user_annotations_path(user))}" do %>
<i class="fas fa-sticky-note fa-fw"></i>
Annotations
<% end %>
<%= link_to mod_vote_summary_path(user),
class: "menu--item #{current_page?(mod_vote_summary_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(mod_vote_summary_path(user))}" do %>
<i class="fas fa-poll fa-fw"></i>
Voting Behavior
<% end %>

<div class="menu--heading">Privileges</div>
<%= link_to user_privileges_path(user),
class: "menu--item #{current_page?(user_privileges_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(user_privileges_path(user))}" do %>
<i class="fas fa-user-shield fa-fw"></i>
Manage Privileges
<% end %>

<div class="menu--heading">Warnings and Suspensions</div>
<%= link_to mod_warning_log_path(user),
class: "menu--item #{current_page?(mod_warning_log_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(mod_warning_log_path(user))}" do %>
<i class="fas fa-user-lock fa-fw"></i>
List Previous
<% if user.community_user.suspended? %>
(includes lifting the suspension)
<% end %>
<% end %>
<%= link_to new_mod_warning_path(user),
class: "menu--item #{current_page?(new_mod_warning_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(new_mod_warning_path(user))}" do %>
<i class="fas fa-exclamation-triangle fa-fw"></i>
Warn or Suspend
<% end %>

<div class="menu--heading">Account</div>
<%= link_to mod_pii_correlation_path(user),
class: "menu--item #{current_page?(mod_pii_correlation_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(mod_pii_correlation_path(user))}" do %>
<i class="fas fa-users fa-fw"></i>
Compare PII
<% end %>
Expand All @@ -88,7 +88,7 @@
<% if current_user.developer %>
<div class="menu--heading">Developer Tools</div>
<%= link_to start_impersonating_path(user),
class: "menu--item #{current_page?(start_impersonating_path(user)) ? 'is-active' : ''}" do %>
class: "menu--item #{'is-active' if current_page?(start_impersonating_path(user))}" do %>
<i class="fas fa-user-secret fa-fw"></i>
Impersonate
<% end %>
Expand Down
30 changes: 18 additions & 12 deletions app/views/users/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
<div class="button-list h-p-2">
<% if user_signed_in? %>
<%= link_to new_subscription_path(type: 'user', qualifier: @user.id, return_to: request.path),
class: "button is-outlined is-small" do %>
class: 'button is-outlined is-small' do %>
<i class="fas fa-envelope"></i> Subscribe to user
<% end %>
<% end %>
Expand All @@ -78,7 +78,7 @@
<h2 class="user-profile-heading">Posts</h2>
<% if @posts.size > 0 %>
<%= link_to user_posts_path(@user),
class: "button is-muted",
class: 'button is-muted',
'aria-label': "View all posts by #{rtl_safe_username(@user)}" do %>
See all <%= @total_post_count %> &raquo;
<% end %>
Expand All @@ -93,7 +93,7 @@
<% end %>
</div>
<%= link_to user_posts_path(@user),
class: "button is-muted",
class: 'button is-muted',
'aria-label': "View all posts by #{rtl_safe_username(@user)}" do %>
See all <%= @total_post_count %> &raquo;
<% end %>
Expand Down Expand Up @@ -135,7 +135,8 @@
<td colspan="2">
<i class="fas fa-fw fa-reply-all"></i>
<%= link_to search_path(search: "user:#{@user.id} post_type:2"),
'aria-label': is_me ? 'View your answers' : "View answers from #{rtl_safe_username(@user)}" do %>
'aria-label': is_me ? t('users.labels.view_answers_self')
: "View answers from #{rtl_safe_username(@user)}" do %>
Answers
<% end %>
</td>
Expand All @@ -144,8 +145,8 @@
<tr>
<td colspan="2"><i class="fas fa-fw fa-star-half-alt"></i>
<%= link_to is_me ? my_vote_summary_path : vote_summary_path,
'aria-label':
is_me ? 'View your received votes' : "View received votes for #{rtl_safe_username(@user)}" do %>
'aria-label': is_me ? t('users.labels.view_votes_self')
: "View received votes for #{rtl_safe_username(@user)}" do %>
Received votes
<% end %>
<br>
Expand Down Expand Up @@ -180,8 +181,9 @@
<% end %>
<div class="widget--footer">
<%= link_to is_me ? abilities_path : abilities_path(for: @user.id),
class: 'has-font-weight-bold',
'aria-label': is_me ? 'View your abilities' : "View abilities of #{rtl_safe_username(@user)}" do %>
class: 'has-font-weight-bold',
'aria-label': is_me ? t('users.labels.view_abilities_self')
: "View abilities of #{rtl_safe_username(@user)}" do %>
Abilities &raquo;
<% end %>
</div>
Expand All @@ -199,7 +201,8 @@
<tr>
<td colspan="2">
<%= link_to user_posts_path,
'aria-label': is_me ? 'View your posts' : "View posts for #{rtl_safe_username(@user)}" do %>
'aria-label': is_me ? t('users.labels.view_posts_self')
: "View posts for #{rtl_safe_username(@user)}" do %>
Total
<% end %>
</td>
Expand All @@ -210,7 +213,8 @@
<tr>
<td colspan="2">
<%= link_to search_path(search: "user:#{@user.id} post_type:1"),
'aria-label': is_me ? 'View your questions' : "View questions from #{rtl_safe_username(@user)}" do %>
'aria-label': is_me ? t('users.labels.view_questions_self')
: "View questions from #{rtl_safe_username(@user)}" do %>
Questions
<% end %>
</td>
Expand All @@ -221,7 +225,8 @@
<tr>
<td colspan="2">
<%= link_to search_path(search: "user:#{@user.id} post_type:2"),
'aria-label': is_me ? 'View your answers' : "View answers from #{rtl_safe_username(@user)}" do %>
'aria-label': is_me ? t('users.labels.view_answers_self')
: "View answers from #{rtl_safe_username(@user)}" do %>
Answers
<% end %>
</td>
Expand All @@ -232,7 +237,8 @@
<tr>
<td colspan="2">
<%= link_to search_path(search: "user:#{@user.id} post_type:5"),
'aria-label': is_me ? 'View your articles' : "View articles from #{rtl_safe_username(@user)}" do %>
'aria-label': is_me ? t('users.labels.view_articles_self')
: "View articles from #{rtl_safe_username(@user)}" do %>
Articles
<% end %>
</td>
Expand Down
7 changes: 7 additions & 0 deletions config/locales/strings/en.users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ en:
Accounts using 2FA cannot be self-deleted. Disable 2FA first.
self_delete_wrong_username: >
The username you entered was incorrect.
labels:
view_abilities_self: View your abilities
view_answers_self: View your answers
view_articles_self: View your articles
view_posts_self: View your posts
view_questions_self: View your questions
view_votes_self: View your received votes
Loading