analytics-realm-activity: Add link to realm's stats page.

Adds the  pie chart icon stats page link to the realm_activity
page header.
This commit is contained in:
Lauryn Menard 2022-12-02 14:40:26 +01:00 committed by Tim Abbott
parent c05c25e742
commit b686e6ce9e
2 changed files with 5 additions and 5 deletions

View File

@ -13,6 +13,7 @@ from analytics.views.activity_common import (
format_date_for_activity_reports,
get_user_activity_summary,
make_table,
realm_stats_link,
user_activity_link,
)
from zerver.decorator import require_server_admin
@ -252,8 +253,10 @@ def get_realm_activity(request: HttpRequest, realm_str: str) -> HttpResponse:
data += [(page_title, content)]
title = realm_str
realm_stats = realm_stats_link(realm_str)
return render(
request,
"analytics/activity.html",
context=dict(data=data, realm_link=None, title=title),
context=dict(data=data, realm_stats_link=realm_stats, title=title),
)

View File

@ -15,11 +15,8 @@
<br />
{% endif %}
<h4>{{ title }}</h4>
<h4>{{ title }} {% if realm_stats_link %}{{ realm_stats_link }}{% endif %}</h4>
{% if realm_link %}
<a href="{{ realm_link }}">Graph</a><br />
{% endif %}
<ul class="nav nav-tabs">
{% for name, activity in data %}