Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/vault-create-tasks.html
{% comment %} | {% comment %} | ||||
Copyright (C) 2017-2022 The Software Heritage developers | Copyright (C) 2017-2022 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 %} | ||||
{% if vault_cooking %} | {% if vault_cooking %} | ||||
{% if user.is_authenticated and user.is_staff or "swh.vault.git_bare.ui" in user.get_all_permissions %} | |||||
<div class="btn-group"> | <div class="btn-group"> | ||||
<button class="btn btn-default btn-sm dropdown-toggle swh-vault-download" type="button" data-toggle="dropdown"> | <button class="btn btn-default btn-sm dropdown-toggle swh-vault-download" type="button" data-toggle="dropdown"> | ||||
<i class="mdi mdi-download mdi-fw" aria-hidden="true"></i> | <i class="mdi mdi-download mdi-fw" aria-hidden="true"></i> | ||||
Download | Download | ||||
</button> | </button> | ||||
<div class="dropdown-menu swh-vault-menu"> | <div class="dropdown-menu swh-vault-menu"> | ||||
{% if vault_cooking.directory_context %} | {% if vault_cooking.directory_context %} | ||||
<button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')"> | <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')"> | ||||
<i class="{{ swh_object_icons.directory }} mdi-fw" aria-hidden="true"></i> | <i class="{{ swh_object_icons.directory }} mdi-fw" aria-hidden="true"></i> | ||||
as tarball | as tarball | ||||
</button> | </button> | ||||
{% endif %} | {% endif %} | ||||
{% if vault_cooking.revision_context %} | {% if vault_cooking.revision_context %} | ||||
<button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('revision', '{{ vault_cooking.revision_swhid }}')"> | <button class="dropdown-item" type="button" tabindex="-1" onclick="swh.vault.vaultRequest('revision', '{{ vault_cooking.revision_swhid }}')"> | ||||
<i class="{{ swh_object_icons.revision }} mdi-fw" aria-hidden="true"></i> | <i class="{{ swh_object_icons.revision }} mdi-fw" aria-hidden="true"></i> | ||||
as git | as git | ||||
</button> | </button> | ||||
{% endif %} | {% endif %} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{% else %} | |||||
<button class="btn btn-default btn-sm swh-vault-download" type="button" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')"> | |||||
<i class="mdi mdi-download mdi-fw" aria-hidden="true"></i> | |||||
Download | |||||
</button> | |||||
{% endif %} | |||||
<!-- modals related to the creation of vault cooking tasks --> | <!-- modals related to the creation of vault cooking tasks --> | ||||
<!-- they will be reparented in the script below in order to be able to display them --> | <!-- they will be reparented in the script below in order to be able to display them --> | ||||
<div class="modal fade" id="vault-cook-directory-modal" tabindex="-1" role="dialog" aria-labelledby="vault-cook-directory-modal-label" aria-hidden="true"> | <div class="modal fade" id="vault-cook-directory-modal" tabindex="-1" role="dialog" aria-labelledby="vault-cook-directory-modal-label" aria-hidden="true"> | ||||
<div class="modal-dialog"> | <div class="modal-dialog"> | ||||
<div class="modal-content"> | <div class="modal-content"> | ||||
<div class="modal-header"> | <div class="modal-header"> | ||||
▲ Show 20 Lines • Show All 132 Lines • Show Last 20 Lines |