Skip to content

Commit

Permalink
chg: [object-versioning] added a button to go to the list of versions…
Browse files Browse the repository at this point in the history
… of an object
  • Loading branch information
cedricbonhomme committed Jul 29, 2021
1 parent eebbec3 commit de24538
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions mosp/templates/view_diff.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@
{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="row">
<div class="col">
<a role="button" class="btn btn-secondary" title="{{ _('Previous versions') }}" aria-label="{{ _('Previous versions') }}" href="{{ url_for('object_bp.list_versions', object_id=object_id) }}">
Previous versions
</a>
<br /><br />
</div>
</div>
<div class="row">
<div class="col-md-6">
<b>Date</b>: {{ before.last_updated | datetime }}
Expand Down
6 changes: 5 additions & 1 deletion mosp/views/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,11 @@ def get_diff(object_id=None, before=None, after=None):
table = objects_utils.generate_diff(version_before, version_after)

return render_template(
"view_diff.html", diff_table=table, before=version_before, after=version_after
"view_diff.html",
object_id=object_id,
diff_table=table,
before=version_before,
after=version_after,
)


Expand Down

0 comments on commit de24538

Please sign in to comment.