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 %} | {% if snapshot_context %} | ||||
<h4> | <h4> | ||||
<i class="{{ swh_object_icons|key_value:swh_object_name.lower }} fa-fw" aria-hidden="true"></i> | <i class="{{ swh_object_icons|key_value:swh_object_name.lower }} mdi-fw" aria-hidden="true"></i> | ||||
{% if snapshot_context.origin_info %} | {% if snapshot_context.origin_info %} | ||||
Browse archived {{ swh_object_name.lower }} for origin | Browse archived {{ swh_object_name.lower }} for origin | ||||
<a href="{% url 'browse-origin' %}?origin_url={{ snapshot_context.origin_info.url }}"> | <a href="{% url 'browse-origin' %}?origin_url={{ snapshot_context.origin_info.url }}"> | ||||
{{ 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="fa fa-external-link" aria-hidden="true"></i> | <i class="mdi mdi-open-in-new" aria-hidden="true"></i> | ||||
</a> | </a> | ||||
{% endif %} | {% endif %} | ||||
{% else %} | {% else %} | ||||
Browse archived {{ swh_object_name.lower }} for snapshot | Browse archived {{ swh_object_name.lower }} for snapshot | ||||
<a href="{% url 'browse-swh-id' snapshot_context.snapshot_swhid %}"> | <a href="{% url 'browse-swh-id' snapshot_context.snapshot_swhid %}"> | ||||
{{ snapshot_context.snapshot_swhid }} | {{ snapshot_context.snapshot_swhid }} | ||||
</a> | </a> | ||||
{% endif %} | {% endif %} | ||||
</h4> | </h4> | ||||
{% else %} | {% else %} | ||||
<h4> | <h4> | ||||
<i class="{{ swh_object_icons|key_value:swh_object_name.lower }} fa-fw" aria-hidden="true"></i> | <i class="{{ swh_object_icons|key_value:swh_object_name.lower }} mdi-fw" aria-hidden="true"></i> | ||||
Browse archived {{ swh_object_name.lower }} | Browse archived {{ swh_object_name.lower }} | ||||
<a href="{% url 'browse-swh-id' swh_object_id %}"> | <a href="{% url 'browse-swh-id' swh_object_id %}"> | ||||
{{ swh_object_id }} | {{ swh_object_id }} | ||||
</a> | </a> | ||||
</h4> | </h4> | ||||
{% endif %} | {% endif %} | ||||
{% endblock %} | {% endblock %} | ||||
Show All 17 Lines |