Quellcode durchsuchen

fix(documents): ajoute un bouton 'supprimer' pour les utilisateurs connectés

feat/documents
Antoine vor 4 Monaten
Ursprung
Commit
3d656216a7
4 geänderte Dateien mit 13 neuen und 1 gelöschten Zeilen
  1. +1
    -0
      assets/scss/app.scss
  2. +8
    -0
      assets/scss/components/_buttons.scss
  3. +1
    -1
      ess62_plateforme/templates/documents/document_list.html
  4. +3
    -0
      ess62_plateforme/templates/documents/inc/document_element.html

+ 1
- 0
assets/scss/app.scss Datei anzeigen

@@ -12,6 +12,7 @@

// composants
@import "components/forms";
@import "components/buttons";

// pages
@import "pages/events";


+ 8
- 0
assets/scss/components/_buttons.scss Datei anzeigen

@@ -0,0 +1,8 @@
.btn-holder {
position: relative;
.btn-delete {
position: absolute;
top: -12px;
right: -12px;
}
}

+ 1
- 1
ess62_plateforme/templates/documents/document_list.html Datei anzeigen

@@ -32,7 +32,7 @@
{% if document_list %}
<div class="d-flex flex-wrap">
{% for document in document_list %}
<div class="mb-2 mr-2">
<div class="btn-holder mb-2 mr-3">
{% include "./inc/document_element.html" %}
</div>
{% endfor %}


+ 3
- 0
ess62_plateforme/templates/documents/inc/document_element.html Datei anzeigen

@@ -2,3 +2,6 @@
<i class="fa fa-file mr-2" aria-hidden="true"></i>
{{ document.name }}
</a>
{% if request.user.is_authenticated %}
<a href={% url "documents:delete" document.pk %} class="text-danger btn-delete" aria-label="Supprimer le document {{ document.name }}"><i class="fa fa-times-circle" aria-label="true"></i></a>
{% endif %}

Laden…
Abbrechen
Speichern