Skip to content

Commit ea3a711

Browse files
authored
Merge pull request #6531 from OCHA-DAP/prod
Prod
2 parents de321ad + cb2d35f commit ea3a711

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: ckanext-hdx_org_group/ckanext/hdx_org_group/tests/test_organization_stats.py

+4
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,26 @@ def test_stats_organization(self,hdx_generate_organization_stats, app):
7777
# no user
7878
result = app.get(url, headers={})
7979
assert 'Monthly dataset download and page view statistics' not in result.body
80+
assert 'If you are an administrator of this organization, you can log in to download monthly statistics going back five years.' in result.body
8081

8182
url = h.url_for('hdx_org.stats', id=org_id)
8283
# regular user
8384
result = app.get(url, headers=auth_user)
8485
assert 'Monthly dataset download and page view statistics' not in result.body
86+
assert 'If you are an administrator of this organization, you can log in to download monthly statistics going back five years.' in result.body
8587

8688
url = h.url_for('hdx_org.stats', id=org_id)
8789
# org member
8890
result = app.get(url, headers=auth_member)
8991
assert 'Monthly dataset download and page view statistics' not in result.body
92+
assert 'If you are an administrator of this organization, you can log in to download monthly statistics going back five years.' in result.body
9093

9194
url = h.url_for('hdx_org.stats', id=org_id)
9295
# org admin
9396
result = app.get(url, headers=auth_admin)
9497
assert result.status_code == 200
9598
assert 'Monthly dataset download and page view statistics' in result.body
99+
assert 'If you are an administrator of this organization, you can log in to download monthly statistics going back five years.' not in result.body
96100

97101

98102
# download xls access

Diff for: ckanext-hdx_theme/ckanext/hdx_theme/templates/organization/stats.html

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ <h2 class="hide-heading">{% block page_heading %}{{ _('Stats') }}{% endblock %}<
3030
<a href="{{ h.url_for('hdx_org.download_organization_stats', id=org_meta.org_dict.id) }}">XLSX</a></p>
3131
</div>
3232
{% set margin_top="mt0" %}
33+
{% else %}
34+
<div class="text-end mt-3">
35+
<p>If you are an administrator of this organization, you can log in to download monthly statistics going back five years.</p>
36+
</div>
37+
{% set margin_top="mt0" %}
3338
{% endif %}
3439
<div class="{{ margin_top }} list-header crisis-list-header">
3540
<span class="mL15 list-header-title">Number of Downloads (last 24 weeks)</span>

0 commit comments

Comments
 (0)