Skip to content
Snippets Groups Projects
Commit 2a1768cd authored by Antoine Lambert's avatar Antoine Lambert
Browse files

browse: Add some buttons in origin context views

  - Add a button in the top left part of origin context views to easily
    reach visits reporting view

  - Add a button in the origin visits reporting view to easily browse
    the latest snapshot
parent a9972e58
No related branches found
Tags v0.0.127
No related merge requests found
......@@ -8,12 +8,15 @@ See top-level LICENSE file for more information
<div class="card">
<div class="card-header bg-gray-light">
{% if snapshot_context.origin_info %}
<div class="float-left">
<a href="{{ snapshot_context.browse_url }}" class="btn btn-default btn-sm" role="button">See visits</a>
</div>
{% if snapshot_context.origin_info.url|slice:"0:4" == "http" %}
<div class="float-right">
<a href="{{ snapshot_context.origin_info.url }}" class="btn btn-default btn-sm" role="button">Go to origin</a>
</div>
{% endif %}
<a href="{{ snapshot_context.browse_url }}">
<a href="{% url 'browse-origin' snapshot_context.origin_info.type snapshot_context.origin_info.url %}">
<h4 class="text-center">Origin: {{ snapshot_context.origin_info.url }}</h4>
<div class="clearfix"></div>
</a>
......
......@@ -19,6 +19,9 @@ See top-level LICENSE file for more information
{% block swh-browse-before-panels %}
<div class="card">
<div class="card-header bg-gray-light border-bottom-0">
<div class="float-left">
<a href="{% url 'browse-origin' origin_info.type origin_info.url %}" class="btn btn-default btn-sm" role="button">Latest snapshot</a>
</div>
{% if origin_info.url|slice:"0:4" == "http" %}
<div class="float-right">
<a href="{{ origin_info.url }}" class="btn btn-default btn-sm" role="button">Go to origin</a>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment