diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties
index d18cef21d..72cc3c295 100644
--- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties
+++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_en.properties
@@ -164,6 +164,7 @@ notes.filter.label.published.notes=Published
notes.filter.label.drafts=Drafts
notes.label.translations=Translation:
notes.label.translation.add=Add a new translation:
+notes.label.addTheTranslation=Add the translation
notes.label.chooseLangage=Choose language
notes.label.translation.originalVersion=Original version
notes.label.noTranslations=No translation
diff --git a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties
index 4edfddf18..80921a2e2 100644
--- a/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties
+++ b/notes-webapp/src/main/resources/locale/portlet/notes/notesPortlet_fr.properties
@@ -166,6 +166,7 @@ notes.filter.label.drafts=Brouillons
notes.label.translations=Translation:
notes.label.translation.add=Ajouter une translation:
+notes.label.addTheTranslation=Ajouter la translation
notes.label.chooseLangage=Choisir une langue
notes.label.translation.originalVersion=Version originale
notes.label.noTranslations=Pas de translation
diff --git a/notes-webapp/src/main/webapp/skin/less/notes/notes.less b/notes-webapp/src/main/webapp/skin/less/notes/notes.less
index e55043c10..f39bf4082 100644
--- a/notes-webapp/src/main/webapp/skin/less/notes/notes.less
+++ b/notes-webapp/src/main/webapp/skin/less/notes/notes.less
@@ -1150,13 +1150,9 @@ ul.note-manual-child {
color: @primaryColor !important;
}
-.left-separator {
- border-left: solid;
-}
-
-
-.right-separator {
- border-right: solid;
+.bar-separator {
+ border-right: solid 2px @greyColor;
+ height: 26px;
}
diff --git a/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue b/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue
index 23ab5eba9..656833b75 100644
--- a/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue
+++ b/notes-webapp/src/main/webapp/vue-app/notes-editor/components/NotesEditorDashboard.vue
@@ -24,9 +24,10 @@
{{ noteFormTitle }}
fa-language
@@ -71,7 +72,9 @@
+ :note="note"
+ :languages="languages"
+ :translations="translations" />
+
+
+
+ fa-arrow-left
+
+
+ {{ $t('notes.label.button.back') }}
+
+
+
{{ $t('notes.label.translation.originalVersion') }}
-
{{ $t('notes.label.translations') }}
-
{{ $t('notes.label.noTranslations') }}
+
{{ $t('notes.label.translations') }}
+
{{ $t('notes.label.noTranslations') }}
+ class="my-auto mx-1">
{{ translation.text }}
@@ -49,11 +59,11 @@
width="32"
fab
depressed
+ class="my-1"
v-bind="attrs"
v-on="on">
+{{ moreTranslations.length }}
@@ -63,7 +73,7 @@
@@ -81,9 +91,10 @@
small
:outlined="item.value!==selectedTranslation.value"
color="primary"
+ close-label="translation remove button"
@click:close="removeTranslation(item)"
@click="changeTranslation(item)"
- class="ma-2">
+ class="my-auto mx-1">
{{ item.text }}
@@ -91,6 +102,7 @@
+
{{ $t('notes.label.translation.add') }}
-
- fa-plus
-
+
+
+
+ fa-plus
+
+
+ {{ $t('notes.label.addTheTranslation') }}
+
@@ -121,17 +142,23 @@ export default {
type: Object,
default: () => null,
},
+ translations: {
+ type: Object,
+ default: () => null,
+ },
+ languages: {
+ type: Object,
+ default: () => null,
+ },
},
data: () => ({
moreTranslationsMenu: false,
showTranslationbar: false,
- languages: [],
selectedLang: {},
selectedTranslation: {value: ''},
displayActionMenu: true,
noteLanguages: [],
- translations: null,
}),
mounted() {
@@ -141,9 +168,6 @@ export default {
},
- created() {
- this.getAvailableLanguages();
- },
computed: {
moreTranslations(){
@@ -177,10 +201,9 @@ export default {
this.$root.$emit('hide-translations');
},
add(){
- this.translations.unshift(this.selectedLang);
+ this.$root.$emit('add-translation', this.selectedLang);
this.selectedTranslation=this.selectedLang;
this.languages = this.languages.filter(item => item.value !== this.selectedLang.value);
- this.$root.$emit('add-translation', this.selectedLang.value);
this.selectedLang={value: '',text: this.$t('notes.label.chooseLangage')};
},
@@ -192,27 +215,6 @@ export default {
this.selectedTranslation=translation;
this.$root.$emit('lang-translation-changed', this.selectedTranslation.value);
},
- getAvailableLanguages(){
- return this.$notesService.getAvailableLanguages().then(data => {
- this.languages = data || [];
- this.languages.unshift({value: '',text: this.$t('notes.label.chooseLangage')});
- if (this.translations){
- this.languages = this.languages.filter(item1 => !this.translations.some(item2 => item2.value === item1.value));
- }
- });
- },
- getNoteLanguages(){
- return this.$notesService.getNoteLanguages(this.noteId).then(data => {
- this.translations = data || [];
- if (this.translations.length>0) {
- this.translations = this.languages.filter(item1 => this.translations.some(item2 => item2 === item1.value));
- this.languages = this.languages.filter(item1 => !this.translations.some(item2 => item2.value === item1.value));
- }
- if (this.isMobile) {
- this.translations.unshift({value: '',text: this.$t('notes.label.translation.originalVersion')});
- }
- });
- },
removeTranslation(translation){
return this.$notesService.deleteNoteTranslation(this.noteId,translation.value).then(() => {
this.translations=this.translations.filter(item => item.value !== translation.value);