diff --git a/ckanext/report/report_registry.py b/ckanext/report/report_registry.py index d619171..478791d 100644 --- a/ckanext/report/report_registry.py +++ b/ckanext/report/report_registry.py @@ -18,7 +18,7 @@ REPORT_KEYS_REQUIRED = set(('name', 'generate', 'template', 'option_defaults', 'option_combinations')) -REPORT_KEYS_OPTIONAL = set(('title', 'description', 'authorize')) +REPORT_KEYS_OPTIONAL = set(('title', 'description', 'long_description', 'authorize')) class Report(object): @@ -51,6 +51,8 @@ def __init__(self, report_info_dict, plugin): self.title = re.sub('[_-]', ' ', self.name.capitalize()) elif key == 'description': self.description = '' + elif key == 'long_description': + self.long_description = '' def generate_key(self, option_dict, defaults_for_missing_keys=True): '''Returns a key that will identify the report and options when saved @@ -159,6 +161,7 @@ def as_dict(self): return {'name': self.name, 'title': self.title, 'description': self.description, + 'long_description': self.long_description, 'option_defaults': self.option_defaults, 'template': self.get_template()} diff --git a/ckanext/report/templates/report/view.html b/ckanext/report/templates/report/view.html index 113a43a..23272ef 100644 --- a/ckanext/report/templates/report/view.html +++ b/ckanext/report/templates/report/view.html @@ -14,7 +14,7 @@ {% set type = 'asset' if h.check_ckan_version(min_version="2.9.0", max_version="3.0.0") else 'resource' %} {% include 'report/report_js_' ~ type ~ '.html' %}
{{ _(report.description) }}
+{{ _(report.long_description if report.long_description else report.description) }}
{{ _('Generated') }}: {{ h.render_datetime(report_date, with_hours=True) }}