Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/top-navigation.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 %} | ||||
<div class="swh-browse-top-navigation d-flex align-items-start justify-content-between flex-wrap mt-1"> | <div class="swh-browse-top-navigation d-flex align-items-start justify-content-between flex-wrap mt-1"> | ||||
{% if snapshot_context %} | {% if snapshot_context %} | ||||
{% if snapshot_context.branch or snapshot_context.release %} | {% if snapshot_context.branch or snapshot_context.release or snapshot_context.revision_id %} | ||||
<div class="dropdown" id="swh-branches-releases-dd"> | <div class="dropdown" id="swh-branches-releases-dd"> | ||||
<button class="btn btn-block btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown"> | <button class="btn btn-block btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown"> | ||||
{% if snapshot_context.branch %} | {% if snapshot_context.branch %} | ||||
{% if snapshot_context.branch_alias %} | {% if snapshot_context.branch_alias %} | ||||
<i class="{{ swh_object_icons.alias }} mdi-fw" aria-hidden="true"></i> | <i class="{{ swh_object_icons.alias }} mdi-fw" aria-hidden="true"></i> | ||||
{% else %} | {% else %} | ||||
<i class="{{ swh_object_icons.branch }} mdi-fw" aria-hidden="true"></i> | <i class="{{ swh_object_icons.branch }} mdi-fw" aria-hidden="true"></i> | ||||
{% endif %} | {% endif %} | ||||
Branch: <strong>{{ snapshot_context.branch }}</strong> | Branch: <strong>{{ snapshot_context.branch }}</strong> | ||||
{% else %} | {% elif snapshot_context.release %} | ||||
{% if snapshot_context.release_alias %} | {% if snapshot_context.release_alias %} | ||||
<i class="{{ swh_object_icons.alias }} mdi-fw" aria-hidden="true"></i> | <i class="{{ swh_object_icons.alias }} mdi-fw" aria-hidden="true"></i> | ||||
{% else %} | {% else %} | ||||
<i class="{{ swh_object_icons.release }} mdi-fw" aria-hidden="true"></i> | <i class="{{ swh_object_icons.release }} mdi-fw" aria-hidden="true"></i> | ||||
{% endif %} | {% endif %} | ||||
Release: <strong>{{ snapshot_context.release }}</strong> | Release: <strong>{{ snapshot_context.release }}</strong> | ||||
{% elif snapshot_context.revision_id %} | |||||
Revision: <strong>{{ snapshot_context.revision_id }}</strong> | |||||
{% endif %} | {% endif %} | ||||
<span class="caret"></span> | <span class="caret"></span> | ||||
</button> | </button> | ||||
<ul class="scrollable-menu dropdown-menu swh-branches-releases"> | <ul class="scrollable-menu dropdown-menu swh-branches-releases"> | ||||
<ul class="nav nav-tabs"> | <ul class="nav nav-tabs"> | ||||
<li class="nav-item"><a class="nav-link active swh-branches-switch" data-toggle="tab">Branches</a></li> | <li class="nav-item"><a class="nav-link active swh-branches-switch" data-toggle="tab">Branches</a></li> | ||||
<li class="nav-item"><a class="nav-link swh-releases-switch" data-toggle="tab">Releases</a></li> | <li class="nav-item"><a class="nav-link swh-releases-switch" data-toggle="tab">Releases</a></li> | ||||
</ul> | </ul> | ||||
▲ Show 20 Lines • Show All 115 Lines • Show Last 20 Lines |