Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '368-new-history-page-2'
- Loading branch information
Showing
15 changed files
with
352 additions
and
19 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
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
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"> | ||
{{ h.render_datetime(rev.timestamp, with_hours=True) }} | ||
</td> | ||
<td class="dataset-details">{{ h.linked_user(rev.author) }}</td> | ||
<td class="dataset-details">{{ rev.message }}</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> |
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
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"> | ||
<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"> | ||
{% link_for rev.id | truncate(6), controller='revision', action='read', id=rev.id %} | ||
</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> |
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 @@ | ||
# empty file needed for pylons to find templates in this directory |
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,56 @@ | ||
{% extends "revision/read_base.html" %} | ||
|
||
{% set pkg = c.pkg %} | ||
{% set group = c.group %} | ||
|
||
{% block subtitle %}{{ _('Differences')}}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
{% if c.diff_entity == 'package' %} | ||
{% set dataset = pkg.title or pkg.name %} | ||
<li>{% link_for _('Datasets'), controller='package', action='search', highlight_actions = 'new index' %}</li> | ||
<li>{% link_for dataset, controller='package', action='read', id=pkg.name %}</li> | ||
<li class="active"><a href="" title="{{ _('Revision Differences') }}">{{ _('Revision Differences') }}</a></li> | ||
{% elif c.diff_entity == 'group' %} | ||
{% set group = group.display_name or group.name %} | ||
<li>{% link_for _('Groups'), controller='group', action='index' %}</li> | ||
<li>{% link_for group, controller='group', action='read', id=group.name %}</li> | ||
<li class="active"><a href="" title="{{ _('Revision Differences') }}">{{ _('Revision Differences') }}</a></li> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block primary_content_inner %} | ||
<h1>{{ _('Revision Differences') }} - | ||
{% if c.diff_entity == 'package' %} | ||
{% link_for pkg.title, controller='package', action='read', id=pkg.name %} | ||
{% elif c.diff_entity == 'group' %} | ||
{% link_for group.display_name, controller='group', action='read', id=group.name %} | ||
{% endif %} | ||
</h1> | ||
|
||
<p> | ||
<strong>From:</strong> {% link_for c.revision_from.id, controller='revision', action='read', id=c.revision_from.id %} - | ||
{{ h.render_datetime(c.revision_from.timestamp, with_hours=True) }} | ||
</p> | ||
<p> | ||
<strong>To:</strong> {% link_for c.revision_to.id, controller='revision', action='read', id=c.revision_to.id %} - | ||
{{ h.render_datetime(c.revision_to.timestamp, with_hours=True) }} | ||
</p> | ||
|
||
{% if c.diff %} | ||
<table class="table table-bordered table-striped"> | ||
<tr> | ||
<th>{{ _('Field') }}</th> | ||
<th>{{ _('Difference') }}</th> | ||
</tr> | ||
{% for field, diff in c.diff %} | ||
<tr> | ||
<td>{{ field }}</td> | ||
<td><pre>{{ diff }}</pre></td> | ||
</tr> | ||
{% endfor %} | ||
</table> | ||
{% else %} | ||
<h3>{{ _('No Differences') }}</h3> | ||
{% endif %} | ||
{% 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,19 @@ | ||
{% extends "revision/read_base.html" %} | ||
|
||
{% block subtitle %}{{ _('Revision History') }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
<li class="active"><a href="" title="{{ _('Revision History') }}">{{ _('Revisions') }}</a></li> | ||
{% endblock %} | ||
|
||
{% block primary_content_inner %} | ||
<h1>{{ _('Revision History') }}</h1> | ||
|
||
{{ c.page.pager() }} | ||
|
||
{% block revisions_list %} | ||
{% snippet "revision/snippets/revisions_list.html", revisions=c.page.items %} | ||
{% endblock %} | ||
|
||
{{ c.page.pager() }} | ||
{% 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,93 @@ | ||
{% extends "revision/read_base.html" %} | ||
|
||
{% set rev = c.revision %} | ||
|
||
{% block subtitle %}{{ _('Revision') }} {{ rev.id }}{% endblock %} | ||
|
||
{% block breadcrumb_content %} | ||
<li>{% link_for _('Revisions'), controller='revision', action='index' %}</li> | ||
<li class="active"><a href="" title="{{ _('Revision') }} {{ rev.id }}">{{ rev.id |truncate(35) }}</a></li> | ||
{% endblock %} | ||
|
||
{% block actions_content %} | ||
{% if c.revision_change_state_allowed %} | ||
<form | ||
method="POST" | ||
action="{{ h.url_for(controller='revision', | ||
action='edit', | ||
id=c.revision.id) }}" | ||
> | ||
<li> | ||
{% if rev.state != 'deleted' %} | ||
<button type="submit" name="action" value="delete" class="btn btn-danger"> | ||
<i class="icon-trash"></i> {{ _('Delete') }} | ||
</button> | ||
{% endif %} | ||
{% if rev.state == 'deleted' %} | ||
<button type="submit" name="action" value="undelete" class="btn btn-danger"> | ||
<i class="icon-trash"></i> | ||
{{ _('Undelete') }} | ||
</button> | ||
{% endif %} | ||
</li> | ||
</form> | ||
{% endif %} | ||
{% endblock %} | ||
|
||
{% block primary_content_inner %} | ||
<h1>{{ _('Revision') }}: {{ rev.id }}</h1> | ||
|
||
<div class="state-{{ rev.state }}"> | ||
<div class="embedded-content"> | ||
{% if rev.state != 'active' %} | ||
<p class="state-notice"> | ||
{{ rev.state }} | ||
</p> | ||
{% endif %} | ||
|
||
<p> | ||
<strong>{{ _('Author') }}:</strong> {{ h.linked_user(rev.author) }} | ||
</p> | ||
<p> | ||
<strong>{{ _('Timestamp') }}:</strong> {{ h.render_datetime(rev.timestamp, with_hours=True) }} | ||
</p> | ||
<p> | ||
<strong>{{ _('Log Message') }}:</strong> | ||
</p> | ||
<p> | ||
{{ rev.message }} | ||
</p> | ||
</div> | ||
|
||
<div class="embedded-content"> | ||
<h2>{{ _('Changes') }}</h2> | ||
<h3>{{ _('Datasets') }}</h3> | ||
<ul> | ||
{% for pkg in c.packages %} | ||
<li> | ||
{{ h.link_to(pkg.name, h.url_for(controller='package', action='read', id=pkg.name)) }} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
|
||
<h3>{{ _('Datasets\' Tags') }}</h3> | ||
<ul> | ||
{% for pkgtag in c.pkgtags %} | ||
<li> | ||
Dataset - {{ h.link_to(pkgtag.package.name, h.url_for(controller='package', action='read', id=pkgtag.package.name)) }}, | ||
Tag - {{ h.link_to(pkgtag.tag.name, h.url_for(controller='tag', action='read', id=pkgtag.tag.name)) }} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
|
||
<h3>{{ _('Groups') }}</h3> | ||
<ul> | ||
{% for group in c.groups %} | ||
<li> | ||
{{ h.link_to(group.name, h.url_for(controller='group', action='read', id=group.name)) }} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
{% 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,19 @@ | ||
{% extends "page.html" %} | ||
|
||
{% block secondary_content %} | ||
|
||
{% block secondary_help_content %}{% endblock %} | ||
|
||
{% block package_social %} | ||
{% snippet "snippets/social.html" %} | ||
{% endblock %} | ||
|
||
{% endblock %} | ||
|
||
{% block primary_content %} | ||
<article class="module prose"> | ||
<section class="module-content"> | ||
{% block primary_content_inner %}{% endblock %} | ||
</section> | ||
</article> | ||
{% endblock %} |
Oops, something went wrong.