--- a/ckanext/dga_stats/templates/ckanext/stats/index.html
+++ b/ckanext/dga_stats/templates/ckanext/stats/index.html
@@ -6,30 +6,8 @@
{% block primary_content %}
-
- {{ _('Summary') }}
- {% if c.summary_stats %}
-
-
-
- {{ _('Measure') }} |
- {{ _('Value') }} |
-
-
-
- {% for measure,value in c.summary_stats %}
-
- {{measure}} |
- {{ value }} |
-
- {% endfor %}
-
-
- {% else %}
- {{ _('No groups') }}
- {% endif %}
-
-
+{% if h.check_access('sysadmin') %}
+
{{ _('Site Activity Log') }}
{% if c.activity_counts %}
@@ -54,8 +32,32 @@
{{ _('No groups') }}
{% endif %}
-{% if h.check_access('sysadmin') %}
-
+
+ {{ _('Recent Datasets') }}
+ {% if c.recent_datasets %}
+
+
+
+ {{ _('Date') }} |
+ {{ _('Dataset') }} |
+ {{ _('New/Modified') }} |
+
+
+
+ {% for date,package,newmodified in c.recent_datasets %}
+
+ {{ date }} |
+ {{ h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name)) }} |
+ {{ newmodified }} |
+
+ {% endfor %}
+
+
+ {% else %}
+ {{ _('No groups') }}
+ {% endif %}
+
+
{{ _('User Access List') }}
{% if c.user_access_list %}
-
- {{ _('Top Rated Datasets') }}
- {% if c.top_rated_packages %}
-
-
-
- Dataset |
- {{ _('Average rating') }} |
- {{ _('Number of ratings') }} |
-
-
-
- {% for package, rating, num_ratings in c.top_rated_packages %}
-
- {{ h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name)) }} |
- {{ rating }} |
- {{ num_ratings }} |
-
- {% endfor %}
-
-
- {% else %}
- {{ _('No ratings') }}
- {% endif %}
-
{{ _('Most Edited Datasets') }}
@@ -202,46 +179,6 @@
{{ _('No groups') }}
{% endif %}
-
-
- {{ _('Top Tags') }}
-
-
-
- {{ _('Tag Name') }} |
- {{ _('Number of Datasets') }} |
-
-
-
- {% for tag, num_packages in c.top_tags %}
-
- {{ h.link_to(tag.name, h.url_for(controller='package', action='search', tags=tag.name)) }} |
- {{ num_packages }} |
-
- {% endfor %}
-
-
-
-
-
- {{ _('Users Owning Most Datasets') }}
-
-
-
- {{ _('User') }} |
- {{ _('Number of Datasets') }} |
-
-
-
- {% for user, num_packages in c.top_package_owners %}
-
- {{ h.linked_user(user) }} |
- {{ num_packages }} |
-
- {% endfor %}
-
-
-
{{ _('Datasets by Organization') }}
{% if c.by_org %}
@@ -255,6 +192,7 @@
{% for group,private, num_packages in c.by_org %}
+ {% if private == False or h.check_access('sysadmin') %}
{{ h.link_to(group.title or group.name, h.url_for(controller='organization', action='read', id=group.name)) }} |
{% if private == True %}
@@ -264,14 +202,39 @@
{% endif %}
{{ num_packages }} |
- {% endfor %}
-
-
- {% else %}
- {{ _('No groups') }}
- {% endif %}
-
-
+ {% endif %}
+ {% endfor %}
+
+
+ {% else %}
+ {{ _('No groups') }}
+ {% endif %}
+
+
+ {{ _('Summary') }}
+ {% if c.summary_stats %}
+
+
+
+ {{ _('Measure') }} |
+ {{ _('Value') }} |
+
+
+
+ {% for measure,value in c.summary_stats %}
+ {% if 'Archived' not in measure or h.check_access('sysadmin') %}
+
+ {{measure}} |
+ {{ value }} |
+
+ {% endif %}
+ {% endfor %}
+
+
+ {% else %}
+ {{ _('No groups') }}
+ {% endif %}
+
{% endblock %}
@@ -280,18 +243,15 @@
{{ _('Statistics Menu') }}