Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#368] New template for group history
- 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 "group/read_base.html" %} | ||
|
||
{% block subtitle %}{{ _('History') }} - {{ c.group_dict.display_name }}{% endblock %} | ||
|
||
{% block primary_content_inner %} | ||
<section class="module-content"> | ||
<h1 class="hide-heading">{{ _('History') }}</h1> | ||
{% block group_history_revisions %} | ||
{% snippet "group/snippets/history_revisions.html", group_dict=c.group_dict, group_revisions=c.group_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="group_name" value="{{ group_dict.name }}"/> | ||
{% snippet 'group/snippets/revisions_table.html', group_dict=group_dict, group_revisions=group_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"> | ||
<thead> | ||
<tr> | ||
<th></th> | ||
<th>{{ _('Revision') }}</th> | ||
<th>{{ _('Timestamp') }}</th> | ||
<th>{{ _('Author') }}</th> | ||
<th>{{ _('Log Message') }}</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
{% for rev in group_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"> | ||
{% link_for rev.id | truncate(6), controller='revision', action='read', id=rev.id %} | ||
</td> | ||
<td class="dataset-details"> | ||
<a href="{{ h.url_for(controller='group', action='read',id='%s@%s' % (group_dict.name, rev.timestamp))}}" title="{{_('Read group 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> |