Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/browse/browse.html
{% extends "./layout.html" %} | {% extends "./layout.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 %} | ||||
{% block title %}{{ heading }} – Software Heritage archive{% endblock %} | {% block title %}{{ heading }} – Software Heritage archive{% endblock %} | ||||
{% block navbar-content %} | {% block navbar-content %} | ||||
{% if snapshot_context %} | |||||
<h4> | <h4> | ||||
<i class="{{ swh_object_icons|key_value:swh_object_name.lower }} mdi-fw" aria-hidden="true"></i> | Browse the archive | ||||
{% if snapshot_context.origin_info %} | |||||
Browse archived {{ swh_object_name.lower }} for origin | |||||
<a href="{% url 'browse-origin' %}?origin_url={{ snapshot_context.origin_info.url }}"> | |||||
{{ snapshot_context.origin_info.url }} | |||||
</a> | |||||
{% if snapshot_context.origin_info.url|slice:"0:4" == "http" %} | |||||
<a href="{{ snapshot_context.origin_info.url }}" title="Go to origin"> | |||||
<i class="mdi mdi-open-in-new" aria-hidden="true"></i> | |||||
</a> | |||||
{% endif %} | |||||
{% else %} | |||||
Browse archived {{ swh_object_name.lower }} for snapshot | |||||
<a href="{% url 'browse-swh-id' snapshot_context.snapshot_swhid %}"> | |||||
{{ snapshot_context.snapshot_swhid }} | |||||
</a> | |||||
{% endif %} | |||||
</h4> | </h4> | ||||
{% else %} | |||||
<h4> | |||||
<i class="{{ swh_object_icons|key_value:swh_object_name.lower }} mdi-fw" aria-hidden="true"></i> | |||||
Browse archived {{ swh_object_name.lower }} | |||||
<a href="{% url 'browse-swh-id' swh_object_id %}"> | |||||
{{ swh_object_id }} | |||||
</a> | |||||
</h4> | |||||
{% endif %} | |||||
{% endblock %} | {% endblock %} | ||||
{% block browse-content %} | {% block browse-content %} | ||||
{% block swh-browse-before-content %} | {% block swh-browse-before-content %} | ||||
{% if snapshot_context %} | {% if snapshot_context %} | ||||
{% include "includes/snapshot-context.html" %} | {% include "includes/snapshot-context.html" %} | ||||
Show All 12 Lines |