diff --git a/ckanext/report/blueprint.py b/ckanext/report/blueprint.py index 4960028..2a476b1 100644 --- a/ckanext/report/blueprint.py +++ b/ckanext/report/blueprint.py @@ -159,13 +159,14 @@ def view(report_name, organization=None, refresh=False): 'report_date': report_date, 'options': options, 'options_html': options_html, 'report_template': report['template'], - 'are_some_results': are_some_results}) + 'are_some_results': are_some_results, + 'organization': organization}) report.add_url_rule(u'/report', view_func=index) report.add_url_rule(u'/reports', 'reports', view_func=redirect_to_index) report.add_url_rule(u'/report/', view_func=view, methods=['GET', 'POST']) -report.add_url_rule(u'/report//', 'org', view_func=view) +report.add_url_rule(u'/report//', 'org', view_func=view, methods=['GET', 'POST']) def get_blueprints(): diff --git a/ckanext/report/controllers.py b/ckanext/report/controllers.py index 46e4190..c319d7b 100644 --- a/ckanext/report/controllers.py +++ b/ckanext/report/controllers.py @@ -133,4 +133,5 @@ def view(self, report_name, organization=None, refresh=False): 'report_date': report_date, 'options': options, 'options_html': options_html, 'report_template': report['template'], - 'are_some_results': are_some_results}) + 'are_some_results': are_some_results, + 'organization': organization}) diff --git a/ckanext/report/templates/report/view.html b/ckanext/report/templates/report/view.html index e527ed8..a8cea41 100644 --- a/ckanext/report/templates/report/view.html +++ b/ckanext/report/templates/report/view.html @@ -5,6 +5,9 @@ {% block breadcrumb_content %}
  • {{ h.nav_link(_('Reports'), named_route='report.index') }}
  • {{ h.nav_link(report.title, named_route='report.view', report_name=report_name) }}
  • + {% if organization %} +
  • {{ h.nav_link(organization, named_route='report.org', report_name=report_name, organization=organization) }}
  • + {% endif %} {% endblock%} {% block primary_content_inner %}