Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/includes/vault-create-tasks.html
{% comment %} | {% comment %} | ||||
Copyright (C) 2017-2021 The Software Heritage developers | Copyright (C) 2017-2021 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 %} | {% if user.is_authenticated and user.is_staff or "swh.vault.git_bare.ui" in user.get_all_permissions %} | ||||
<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> | |||||
{% else %} | {% else %} | ||||
<button class="btn btn-default btn-sm swh-vault-download" type="button" onclick="swh.vault.vaultRequest('directory', '{{ vault_cooking.directory_swhid }}')"> | <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> | <i class="mdi mdi-download mdi-fw" aria-hidden="true"></i> | ||||
Download | Download | ||||
</button> | </button> | ||||
{% endif %} | {% endif %} | ||||
<!-- modals related to the creation of vault cooking tasks --> | <!-- modals related to the creation of vault cooking tasks --> | ||||
anlambert: You must remove that `btn-group`, only the one above is required. This is why the layout looks… | |||||
Done Inline ActionsThanks. It fixes the layout of the dropdown, but not the revision "card" vlorentz: Thanks. It fixes the layout of the dropdown, but not the revision "card" | |||||
Not Done Inline Actionsyes, because the btn-group div is not closed (missing </div>) anlambert: yes, because the `btn-group` div is not closed (missing `</div>`) | |||||
<!-- 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"> | ||||
<h6 class="modal-title" id="vault-cook-directory-modal-label">Cook and download a directory from the Software Heritage Vault</h6> | <h6 class="modal-title" id="vault-cook-directory-modal-label">Cook and download a directory from the Software Heritage Vault</h6> | ||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||||
<span aria-hidden="true">×</span> | <span aria-hidden="true">×</span> | ||||
▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines |
You must remove that btn-group, only the one above is required. This is why the layout looks weird.