Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/snapshot-context.html
{% comment %} | {% comment %} | ||||
Copyright (C) 2017-2020 The Software Heritage developers | Copyright (C) 2017-2020 The Software Heritage developers | ||||
See the AUTHORS file at the top-level directory of this distribution | See the AUTHORS file at the top-level directory of this distribution | ||||
License: GNU Affero General Public License version 3, or any later version | License: GNU Affero General Public License version 3, or any later version | ||||
See top-level LICENSE file for more information | See top-level LICENSE file for more information | ||||
{% endcomment %} | {% endcomment %} | ||||
{% load swh_templatetags %} | {% load swh_templatetags %} | ||||
<h5> | <h5> | ||||
{% if snapshot_context.origin_info %} | {% if snapshot_context.origin_info %} | ||||
<i class="{{ swh_object_icons.origin }} mdi-fw" aria-hidden="true" title="Origin"></i> | <i class="{{ swh_object_icons.origin }} mdi-fw" aria-hidden="true" title="Origin"></i> | ||||
<a class="swh-heading-color" href="{% url 'browse-origin' %}?origin_url={{ snapshot_context.origin_info.url }}"> | <a class="swh-heading-color" href="{% url 'browse-origin' %}?origin_url={{ snapshot_context.origin_info.url|urlencode:"/?:@&" }}"> | ||||
{{ snapshot_context.origin_info.url }} | {{ snapshot_context.origin_info.url }} | ||||
</a> | </a> | ||||
{% if snapshot_context.origin_info.url|slice:"0:4" == "http" %} | {% if snapshot_context.origin_info.url|slice:"0:4" == "http" %} | ||||
<a href="{{ snapshot_context.origin_info.url }}" title="Go to origin"> | <a href="{{ snapshot_context.origin_info.url }}" title="Go to origin"> | ||||
<i class="mdi mdi-open-in-new" aria-hidden="true"></i> | <i class="mdi mdi-open-in-new" aria-hidden="true"></i> | ||||
</a> | </a> | ||||
{% endif %} | {% endif %} | ||||
{% else %} | {% else %} | ||||
▲ Show 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | <li class="nav-item"> | ||||
</a> | </a> | ||||
</li> | </li> | ||||
{% endif %} | {% endif %} | ||||
</ul> | </ul> | ||||
<script> | <script> | ||||
swh.browse.initBrowseNavbar(); | swh.browse.initBrowseNavbar(); | ||||
</script> | </script> | ||||
No newline at end of file | No newline at end of file |