--- a/ckanext/dga_stats/templates/ckanext/stats/index.html +++ b/ckanext/dga_stats/templates/ckanext/stats/index.html @@ -46,6 +46,31 @@ <td>{{ month }}</td> <td>{{ type }}</td> <td class="metric">{{ count }}</td> + </tr> + {% endfor %} + </tbody> + </table> + {% else %} + <p class="empty">{{ _('No groups') }}</p> + {% endif %} + </section> + <section id="recent-datasets" class="module-content tab-content"> + <h2>{{ _('Recent Datasets') }}</h2> + {% if c.recent_datasets %} + <table class="table table-chunky table-bordered table-striped"> + <thead> + <tr> + <th>{{ _('Date') }}</th> + <th>{{ _('Dataset') }}</th> + <th>{{ _('New/Modified') }}</th> + </tr> + </thead> + <tbody> + {% for date,package,newmodified in c.recent_datasets %} + <tr> + <td>{{ date }}</td> + <td>{{ h.link_to(package.title or package.name, h.url_for(controller='package', action='read', id=package.name)) }}</td> + <td>{{ newmodified }}</td> </tr> {% endfor %} </tbody> @@ -282,6 +307,7 @@ <ul class="unstyled nav nav-simple"> <li class="nav-item active"><a href="#summary" data-toggle="tab">{{ _('Summary') }}</a></li> <li class="nav-item"><a href="#activity-counts" data-toggle="tab">{{ _('Site Activity Log') }}</a></li> + <li class="nav-item"><a href="#recent-datasets" data-toggle="tab">{{ _('Recent Datasets') }}</a></li> {% if h.check_access('sysadmin') %} <li class="nav-item"><a href="#user-access-list" data-toggle="tab">{{ _('User Access List') }}</a></li> {% endif %}