diff --git a/ckanext/openafrica/blueprint.py b/ckanext/openafrica/blueprint.py index b826665..54dc528 100644 --- a/ckanext/openafrica/blueprint.py +++ b/ckanext/openafrica/blueprint.py @@ -1,7 +1,7 @@ from flask import Blueprint from ckan.plugins.toolkit import render -openafrica = Blueprint('datapusher', __name__) +openafrica = Blueprint('openafrica', __name__) def toc(): return render('home/about/toc.html') @@ -33,7 +33,8 @@ def atlas(): ("/about/code-of-conduct", "coc", coc), ("/about/moderation-policy", "moderation", moderation), ("/about/faq", "faq", faq), - ("/about/privacy", "privacy", privacy) + ("/about/privacy", "privacy", privacy), + ("/about/contact", "contact", contact) ] for rule in rules: diff --git a/ckanext/openafrica/plugin.py b/ckanext/openafrica/plugin.py index a5784d7..d0b1ba0 100644 --- a/ckanext/openafrica/plugin.py +++ b/ckanext/openafrica/plugin.py @@ -30,8 +30,8 @@ class OpenAfricaPlugin(plugins.SingletonPlugin): u""" openAFRICA templating plugin. """ - plugins.implements(plugins.IConfigurer) - plugins.implements(plugins.ITemplateHelpers) + plugins.implements(plugins.IConfigurer, inherit=True) + plugins.implements(plugins.ITemplateHelpers, inherit=True) plugins.implements(plugins.IBlueprint) def update_config(self, config): @@ -43,7 +43,6 @@ def update_config(self, config): """ toolkit.add_template_directory(config, 'templates') toolkit.add_public_directory(config, 'public') - # toolkit.add_resource('fanstatic', 'openafrica') toolkit.add_resource('assets', 'openafrica') # IBlueprint diff --git a/ckanext/openafrica/templates/dataset-page.html b/ckanext/openafrica/templates/dataset-page.html index bfcba44..1be96a5 100644 --- a/ckanext/openafrica/templates/dataset-page.html +++ b/ckanext/openafrica/templates/dataset-page.html @@ -23,7 +23,7 @@ {% block flash %}
{% block flash_inner %} - {% for message in h.flash.pop_messages() | list %} + {% for message in h.flash.pop_messages | list %}
{{ h.literal(message) }}
diff --git a/ckanext/openafrica/templates/header.html b/ckanext/openafrica/templates/header.html index 7cb8d07..885fb1a 100644 --- a/ckanext/openafrica/templates/header.html +++ b/ckanext/openafrica/templates/header.html @@ -8,10 +8,10 @@ {% block header_logo %} {% if g.site_logo %} - {% else %} - {{ g.site_title }} {% endif %} diff --git a/ckanext/openafrica/templates/home/about/accessibility.html b/ckanext/openafrica/templates/home/about/accessibility.html index 4e5478a..eabbbfb 100644 --- a/ckanext/openafrica/templates/home/about/accessibility.html +++ b/ckanext/openafrica/templates/home/about/accessibility.html @@ -4,7 +4,7 @@ {% block breadcrumb_content %}
  • {% link_for _('About'), controller='home', action='about' %}
  • -
  • {% link_for _('Accessibility'), controller='ckanext.openafrica.controller:CustomPageController', action='accessibility' %}
  • +
  • {% link_for _('Accessibility'), named_route='openafrica.accessibility' %}
  • {% endblock %} {% block primary %} diff --git a/ckanext/openafrica/templates/home/about/coc.html b/ckanext/openafrica/templates/home/about/coc.html index cecd567..6394e1e 100644 --- a/ckanext/openafrica/templates/home/about/coc.html +++ b/ckanext/openafrica/templates/home/about/coc.html @@ -4,7 +4,7 @@ {% block breadcrumb_content %}
  • {% link_for _('About'), controller='home', action='about' %}
  • -
  • {% link_for _('Code of Conduct'), controller='ckanext.openafrica.controller:CustomPageController', action='coc' %}
  • +
  • {% link_for _('Code of Conduct'), named_route='openafrica.coc' %}
  • {% endblock %} {% block primary %} diff --git a/ckanext/openafrica/templates/home/about/contact.html b/ckanext/openafrica/templates/home/about/contact.html index 9abba96..3ad0b85 100644 --- a/ckanext/openafrica/templates/home/about/contact.html +++ b/ckanext/openafrica/templates/home/about/contact.html @@ -4,7 +4,7 @@ {% block breadcrumb_content %}
  • {% link_for _('About'), controller='home', action='about' %}
  • -
  • {% link_for _('Contact Us'), controller='ckanext.openafrica.controller:CustomPageController', action='contact' %}
  • +
  • {% link_for _('Contact Us'), named_route='openafrica.contact' %}
  • {% endblock %} {% block primary %} diff --git a/ckanext/openafrica/templates/home/about/faq.html b/ckanext/openafrica/templates/home/about/faq.html index 7c826a8..a52a983 100644 --- a/ckanext/openafrica/templates/home/about/faq.html +++ b/ckanext/openafrica/templates/home/about/faq.html @@ -4,7 +4,7 @@ {% block breadcrumb_content %}
  • {% link_for _('About'), controller='home', action='about' %}
  • -
  • {% link_for _('FAQs'), controller='ckanext.openafrica.controller:CustomPageController', action='faq' %}
  • +
  • {% link_for _('FAQs'), named_route='openafrica.faq' %}
  • {% endblock %} {% block primary %} diff --git a/ckanext/openafrica/templates/home/about/moderation.html b/ckanext/openafrica/templates/home/about/moderation.html index fe52b2b..a8ac6ed 100644 --- a/ckanext/openafrica/templates/home/about/moderation.html +++ b/ckanext/openafrica/templates/home/about/moderation.html @@ -4,7 +4,7 @@ {% block breadcrumb_content %}
  • {% link_for _('About'), controller='home', action='about' %}
  • -
  • {% link_for _('Moderation Policy'), controller='ckanext.openafrica.controller:CustomPageController', action='moderation' %}
  • +
  • {% link_for _('Moderation Policy'), named_route='openafrica.moderation' %}
  • {% endblock %} {% block primary %} diff --git a/ckanext/openafrica/templates/home/about/privacy.html b/ckanext/openafrica/templates/home/about/privacy.html index 7bacc1e..2fb6761 100644 --- a/ckanext/openafrica/templates/home/about/privacy.html +++ b/ckanext/openafrica/templates/home/about/privacy.html @@ -4,7 +4,7 @@ {% block breadcrumb_content %}
  • {% link_for _('About'), controller='home', action='about' %}
  • -
  • {% link_for _('Privacy'), controller='ckanext.openafrica.controller:CustomPageController', action='privacy' %}
  • +
  • {% link_for _('Privacy'), named_route='openafrica.privacy' %}
  • {% endblock %} {% block primary %} diff --git a/ckanext/openafrica/templates/home/about/toc.html b/ckanext/openafrica/templates/home/about/toc.html index 951b403..30065b1 100644 --- a/ckanext/openafrica/templates/home/about/toc.html +++ b/ckanext/openafrica/templates/home/about/toc.html @@ -4,7 +4,7 @@ {% block breadcrumb_content %}
  • {% link_for _('About'), controller='home', action='about' %}
  • -
  • {% link_for _('Terms & Conditions'), controller='ckanext.openafrica.controller:CustomPageController', action='toc' %}
  • +
  • {% link_for _('Terms & Conditions'), named_route='openafrica.toc' %}
  • {% endblock %} {% block primary %} diff --git a/ckanext/openafrica/templates/page.html b/ckanext/openafrica/templates/page.html index 5d3155a..e3ed21a 100644 --- a/ckanext/openafrica/templates/page.html +++ b/ckanext/openafrica/templates/page.html @@ -23,7 +23,7 @@ {% block flash %}
    {% block flash_inner %} - {% for message in h.flash.pop_messages() | list %} + {% for message in h.flash.pop_messages | list %}
    {{ h.literal(message) }}