* fix analytic page have no back-to-dashboard button when user have no organization * resolve conflict with main * remove dump * add test for back to dashboard button
42 lines
1.7 KiB
Text
42 lines
1.7 KiB
Text
<% title "Analytics" %>
|
|
|
|
<main class="dashboard-container analytics-container crayons-layout" id="main-content">
|
|
<nav aria-label="Dashboards">
|
|
<ul class="list-none">
|
|
<li>
|
|
<a href="<%= dashboard_path %>" class="rounded-btn crayons-link--block rounded-btn--transparent">👈 Back to Main Dashboard</a>
|
|
</li>
|
|
<% if @organizations.any? %>
|
|
<li>
|
|
<a class="rounded-btn crayons-link--block organization"
|
|
href="<%= dashboard_analytics_path %>"
|
|
<%= params[:org_id] ? "" : 'aria-current="page"'.html_safe %>>
|
|
Your Dashboard
|
|
</a>
|
|
</li>
|
|
<% @organizations.each do |org| %>
|
|
<li>
|
|
<a
|
|
class="rounded-btn crayons-link--block organization"
|
|
href="<%= dashboard_analytics_org_path(org.id) %>"
|
|
data-organization-id="<%= org.id %>"
|
|
<%= params[:org_id].to_i == org.id ? 'aria-current="page"'.html_safe : "" %>>
|
|
<%= org.name %> Analytics Dashboard
|
|
</a>
|
|
</li>
|
|
<% end %>
|
|
<% end %>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
<div class="crayons-card p-3 mt-5">
|
|
<h1 class="fs-4xl fw-medium">Analytics Dashboard for <%= @user_or_org.name %></h1>
|
|
<p>Welcome to the Analytics Dashboard, the home of in-depth user metrics so that authors can make data-driven decisions about the <%= Settings::Community.member_label %> ecosystem.</p>
|
|
<p>This dashboard highlights deep insights especially relevant to <%= Settings::Community.member_label %> relations, authors, and serious bloggers.</p>
|
|
</div>
|
|
|
|
<%= render "shared/stats" %>
|
|
</main>
|
|
|
|
<%= javascript_packs_with_chunks_tag "analyticsDashboard", defer: true %>
|