Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/browse/revision-log.html
Show All 17 Lines | |||||
{% block swh-browse-content %} | {% block swh-browse-content %} | ||||
{% if snapshot_context %} | {% if snapshot_context %} | ||||
{% include "includes/top-navigation.html" %} | {% include "includes/top-navigation.html" %} | ||||
{% endif %} | {% endif %} | ||||
{% if snapshot_context and snapshot_context.is_empty %} | {% if snapshot_context and snapshot_context.is_empty %} | ||||
{% include "includes/empty-snapshot.html" %} | {% include "includes/empty-snapshot.html" %} | ||||
{% else %} | {% else %} | ||||
<hr class="mt-0 mb-0"> | |||||
<div class="text-center"> | |||||
<div class="form-check form-check-inline" title="Display revisions in reverse chronological order of their commit date"> | |||||
<input class="form-check-input" type="radio" name="revs-ordering" id="revs-ordering-date" | |||||
value="" onclick="swh.revision.revsOrderingTypeClicked(event)" checked> | |||||
<label class="form-check-label active" for="revs-ordering-date">Commit date ordering</label> | |||||
</div> | |||||
<div class="form-check form-check-inline" title="Display revisions in the same order they are visited when performing a depth-first search in pre order on the revisions DAG"> | |||||
<input class="form-check-input" type="radio" name="revs-ordering" id="revs-ordering-dfs" | |||||
value="dfs" onclick="swh.revision.revsOrderingTypeClicked(event)"> | |||||
<label class="form-check-label" for="revs-ordering-dfs">DFS ordering</label> | |||||
</div> | |||||
<div class="form-check form-check-inline" title="Display revisions in the same order they are visited when performing a depth-first search in post order on the revisions DAG"> | |||||
<input class="form-check-input" type="radio" name="revs-ordering" id="revs-ordering-dfs-post" | |||||
value="dfs_post" onclick="swh.revision.revsOrderingTypeClicked(event)"> | |||||
<label class="form-check-label" for="revs-ordering-dfs-post">DFS post ordering</label> | |||||
</div> | |||||
<div class="form-check form-check-inline" title="Display revisions in the same order they are visited when performing a breadth-first search on the revisions DAG"> | |||||
<input class="form-check-input" type="radio" name="revs-ordering" id="revs-ordering-bfs" | |||||
value="bfs" onclick="swh.revision.revsOrderingTypeClicked(event)"> | |||||
<label class="form-check-label" for="revs-ordering-bfs">BFS ordering</label> | |||||
</div> | |||||
</div> | |||||
<div class="table-responsive mb-3"> | <div class="table-responsive mb-3"> | ||||
<table class="table swh-table swh-table-striped"> | <table class="table swh-table swh-table-striped"> | ||||
<thead> | <thead> | ||||
<tr> | <tr> | ||||
<th><i class="{{ swh_object_icons.revision }} fa-fw"></i>Revision</th> | <th><i class="{{ swh_object_icons.revision }} fa-fw"></i>Revision</th> | ||||
<th>Author</th> | <th>Author</th> | ||||
<th>Message</th> | |||||
<th>Date</th> | <th>Date</th> | ||||
<th></th> | <th>Message</th> | ||||
<th>Commit Date</th> | |||||
</tr> | </tr> | ||||
</thead> | </thead> | ||||
<tbody> | <tbody> | ||||
{% for log in revision_log %} | {% for rev in revision_log %} | ||||
<tr class="swh-revision-log-entry"> | <tr class="swh-revision-log-entry" data-href="{{ rev.url }}" title="{{ rev.tooltip }}"> | ||||
<td class="swh-revision-log-entry-id"><i class="{{ swh_object_icons.revision }} fa-fw"></i>{{ log.revision }}</td> | <td class="swh-revision-log-entry-id"> | ||||
<td class="swh-revision-log-entry-author">{{ log.author }}</td> | <a href="{{ rev.url }}"> | ||||
<td class="swh-log-entry-message swh-table-cell-text-overflow" title="{{ log.message }}">{{ log.message }}</td> | <i class="{{ swh_object_icons|key_value:'revision' }} fa-fw"></i>{{ rev.id }} | ||||
<td class="swh-revision-log-entry-date">{{ log.date }}</td> | </a> | ||||
<td>{{ log.directory }}</td> | </td> | ||||
<td class="swh-revision-log-entry-author"> | |||||
<a href="{{ rev.url }}"> | |||||
{{ rev.author }} | |||||
</a> | |||||
</td> | |||||
<td class="swh-revision-log-entry-date"> | |||||
<a href="{{ rev.url }}"> | |||||
{{ rev.date }} | |||||
</a> | |||||
</td> | |||||
<td class="swh-log-entry-message swh-table-cell-text-overflow"> | |||||
<a href="{{ rev.url }}"> | |||||
{{ rev.message }} | |||||
</a> | |||||
</td> | |||||
<td class="swh-revision-log-entry-commit-date"> | |||||
<a href="{{ rev.url }}"> | |||||
{{ rev.commit_date }} | |||||
</a> | |||||
</td> | |||||
</tr> | </tr> | ||||
{% endfor %} | {% endfor %} | ||||
</tbody> | </tbody> | ||||
</table> | </table> | ||||
</div> | </div> | ||||
<script> | |||||
swh.revision.initRevisionsLog(); | |||||
</script> | |||||
{% endif %} | {% endif %} | ||||
{% endblock %} | {% endblock %} | ||||
{% block swh-browse-after-content %} | {% block swh-browse-after-content %} | ||||
{% if not snapshot_context or not snapshot_context.is_empty %} | {% if not snapshot_context or not snapshot_context.is_empty %} | ||||
<ul class="pagination justify-content-center"> | <ul class="pagination justify-content-center"> | ||||
{% if next_log_url %} | {% if next_log_url %} | ||||
<li class="page-item"><a class="page-link" href="{{ next_log_url }}">Newer</a></li> | <li class="page-item"> | ||||
<a class="page-link" href="{{ next_log_url }}">{% if revs_ordering %}Previous{% else %}Newer{% endif %}</a> | |||||
</li> | |||||
{% else %} | {% else %} | ||||
<li class="page-item disabled"><a class="page-link">Newer</a></li> | <li class="page-item disabled"> | ||||
<a class="page-link">{% if revs_ordering %}Previous{% else %}Newer{% endif %}</a> | |||||
</li> | |||||
{% endif %} | {% endif %} | ||||
{% if prev_log_url %} | {% if prev_log_url %} | ||||
<li class="page-item"><a class="page-link" href="{{ prev_log_url }}">Older</a></li> | <li class="page-item"> | ||||
<a class="page-link" href="{{ prev_log_url }}">{% if revs_ordering %}Next{% else %}Older{% endif %}</a> | |||||
</li> | |||||
{% else %} | {% else %} | ||||
<li class="page-item disabled"><a class="page-link">Older</a></li> | <li class="page-item disabled"> | ||||
<a class="page-link">{% if revs_ordering %}Next{% else %}Older{% endif %}</a> | |||||
</li> | |||||
{% endif %} | {% endif %} | ||||
</ul> | </ul> | ||||
{% endif %} | {% endif %} | ||||
{% endblock %} | {% endblock %} |