diff --git a/ckanext/odsh/controller.py b/ckanext/odsh/controller.py new file mode 100644 index 0000000000000000000000000000000000000000..f1990fd5b28a9c582470d4fcb86c10a523917375 --- /dev/null +++ b/ckanext/odsh/controller.py @@ -0,0 +1,6 @@ +import ckan.lib.base as base +from ckan.controllers.home import HomeController + +class OdshRouteController(HomeController): + def info_page(self): + return base.render('info_page.html') \ No newline at end of file diff --git a/ckanext/odsh/plugin.py b/ckanext/odsh/plugin.py index 3c2218af16e9e5f4f8158b8b025a67102ac6254b..d9d679ea77c1c5a135f70462c1734044252698c5 100644 --- a/ckanext/odsh/plugin.py +++ b/ckanext/odsh/plugin.py @@ -14,6 +14,7 @@ def odsh_main_groups(): class OdshPlugin(plugins.SingletonPlugin): plugins.implements(plugins.IConfigurer) plugins.implements(plugins.ITemplateHelpers) + plugins.implements(plugins.IRoutes, inherit=True) # IConfigurer @@ -27,3 +28,7 @@ class OdshPlugin(plugins.SingletonPlugin): # extension they belong to, to avoid clashing with functions from # other extensions. return {'odsh_main_groups': odsh_main_groups} + + def before_map(self, map): + map.connect('info_page', '/info_page', controller='ckanext.odsh.controller:OdshRouteController', action='info_page') + return map diff --git a/ckanext/odsh/templates/header.html b/ckanext/odsh/templates/header.html index 8aebd7a92834ef1474251d5ae673186514b0328d..fdac883c77cf12ac905ab45e48bdb90a44852d62 100644 --- a/ckanext/odsh/templates/header.html +++ b/ckanext/odsh/templates/header.html @@ -1,4 +1,19 @@ {% ckan_extends %} {% block header_account_container_content %} -hier war der login +hier war der login +{% endblock %} +{% block header_site_navigation %} +<nav class="section navigation"> + <ul class="nav nav-pills"> + {% block header_site_navigation_tabs %} + {{ h.build_nav_main( + ('search', _('Datasets')), + ('organizations_index', _('Organizations')), + ('group_index', _('Groups')), + ('about', _('About')), + ('info_page', _('Info')) + ) }} + {% endblock %} + </ul> +</nav> {% endblock %} \ No newline at end of file diff --git a/ckanext/odsh/templates/info_page.html b/ckanext/odsh/templates/info_page.html new file mode 100644 index 0000000000000000000000000000000000000000..06e5547684a40113663e33594c93df2382c11ca7 --- /dev/null +++ b/ckanext/odsh/templates/info_page.html @@ -0,0 +1 @@ +info \ No newline at end of file