Skip to content

Commit 419c994

Browse files
committed
Allow upload on archives
1 parent 17e7532 commit 419c994

2 files changed

Lines changed: 19 additions & 13 deletions

File tree

catalog/templates/catalog/course.html

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,17 @@ <h1 class="d-flex align-items-center gap-2">
2222
<p>Ce cours ne fait plus partie du programme de l'ULB, il est gardé ici uniquement pour des raisons
2323
historiques.</p>
2424
{% endif %}
25-
{% if not course.is_archive %}
26-
<a class="btn btn-outline-success btn-sm d-inline-flex align-items-center gap-1"
27-
href="{% url 'document_put' course.slug %}">
28-
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
29-
class="bi bi-file-earmark-plus" viewBox="0 0 16 16">
30-
<path
31-
d="M8 6.5a.5.5 0 0 1 .5.5v1.5H10a.5.5 0 0 1 0 1H8.5V11a.5.5 0 0 1-1 0V9.5H6a.5.5 0 0 1 0-1h1.5V7a.5.5 0 0 1 .5-.5z"/>
32-
<path
33-
d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z"/>
34-
</svg>
35-
<span>Partager un document</span>
36-
</a>
37-
{% endif %}
25+
<a class="btn btn-outline-success btn-sm d-inline-flex align-items-center gap-1"
26+
href="{% url 'document_put' course.slug %}">
27+
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"
28+
class="bi bi-file-earmark-plus" viewBox="0 0 16 16">
29+
<path
30+
d="M8 6.5a.5.5 0 0 1 .5.5v1.5H10a.5.5 0 0 1 0 1H8.5V11a.5.5 0 0 1-1 0V9.5H6a.5.5 0 0 1 0-1h1.5V7a.5.5 0 0 1 .5-.5z"/>
31+
<path
32+
d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5L14 4.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5h-2z"/>
33+
</svg>
34+
<span>Partager un document</span>
35+
</a>
3836
{% if following %}
3937
<turbo-frame id="favorite">
4038
<form method="POST" action="{% url 'catalog:leave_course' course.slug %}" class="d-inline">

documents/templates/documents/document_upload.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@
3939
</svg>
4040
<span class="hover-underline">{{ course.slug|upper }} {{ course.name }}</span>
4141
</a>
42+
{% if course.is_archive %}
43+
<div class="alert alert-primary">
44+
Ce cours ne fait plus partie du programme de l'ULB, il est gardé uniquement pour des raisons
45+
historiques. <br/>
46+
Tu peux continuer à y uploader des documents, mais si possible, essaie plutôt de les y mettre
47+
dans le cours qui est actuellement enseigné.
48+
</div>
49+
{% endif %}
4250
<form
4351
action="{% url 'document_put' course.slug %}"
4452
method="post" enctype="multipart/form-data"

0 commit comments

Comments
 (0)