--- 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 %} - - - - - - - - - {% for measure,value in c.summary_stats %} - - - - - {% endfor %} - -
{{ _('Measure') }}{{ _('Value') }}
{{measure}}{{ value }}
- {% else %} -

{{ _('No groups') }}

- {% endif %} -
-
+{% if h.check_access('sysadmin') %} +

{{ _('Site Activity Log') }}

{% if c.activity_counts %} @@ -54,7 +32,57 @@

{{ _('No groups') }}

{% endif %} - +
+

{{ _('Recent Datasets') }}

+ {% if c.recent_datasets %} +
+ + + + + + + + + {% for date,package,newmodified in c.recent_datasets %} + + + + + + {% endfor %} + +
{{ _('Date') }}{{ _('Dataset') }}{{ _('New/Modified') }}
{{ date }}{{ h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name)) }}{{ newmodified }}
+ {% else %} +

{{ _('No groups') }}

+ {% endif %} +
+
+

{{ _('User Access List') }}

+ {% if c.user_access_list %} + + + + + + + + + + {% for username,sysadmin,role in c.user_access_list %} + + + + + + {% endfor %} + +
{{ _('Username') }}{{ _('Sysadmin') }}{{ _('Organisational Role') }}
{{ username }}{{ sysadmin }}{{ role }}
+ {% else %} +

{{ _('No groups') }}

+ {% endif %} +
+{% endif %}

{{ _('Total number of Datasets') }}

@@ -103,31 +131,6 @@
-
-

{{ _('Top Rated Datasets') }}

- {% if c.top_rated_packages %} - - - - - - - - - - {% for package, rating, num_ratings in c.top_rated_packages %} - - - - - - {% endfor %} - -
Dataset{{ _('Average rating') }}{{ _('Number of ratings') }}
{{ h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name)) }}{{ rating }}{{ num_ratings }}
- {% else %} -

{{ _('No ratings') }}

- {% endif %} -

{{ _('Most Edited Datasets') }}

@@ -163,7 +166,7 @@ {{ _('Number of datasets') }} - + {% for group, num_packages in c.largest_groups %} {{ h.link_to(group.title or group.name, h.url_for(controller='group', action='read', id=group.name)) }} @@ -173,71 +176,116 @@ {% else %} -

{{ _('No groups') }}

- {% endif %} -
-
-

{{ _('Largest Groups') }}

- {% if c.largest_groups %} - - - - +

{{ _('No groups') }}

+ {% endif %} + +
+

{{ _('Datasets by Organization') }}

+ {% if c.by_org %} +
{{ _('Group') }}
+ + + + - {% for group, num_packages in c.largest_groups %} - - + {% for group,private, num_packages in c.by_org %} + {% if private == False or h.check_access('sysadmin') %} + + + {% if private == True %} + + {% else %} + + {% endif %} - {% endfor %} - -
{{ _('Organisation') }}{{ _('Public/Archived') }} {{ _('Number of datasets') }}
{{ h.link_to(group.title or group.name, h.url_for(controller='group', action='read', id=group.name)) }}
{{ h.link_to(group.title or group.name, h.url_for(controller='organization', action='read', id=group.name)) }}ArchivedPublic{{ num_packages }}
- {% else %} -

{{ _('No groups') }}

- {% endif %} -
- -
-

{{ _('Top Tags') }}

- - - - - - - - - {% for tag, num_packages in c.top_tags %} - - - - - {% endfor %} - -
{{ _('Tag Name') }}{{ _('Number of Datasets') }}
{{ h.link_to(tag.name, h.url_for(controller='package', action='search', tags=tag.name)) }}{{ num_packages }}
-
- -
-

{{ _('Users Owning Most Datasets') }}

- - - - - - - - - {% for user, num_packages in c.top_package_owners %} - - - - - {% endfor %} - -
{{ _('User') }}{{ _('Number of Datasets') }}
{{ h.linked_user(user) }}{{ num_packages }}
+ {% endif %} + {% endfor %} + + + {% else %} +

{{ _('No groups') }}

+ {% endif %} +
+
+

{{ _('Resources by Organization') }}

+ {% if c.res_by_org %} + + + + + + + + + + + + {% for group,t,s,o,tot in c.res_by_org %} + + + + + + + + {% endfor %} + +
{{ _('Organisation') }}{{ _('Tabular') }}{{ _('Spatial') }}{{ _('Other') }}{{ _('Total') }}
{{ h.link_to(group.title or group.name, h.url_for(controller='organization', action='read', id=group.name)) }}{{ t }}{{ s }}{{ o }}{{ tot }}
+ {% else %} +

{{ _('No groups') }}

+ {% endif %} +
+
+

{{ _('Most Active Organisations') }}

+ {% if c.top_active_orgs %} + + + + + + + + + {% for group, num_packages in c.top_active_orgs %} + + + + + {% endfor %} + +
{{ _('Organisation') }}{{ _('Number of datasets updated recently') }}
{{ h.link_to(group.title or group.name, h.url_for(controller='organization', action='read', id=group.name)) }}{{ num_packages }}
+ {% else %} +

{{ _('No groups') }}

+ {% endif %} +
+
+

{{ _('Summary') }}

+ {% if c.summary_stats %} + + + + + + + + + {% for measure,value in c.summary_stats %} + {% if 'Archived' not in measure or h.check_access('sysadmin') %} + + + + + {% endif %} + {% endfor %} + +
{{ _('Measure') }}{{ _('Value') }}
{{measure}}{{ value }}
+ {% else %} +

{{ _('No groups') }}

+ {% endif %}
{% endblock %} @@ -247,15 +295,17 @@

{{ _('Statistics Menu') }}