From baa3613386b4bda021bd2bd5ceaba6792d3c3005 Mon Sep 17 00:00:00 2001
From: Martin Weise <martin.weise@tuwien.ac.at>
Date: Sun, 13 Apr 2025 15:05:32 +0200
Subject: [PATCH] WIP

Signed-off-by: Martin Weise <martin.weise@tuwien.ac.at>
---
 dbrepo-ui/components/identifier/Persist.vue | 27 ++++++++++++++++++---
 dbrepo-ui/locales/en-US.json                | 10 ++++++--
 2 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/dbrepo-ui/components/identifier/Persist.vue b/dbrepo-ui/components/identifier/Persist.vue
index 004a037c46..0ba69fcbc2 100644
--- a/dbrepo-ui/components/identifier/Persist.vue
+++ b/dbrepo-ui/components/identifier/Persist.vue
@@ -352,6 +352,7 @@
             variant="flat">
             <v-stepper-header>
               <v-stepper-item
+                :title="descriptionTitle(description)"
                 :value="i+1" />
             </v-stepper-header>
             <v-stepper-window
@@ -359,12 +360,12 @@
               <v-container>
                 <v-row dense>
                   <v-col cols="8">
-                    <v-text-field
+                    <v-textarea
                       v-model="description.description"
                       :label="$t('pages.identifier.subpages.create.descriptions.description.label')"
                       clearable
                       :variant="inputVariant"
-                      :hint="$t('pages.identifier.subpages.create.descriptions.description.hint')"
+                      :hint="$t('pages.identifier.subpages.create.descriptions.description.hint', { symbol: '<br>'})"
                       persistent-hint
                       :rules="[v => !!v || $t('validation.required')]"
                       required />
@@ -1155,7 +1156,21 @@ export default {
   mounted () {
     this.addCreator()
     this.addTitle()
-    this.addDescription()
+    this.identifier.descriptions.push({
+      description: null,
+      type: 'Abstract',
+      language: null
+    })
+    this.identifier.descriptions.push({
+      description: null,
+      type: 'Methods',
+      language: null
+    })
+    this.identifier.descriptions.push({
+      description: null,
+      type: 'Other',
+      language: null
+    })
     this.fetchLicenses()
     this.fetchIdentifier()
     this.$refs.form.validate()
@@ -1164,6 +1179,12 @@ export default {
     cancel () {
       this.$emit('close', { action: 'closed' })
     },
+    descriptionTitle (description) {
+      if (!description.type) {
+        return null
+      }
+      return this.$t(`pages.identifier.subpages.create.descriptions.description.${description.type.toLowerCase()}`)
+    },
     retrieveCreator (creator) {
       if (!creator || !creator.name_identifier) {
         creator.name_identifier_scheme = null
diff --git a/dbrepo-ui/locales/en-US.json b/dbrepo-ui/locales/en-US.json
index 3b005cc759..d3918cab60 100644
--- a/dbrepo-ui/locales/en-US.json
+++ b/dbrepo-ui/locales/en-US.json
@@ -137,7 +137,13 @@
           "descriptions": {
             "description": {
               "label": "Description",
-              "hint": "Required"
+              "hint": "Required. Use {symbol} to indicate a line break for improved rendering of multiple paragraphs, but otherwise no HTML markup.",
+              "abstract": "Data Abstract",
+              "methods": "Collection Method",
+              "seriesinformation": "Series Information",
+              "tableofcontents": "Table of Contents",
+              "technicalinfo": "Technical Information",
+              "other": "Description of the Dataset"
             },
             "type": {
               "label": "Type",
@@ -185,7 +191,7 @@
           },
           "licenses": {
             "title": "License",
-            "subtitle": "Identifiers of related resources. These must be globally unique identifiers",
+            "subtitle": "Rights information of the dataset",
             "license": {
               "label": "License"
             }
-- 
GitLab