Files
danbooru/app/views/users/_secondary_links.html.erb
BrokenEagle 4cef0e45c2 Create the ability to send reports to moderators
- Limited to Builders+
-- Moderator+ can also use as they may be too busy ATM
- Only on users, comments, and forum posts
- Multiple reports can be generated per instance
- Primarily posts to a moderator-only topic for viewability
- Secondarily has a table for searchability
-- Viewable only by moderators
2020-01-18 06:40:20 +00:00

43 lines
1.7 KiB
Plaintext

<% content_for(:secondary_links) do %>
<%= quick_search_form_for(:name_matches, users_path, "users", autocomplete: "user") %>
<%= subnav_link_to "Listing", users_path %>
<%= subnav_link_to "Search", search_users_path %>
<% if CurrentUser.user.is_anonymous? %>
<%= subnav_link_to "Sign up", new_user_path %>
<% end %>
<% if @user && !@user.new_record? && !CurrentUser.user.is_anonymous? %>
<li>|</li>
<% if @user.id == CurrentUser.user.id %>
<%= subnav_link_to "Profile", profile_path %>
<%= subnav_link_to "Settings", settings_path %>
<%= subnav_link_to "Messages #{CurrentUser.user.dmail_count}", dmails_current_folder_path %>
<% if !@user.is_platinum? %>
<%= subnav_link_to "Upgrade", new_user_upgrade_path %>
<% end %>
<% else %>
<%= subnav_link_to "Send message", new_dmail_path(:dmail => {:to_id => @user.id}) %>
<% if !@user.is_platinum? %>
<%= subnav_link_to "Gift upgrade", new_user_upgrade_path(:user_id => @user.id) %>
<% end %>
<% if @user.reportable_by?(CurrentUser.user) %>
<%= subnav_link_to "Report user", new_moderation_report_path(moderation_report: { model_type: "User", model_id: @user.id }), remote: true %>
<% end %>
<% end %>
<% if CurrentUser.user.is_moderator? %>
<%= subnav_link_to "Promote", edit_admin_user_path(@user) %>
<% if @user.is_banned? %>
<%= subnav_link_to "Unban", ban_path(@user.recent_ban) %>
<% else %>
<%= subnav_link_to "Ban", new_ban_path(:ban => {:user_id => @user.id}) %>
<% end %>
<% end %>
<li>|</li>
<%= subnav_link_to "Log out", logout_path %>
<% end %>
<% end %>