diff --git a/ckan/templates/package/history.html b/ckan/templates/package/history.html new file mode 100644 index 00000000000..0f09674214a --- /dev/null +++ b/ckan/templates/package/history.html @@ -0,0 +1,12 @@ +{% extends "package/read_base.html" %} + +{% block subtitle %}{{ _('History') }} - {{ c.pkg_dict.title or c.pkg_dict.name }}{% endblock %} + +{% block primary_content_inner %} +
+

{{ _('History') }}

+ {% block package_history_revisions %} + {% snippet "package/snippets/history_revisions.html", pkg_dict=pkg, pkg_revisions=c.pkg_revisions %} + {% endblock %} +
+{% endblock %} diff --git a/ckan/templates/package/snippets/history_revisions.html b/ckan/templates/package/snippets/history_revisions.html new file mode 100644 index 00000000000..f75aafc5d3f --- /dev/null +++ b/ckan/templates/package/snippets/history_revisions.html @@ -0,0 +1,12 @@ +{% import 'macros/form.html' as form %} + +
+ + {{ form.errors(error_summary) }} + + + {% snippet 'package/snippets/revisions_table.html', pkg_dict=pkg_dict, pkg_revisions=pkg_revisions %} + + + +
\ No newline at end of file diff --git a/ckan/templates/package/snippets/revisions_table.html b/ckan/templates/package/snippets/revisions_table.html new file mode 100644 index 00000000000..17e056e8e44 --- /dev/null +++ b/ckan/templates/package/snippets/revisions_table.html @@ -0,0 +1,31 @@ +{% import 'macros/form.html' as form %} + + + + + + + + + + + + + {% for rev in pkg_revisions %} + + + + + + + + {% endfor %} + +
{{ _('Revision') }}{{ _('Timestamp') }}{{ _('Author') }}{{ _('Log Message') }}
+ {{ h.radio('selected1', rev.id, checked=(loop.first)) }} + {{ h.radio('selected2', rev.id, checked=(loop.last)) }} + + {{rev.id[:4]}}… + + {{ h.render_datetime(rev.timestamp, with_hours=True) }} + {{ h.linked_user(rev.author) }}{{ rev.message }}
\ No newline at end of file