mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-22 15:43:51 +00:00
Refactor display document duplication button and add translations
- Add new translations for document duplication and replacement options - Adjust order of list elements in `DocumentsList.vue` for better readability
This commit is contained in:
@@ -4,6 +4,7 @@ import { StoredObject, StoredObjectVersion } from "../../types";
|
||||
import DropFileWidget from "ChillDocStoreAssets/vuejs/DropFileWidget/DropFileWidget.vue";
|
||||
import { computed, reactive } from "vue";
|
||||
import { useToast } from "vue-toast-notification";
|
||||
import { DOCUMENT_REPLACE, DOCUMENT_ADD, trans } from "translator";
|
||||
|
||||
interface DropFileConfig {
|
||||
allowRemove: boolean;
|
||||
@@ -72,10 +73,10 @@ function closeModal(): void {
|
||||
@click="openModal"
|
||||
class="btn btn-create"
|
||||
>
|
||||
Ajouter un document
|
||||
{{ trans(DOCUMENT_ADD ) }}
|
||||
</button>
|
||||
<button v-else @click="openModal" class="btn btn-edit">
|
||||
Remplacer le document
|
||||
{{ trans(DOCUMENT_REPLACE) }}
|
||||
</button>
|
||||
<modal
|
||||
v-if="state.showModal"
|
||||
|
@@ -23,6 +23,8 @@ See the document: Voir le document
|
||||
|
||||
document:
|
||||
Any title: Aucun titre
|
||||
replace: Remplacer
|
||||
Add: Ajouter un document
|
||||
|
||||
generic_doc:
|
||||
filter:
|
||||
|
@@ -107,6 +107,34 @@
|
||||
"
|
||||
></document-action-buttons-group>
|
||||
</li>
|
||||
<li v-if="Number.isInteger(d.id)">
|
||||
<div class="duplicate-dropdown">
|
||||
<button
|
||||
class="btn btn-duplicate dropdown-toggle"
|
||||
type="button"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-expanded="false"
|
||||
>
|
||||
{{ trans(EVALUATION_DOCUMENT_DUPLICATE) }}
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
@click="$emit('duplicateDocument', d)"
|
||||
>{{ trans(EVALUATION_DOCUMENT_DUPLICATE_HERE) }}</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
@click="prepareDocumentDuplicationToWork(d)"
|
||||
>{{ trans(EVALUATION_DOCUMENT_DUPLICATE_TO_OTHER_WORK) }}</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<li v-if="d.storedObject._permissions.canEdit">
|
||||
<drop-file-modal
|
||||
:existing-doc="d.storedObject"
|
||||
@@ -126,34 +154,6 @@
|
||||
<a class="btn btn-delete" @click="$emit('removeDocument', d)">
|
||||
</a>
|
||||
</li>
|
||||
<li v-if="Number.isInteger(d.id)">
|
||||
<div class="duplicate-dropdown">
|
||||
<button
|
||||
class="btn btn-duplicate dropdown-toggle"
|
||||
type="button"
|
||||
data-bs-toggle="dropdown"
|
||||
aria-expanded="false"
|
||||
>
|
||||
Dupliquer
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
@click="$emit('duplicateDocument', d)"
|
||||
>Dupliquer ici</a
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<a
|
||||
class="dropdown-item"
|
||||
@click="prepareDocumentDuplicationToWork(d)"
|
||||
>Dupliquer vers un autre actions d'accompagnement</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -181,6 +181,9 @@ import {
|
||||
EVALUATION_NOTIFICATION_NOTIFY_ANY,
|
||||
EVALUATION_NOTIFICATION_SEND,
|
||||
EVALUATION_DOCUMENTS,
|
||||
EVALUATION_DOCUMENT_DUPLICATE,
|
||||
EVALUATION_DOCUMENT_DUPLICATE_HERE,
|
||||
EVALUATION_DOCUMENT_DUPLICATE_TO_OTHER_WORK,
|
||||
trans,
|
||||
} from "translator";
|
||||
import { ref, watch } from "vue";
|
||||
|
@@ -772,6 +772,10 @@ evaluation:
|
||||
notification_notify_referrer: Notifier le référent
|
||||
notification_notify_any: Notifier d'autres utilisateurs
|
||||
notification_send: Envoyer une notification
|
||||
document:
|
||||
duplicate: Dupliquer
|
||||
duplicate_here: Dupliquer ici
|
||||
duplicate_to_other_work: Dupliquer vers un autre actions d'accompagnement
|
||||
|
||||
|
||||
goal:
|
||||
|
Reference in New Issue
Block a user