mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
Fixed: force a name when downloading a document without filename
see https://gitlab.com/champs-libres/departement-de-la-vendee/accent-suivi-developpement/-/issues/1005
This commit is contained in:
parent
cc98f64be5
commit
78858e84f2
@ -166,7 +166,7 @@
|
|||||||
<div class="wl-col list">
|
<div class="wl-col list">
|
||||||
<ul>
|
<ul>
|
||||||
{% for d in activity.documents %}
|
{% for d in activity.documents %}
|
||||||
<li class="document-list-item">{{ d.title }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_ACTIVITY_UPDATE', activity), {small: true}) }}</li>
|
<li class="document-list-item">{{ d.title|chill_print_or_message('document.Any title') }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_ACTIVITY_UPDATE', activity), {small: true}) }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -170,7 +170,7 @@
|
|||||||
{% if entity.documents|length > 0 %}
|
{% if entity.documents|length > 0 %}
|
||||||
<ul>
|
<ul>
|
||||||
{% for d in entity.documents %}
|
{% for d in entity.documents %}
|
||||||
<li class="document-list-item">{{ d.title }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_ACTIVITY_UPDATE', entity), {small: true}) }}</li>
|
<li class="document-list-item">{{ d.title|chill_print_or_message('document.Any title') }} {{ d|chill_document_button_group(d.title, is_granted('CHILL_ACTIVITY_UPDATE', entity), {small: true}) }}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -38,13 +38,11 @@ async function download_and_open(event: Event): Promise<void> {
|
|||||||
button.href = window.URL.createObjectURL(raw);
|
button.href = window.URL.createObjectURL(raw);
|
||||||
button.type = props.storedObject.type;
|
button.type = props.storedObject.type;
|
||||||
|
|
||||||
if (props.filename !== undefined) {
|
button.download = props.filename || 'document';
|
||||||
button.download = props.filename || 'document';
|
|
||||||
|
|
||||||
const ext = mime.getExtension(props.storedObject.type);
|
const ext = mime.getExtension(props.storedObject.type);
|
||||||
if (null !== ext) {
|
if (null !== ext) {
|
||||||
button.download = button.download + '.' + ext;
|
button.download = button.download + '.' + ext;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,9 @@ The document is successfully registered: Le document est enregistré
|
|||||||
The document is successfully updated: Le document est mis à jour
|
The document is successfully updated: Le document est mis à jour
|
||||||
Any description: Aucune description
|
Any description: Aucune description
|
||||||
|
|
||||||
|
document:
|
||||||
|
Any title: Aucun titre
|
||||||
|
|
||||||
# delete
|
# delete
|
||||||
Delete document ?: Supprimer le document ?
|
Delete document ?: Supprimer le document ?
|
||||||
Are you sure you want to remove this document ?: Êtes-vous sûr·e de vouloir supprimer ce document ?
|
Are you sure you want to remove this document ?: Êtes-vous sûr·e de vouloir supprimer ce document ?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user