diff --git a/ayanova/devdocs/todo.txt b/ayanova/devdocs/todo.txt index 9e13fba7..40809e87 100644 --- a/ayanova/devdocs/todo.txt +++ b/ayanova/devdocs/todo.txt @@ -5,13 +5,14 @@ PRIORITY - ALWAYS Lowest level stuff first, i.e. TODO at server, api route chang -todo: Administration - translation - +todo: Administration - translation - Replace function + Search and replace - Export function (download as file I guess) - - Import function + On Translation editor form + - Import function + On Translations list form -todo: Translation - check can't delete in use translation todo: help links for User, Users, Translations, Translation diff --git a/ayanova/src/views/adm-translation.vue b/ayanova/src/views/adm-translation.vue index 49125f4d..b9079580 100644 --- a/ayanova/src/views/adm-translation.vue +++ b/ayanova/src/views/adm-translation.vue @@ -2,6 +2,41 @@ + + + + + {{ $ay.t("FindAndReplace") }} + + + + + + + + bind find and replace to fields so is sticky + add OK button bound method to do the replace + + + + + + + + + {{ + $ay.t("Cancel") + }} + {{ + $ay.t("OK") + }} + + + + @@ -170,6 +205,7 @@ export default { return { formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY, search: "", + replaceDialog: false, editingActiveTranslation: false, obj: {}, formState: { @@ -449,6 +485,9 @@ async function clickHandler(menuItem) { case "save": m.vm.submit(); break; + case "replace": + m.vm.replaceDialog = true; + break; case "delete": m.vm.remove(); break; @@ -566,6 +605,15 @@ function generateMenu(vm) { }); } + if (vm.rights.change && vm.obj.stock != true) { + menuOptions.menuItems.push({ + title: "FindAndReplace", + icon: null, + key: FORM_KEY + ":replace", + vm: vm + }); + } + window.$gz.eventBus.$emit("menu-change", menuOptions); } @@ -589,7 +637,10 @@ async function fetchTranslatedText(vm) { "Translation", "Name", "TranslationKey", - "TranslationDisplayText" + "TranslationDisplayText", + "FindAndReplace", + "Find", + "Replace" ]); }