Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/top-navigation.html
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | <div class="btn-group swh-actions-dropdown ml-auto"> | ||||
{% include "includes/take-new-snapshot.html" %} | {% include "includes/take-new-snapshot.html" %} | ||||
{% if user.is_staff %} | {% if user.is_staff %} | ||||
{% include "includes/show-metadata.html" %} | {% include "includes/show-metadata.html" %} | ||||
{% endif %} | {% endif %} | ||||
{% endif %} | {% endif %} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{% include "includes/show-swh-ids.html" %} | {% include "includes/show-swhids.html" %} | ||||
<script> | <script> | ||||
var snapshotContext = false; | var snapshotContext = false; | ||||
var branch = false; | var branch = false; | ||||
{% if snapshot_context %} | {% if snapshot_context %} | ||||
snapshotContext = true; | snapshotContext = true; | ||||
branch = "{{ snapshot_context.branch|escape }}"; | branch = "{{ snapshot_context.branch|escape }}"; | ||||
{% endif %} | {% endif %} | ||||
{% if available_languages %} | {% if available_languages %} | ||||
$(".chosen-select").val("{{ language }}"); | $(".chosen-select").val("{{ language }}"); | ||||
$(".chosen-select").chosen().change(function(event, params) { | $(".chosen-select").chosen().change(function(event, params) { | ||||
updateLanguage(params.selected); | updateLanguage(params.selected); | ||||
}); | }); | ||||
{% endif %} | {% endif %} | ||||
swh.browse.initSnapshotNavigation(snapshotContext, branch !== "None"); | swh.browse.initSnapshotNavigation(snapshotContext, branch !== "None"); | ||||
</script> | </script> |