Skip to content

Commit

Permalink
Move to week - month - year (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
avdata99 authored Dec 2, 2024
1 parent 65d661d commit 185e45a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ <h2>{{ _('Most Viewed Datasets') }}</h2>
in the last year, month, or week.
If a user visits a dataset page multiple times in a day, week, month or year, it will be counted as one unique visit.
</p>
<h3>Last year</h3>
<h3>Last week</h3>
<table class="table table-chunky table-bordered table-striped">
<thead>
<tr><th>{{ _("Dataset") }}</th><th>{{ _("Unique visits") }}</th></tr>
</thead>
<tbody>
{% for row in dataset_views_365 %}
{% for row in dataset_views_7 %}
<tr>
<th>
<a href="{{ h.url_for('dataset.read', id=row.name) }}">
Expand Down Expand Up @@ -53,13 +53,13 @@ <h3>Last month</h3>
</tbody>
</table>

<h3>Last week</h3>
<h3>Last year</h3>
<table class="table table-chunky table-bordered table-striped">
<thead>
<tr><th>{{ _("Dataset") }}</th><th>{{ _("Unique visits") }}</th></tr>
</thead>
<tbody>
{% for row in dataset_views_7 %}
{% for row in dataset_views_365 %}
<tr>
<th>
<a href="{{ h.url_for('dataset.read', id=row.name) }}">
Expand Down
8 changes: 4 additions & 4 deletions ckanext/api_tracking/templates/dashboard/dataset-views.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ <h2>{{ _('Most Viewed Datasets') }}</h2>
If a user visits a dataset page multiple times in a day, it will be counted as one visit.
If the same user visits the dataset page tomorrow, it will be counted as another (the second) visit.
</p>
<h3>Last year</h3>
<h3>Last week</h3>
<table class="table table-chunky table-bordered table-striped">
<thead>
<tr><th>{{ _("Dataset") }}</th><th>{{ _("Daily unique visits") }}</th></tr>
</thead>
<tbody>
{% for row in dataset_views_365 %}
{% for row in dataset_views_7 %}
<tr>
<th>
<a href="{{ h.url_for('dataset.read', id=row.name) }}">
Expand Down Expand Up @@ -53,13 +53,13 @@ <h3>Last month</h3>
</tbody>
</table>

<h3>Last week</h3>
<h3>Last year</h3>
<table class="table table-chunky table-bordered table-striped">
<thead>
<tr><th>{{ _("Dataset") }}</th><th>{{ _("Daily unique visits") }}</th></tr>
</thead>
<tbody>
{% for row in dataset_views_7 %}
{% for row in dataset_views_365 %}
<tr>
<th>
<a href="{{ h.url_for('dataset.read', id=row.name) }}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
<section id="stats-dataset-views" class="module-content tab-content active">
<h2>{{ _('Resource Downloads') }}</h2>
<p>Unique visits</p>
<h3>Last year</h3>
<h3>Last week</h3>
<table class="table table-chunky table-bordered table-striped">
<thead>
<tr><th>{{ _("Resource") }}</th><th>{{ _("Downloads") }}</th></tr>
</thead>
<tbody>
{% for row in resource_downloads_365 %}
{% for row in resource_downloads_7 %}
<tr>
<th>
<a href="{{ row.url }}">{{ row.title }}</a>
Expand Down Expand Up @@ -44,13 +44,13 @@ <h3>Last month</h3>
</tbody>
</table>

<h3>Last week</h3>
<h3>Last year</h3>
<table class="table table-chunky table-bordered table-striped">
<thead>
<tr><th>{{ _("Resource") }}</th><th>{{ _("Downloads") }}</th></tr>
</thead>
<tbody>
{% for row in resource_downloads_7 %}
{% for row in resource_downloads_365 %}
<tr>
<th>
<a href="{{ row.url }}">{{ row.title }}</a>
Expand Down

0 comments on commit 185e45a

Please sign in to comment.