Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#368] Ported revision history page to new template system
- Loading branch information
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 %} | ||
<section class="module-content"> | ||
<h1 class="hide-heading">{{ _('History') }}</h1> | ||
{% block package_history_revisions %} | ||
{% snippet "package/snippets/history_revisions.html", pkg_dict=pkg, pkg_revisions=c.pkg_revisions %} | ||
{% endblock %} | ||
</section> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% import 'macros/form.html' as form %} | ||
|
||
<form class="dataset-form dataset-resource-form form-horizontal" method="post" data-module="basic-form"> | ||
|
||
{{ form.errors(error_summary) }} | ||
|
||
<input type="hidden" name="pkg_name" value="{{ pkg_dict.name }}"/> | ||
{% snippet 'package/snippets/revisions_table.html', pkg_dict=pkg_dict, pkg_revisions=pkg_revisions %} | ||
|
||
<button class="btn btn-primary" name="diff" value="go-resources" type="submit">{{ _('Compare') }}</button> | ||
|
||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{% import 'macros/form.html' as form %} | ||
|
||
<table class="table table-striped table-bordered table-condensed"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th>{{ _('Revision') }}</th> | ||
<th>{{ _('Timestamp') }}</th> | ||
<th>{{ _('Author') }}</th> | ||
<th>{{ _('Log Message') }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for rev in pkg_revisions %} | ||
<tr> | ||
<td nowrap="nowrap"> | ||
{{ h.radio('selected1', rev.id, checked=(loop.first)) }} | ||
{{ h.radio('selected2', rev.id, checked=(loop.last)) }} | ||
</td> | ||
<td class="dataset-label"> | ||
<a href="{{ h.url_for(controller='revision', action='read', id=rev.id) }}">{{rev.id[:4]}}…</a> | ||
</td> | ||
<td class="dataset-details"> | ||
<a href="{{ h.url_for(controller='package', action='read',id='%s@%s' % (pkg_dict.name, rev.timestamp))}}" title="{{_('Read dataset as of %s') % rev.timestamp }}">{{ h.render_datetime(rev.timestamp, with_hours=True) }}</a> | ||
</td> | ||
<td class="dataset-details">{{ h.linked_user(rev.author) }}</td> | ||
<td class="dataset-details">{{ rev.message }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> |