* Remove spam and suspended users from followers list (api and dashboards) * Fixed the api followers endpoint * Fixed issue with follower_ids query
107 lines
4.9 KiB
Text
107 lines
4.9 KiB
Text
<nav class="hidden m:block" aria-label="Dashboards">
|
|
<ul class="list-none p-0">
|
|
<% if policy(Article).has_existing_articles_or_can_create_new_ones? %>
|
|
<li>
|
|
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) %>"
|
|
href="<%= dashboard_path %>"
|
|
<%= params[:action] == "show" && (params[:which] == "organization" || params[:which].blank?) ? ' aria-current="page"'.html_safe : "" %>>
|
|
<%= t("views.dashboard.actions.posts") %>
|
|
<span class="c-indicator"><%= @user.articles_count %></span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "series" && (params[:which] == "organization" || params[:which].blank?) %>"
|
|
href="<%= user_series_path(current_user.username) %>"
|
|
<%= params[:action] == "series" && (params[:which] == "organization" || params[:which].blank?) ? ' aria-current="page"'.html_safe : "" %>>
|
|
<%= t("views.dashboard.actions.series") %>
|
|
<span class="c-indicator"><%= @collections_count %></span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "followers" %>"
|
|
href="/dashboard/user_followers"
|
|
<%= params[:action] == "followers" ? ' aria-current="page"'.html_safe : "" %>>
|
|
<%= t("views.dashboard.actions.followers") %>
|
|
<span class="c-indicator"><%= @user.good_standing_followers_count %></span>
|
|
</a>
|
|
</li>
|
|
<% end %>
|
|
|
|
<li>
|
|
<a class="crayons-link crayons-link--block js-following-tags-link <%= "crayons-link--current" if params[:action] == "following_tags" %>"
|
|
href="<%= dashboard_following_tags_path %>"
|
|
<%= params[:action] == "following_tags" ? ' aria-current="page"'.html_safe : "" %>>
|
|
<%= t("views.dashboard.actions.following_tags") %>
|
|
<span class="c-indicator"><%= @user.cached_followed_tag_names.size %></span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "following_users" %>"
|
|
href="<%= dashboard_following_users_path %>"
|
|
<%= params[:action] == "following_users" ? ' aria-current="page"'.html_safe : "" %>>
|
|
<%= t("views.dashboard.actions.following_users") %>
|
|
<span class="c-indicator"><%= @user.following_users_count %></span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "following_organizations" %>"
|
|
href="<%= dashboard_following_organizations_path %>"
|
|
<%= params[:action] == "following_organizations" ? ' aria-current="page"'.html_safe : "" %>>
|
|
<%= t("views.dashboard.actions.following_orgs") %>
|
|
<span class="c-indicator"><%= @user.following_organizations_count %></span>
|
|
</a>
|
|
</li>
|
|
|
|
<li>
|
|
<a class="crayons-link crayons-link--block <%= "crayons-link--current" if params[:action] == "following_podcasts" %>"
|
|
href="<%= dashboard_following_podcasts_path %>"
|
|
<%= params[:action] == "following_podcasts" ? ' aria-current="page"'.html_safe : "" %>>
|
|
<%= t("views.dashboard.actions.following_pods") %>
|
|
<span class="c-indicator"><%= @user.following_podcasts_count %></span>
|
|
</a>
|
|
</li>
|
|
|
|
<%- if Listing.feature_enabled? %>
|
|
<li>
|
|
<a class="crayons-link crayons-link--block" href="/listings/dashboard" data-no-instant>
|
|
<%= t("views.dashboard.actions.listings") %>
|
|
<%= crayons_icon_tag("external-link", class: "ml-1") %>
|
|
</a>
|
|
</li>
|
|
<%- end %>
|
|
|
|
<%- if policy(Article).has_existing_articles_or_can_create_new_ones? %>
|
|
<li>
|
|
<a class="crayons-link crayons-link--block" href="<%= dashboard_analytics_path %>">
|
|
<%= t("views.dashboard.actions.analytics") %>
|
|
</a>
|
|
</li>
|
|
<%- end %>
|
|
|
|
<li>
|
|
<a class="crayons-link crayons-link--block js-hidden-tags-link <%= "crayons-link--current" if params[:action] == "hidden_tags" %>"
|
|
href="<%= dashboard_hidden_tags_path %>"
|
|
<%= params[:action] == "hidden_tags" ? ' aria-current="page"'.html_safe : "" %>>
|
|
<%= t("views.dashboard.actions.hidden_tags") %>
|
|
<span class="c-indicator"><%= @user.cached_antifollowed_tag_names.size %></span>
|
|
</a>
|
|
</li>
|
|
|
|
<% if @organizations && (params[:which].blank? || params[:which] == "organization") %>
|
|
<% @organizations.each do |org| %>
|
|
<li>
|
|
<a class="crayons-link crayons-link--block" href="<%= dashboard_analytics_org_path(org.id) %>"><%= t("views.dashboard.actions.for_org", org: org.name) %></a>
|
|
</li>
|
|
<% end %>
|
|
<% end %>
|
|
|
|
<% if policy(:video).new? %>
|
|
<a class="crayons-btn crayons-btn--secondary w-100 mt-4" href="<%= new_video_path %>" data-no-instant><%= t("views.dashboard.actions.upload") %>
|
|
</a>
|
|
<% end %>
|
|
</ul>
|
|
</nav>
|