From: Alex Sadleir Date: Thu, 05 Jun 2014 05:23:56 +0000 Subject: Add text for header icons X-Git-Url: https://maxious.lambdacomplex.org/git/?p=ckanext-datagovau.git&a=commitdiff&h=6fb450a8de8d7117bf2064746d17eab716c29fe6 --- Add text for header icons --- --- a/ckanext/datagovau/plugin.py +++ b/ckanext/datagovau/plugin.py @@ -22,9 +22,6 @@ filtered_dict[dataset['id']] = dataset return filtered_dict.values() -def related_create(context, data_dict=None): - return {'success': False, 'msg': 'No one is allowed to create related items'} - class DataGovAuPlugin(plugins.SingletonPlugin, tk.DefaultDatasetForm): '''An example IDatasetForm CKAN plugin. @@ -34,10 +31,6 @@ ''' plugins.implements(plugins.IConfigurer, inherit=False) plugins.implements(plugins.ITemplateHelpers, inherit=False) - plugins.implements(plugins.IAuthFunctions) - - def get_auth_functions(self): - return {'rekated_create': related_create} def update_config(self, config): # Add this plugin's templates dir to CKAN's extra_template_paths, so --- a/ckanext/datagovau/templates/header.html +++ b/ckanext/datagovau/templates/header.html @@ -1,4 +1,41 @@ {% ckan_extends %} + +{% block header_account_logged %} +{% if c.userobj.sysadmin %} +
  • + + Sysadmin settings + +
  • +{% endif %} +
  • + + {{ h.gravatar((c.userobj.email_hash if c and c.userobj else ''), size=22) }} + {{ c.userobj.display_name }} + +
  • +{% set new_activities = h.new_activities() %} +
  • + {% set notifications_tooltip = ngettext('Dashboard (%(num)d new item)', 'Dashboard (%(num)d new items)', new_activities) %} + + notifications_tooltip + {{ new_activities }} + +
  • +{% block header_account_settings_link %} +
  • + + Edit settings + +
  • +{% endblock %} +{% block header_account_log_out_link %} +
  • + + Log out + +
  • +{% endblock %} {% block header_site_navigation %}