Skip to content
Snippets Groups Projects
Commit 99d20dfa authored by Hanna Führ's avatar Hanna Führ Committed by Kimia Beheshti
Browse files

Update: Resource Settings an info Participating Organization

parent 5a0dacfd
Branches
Tags
2 merge requests!215Release: Sprint/2023 06 :robot:,!205Update: Resource Settings an info Participating Organization
Showing
with 97 additions and 51 deletions
......@@ -232,6 +232,12 @@ export default {
projectOrganization: "Teilnehmende Organisationen",
projectOrganizationLabel:
"@:(form.project.projectOrganization)@:(form.project.labelSymbol)",
projectOrganizationHint:
"Wenn Ihre Organisation nicht in der Liste erscheint, geben Sie bitte ihren Namen in das Feld ein, um nach ihr zu suchen.",
projectOrganizationLabelPopover:
"Für weitere Informationen zu teilnehmenden Organisationen siehe",
projectOrganizationLabelPopoverUrl:
"https://docs.coscine.de/de/projects/create/",
projectOrganizationNoOptions: "Suche nach Organisationen",
projectOrganizationNoResult:
"Keine Organisationen gefunden, die der Suche entsprechen",
......
......
......@@ -227,6 +227,12 @@ export default {
projectOrganization: "Participating Organizations",
projectOrganizationLabel:
"@:(form.project.projectOrganization)@:(form.project.labelSymbol)",
projectOrganizationHint:
"If your organization does not appear in the list, please enter its name in the field to search for it.",
projectOrganizationLabelPopover:
"For more information on participating Organizations see",
projectOrganizationLabelPopoverUrl:
"https://docs.coscine.de/en/projects/create/",
projectOrganizationNoOptions: "Search for organizations",
projectOrganizationNoResult: "No organizations found matching the search",
......
......
......@@ -148,7 +148,24 @@
:label="$t('form.project.projectOrganizationLabel')"
:is-loading="isLoading"
type="input"
:info="true"
>
<!-- Hint -->
<template #hint>
{{ $t("form.project.projectOrganizationHint") }}
</template>
<template #popover>
{{ $t("form.project.projectOrganizationLabelPopover") }}
<b-link
:href="
$t('form.project.projectOrganizationLabelPopoverUrl').toString()
"
target="_blank"
>{{ $t("default.help") }}
</b-link>
</template>
<multiselect
id="Organization"
v-model="v$.projectForm.organizations.$model"
......
......
<template>
<div class="metadata">
<div class="applicationProfile">
<div>
<!-- Application Profile Dropdown -->
<CoscineFormGroup
label-for="ApplicationProfiles"
:mandatory="true"
:label="$t('page.createResource.metadata.applicationProfileLabel')"
:label="
$t('page.createResource.applicationProfile.applicationProfileLabel')
"
:info="true"
>
<template #popover>
{{ $t("page.createResource.metadata.applicationProfilePopover") }}
{{
$t(
"page.createResource.applicationProfile.applicationProfilePopover"
)
}}
<b-link
:href="
$t(
'page.createResource.metadata.applicationProfilePopoverUrl'
'page.createResource.applicationProfile.applicationProfilePopoverUrl'
).toString()
"
target="_blank"
......@@ -27,14 +33,18 @@
v-model="selectedApplicationProfile"
:options="applicationProfileList"
:placeholder="
$t('page.createResource.metadata.selectApplicationProfile')
$t(
'page.createResource.applicationProfile.selectApplicationProfile'
)
"
@change="notifyFormGenerator"
>
<template #first>
<b-form-select-option :value="null" disabled>
{{
$t("page.createResource.metadata.selectApplicationProfile")
$t(
"page.createResource.applicationProfile.selectApplicationProfile"
)
}}
</b-form-select-option>
</template>
......@@ -56,7 +66,9 @@
</div>
<b-tooltip target="createButton" triggers="hover">
<i18n path="page.createResource.metadata.createAp.tooltip" />
<i18n
path="page.createResource.applicationProfile.createAp.tooltip"
/>
</b-tooltip>
</CoscineFormGroup>
</div>
......
......
......@@ -33,18 +33,18 @@
</CoscineFormGroup>
</b-card>
<!-- General Information -->
<!-- Resource Metadata Information -->
<b-card class="my-2">
<b-link class="float-right text-primary" @click.prevent="toTab(tabs[1])">
{{ $t("page.createResource.overview.edit") }}
</b-link>
<CoscineHeadline :headline="$t('form.steps.second')" h="h5" />
<!-- General -->
<General v-model="resource" :readonly="true" />
<!-- Resource Metadata -->
<ResourceMetadata v-model="resource" :readonly="true" />
</b-card>
<!-- Metadata -->
<!-- Application Profile -->
<b-card class="my-2 p-0">
<b-link class="float-right text-primary" @click.prevent="toTab(tabs[2])">
{{ $t("page.createResource.overview.edit") }}
......@@ -96,7 +96,7 @@ import useResourceStore from "@/modules/resource/store";
import useProjectStore from "@/modules/project/store";
import useUserStore from "@/modules/user/store";
import "@/plugins/form-generator";
import General from "./General.vue";
import ResourceMetadata from "./ResourceMetadata.vue";
import { navigateToProject } from "@/router";
import type { Dataset } from "@rdfjs/types";
import type { ResourceObject } from "@coscine/api-client/dist/types/Coscine.Api.Resources";
......@@ -107,7 +107,7 @@ import type { UserObject } from "@coscine/api-client/dist/types/Coscine.Api.User
import useNotificationStore from "@/store/notification";
export default defineComponent({
components: { General },
components: { ResourceMetadata },
props: {
value: {
type: Object as PropType<ResourceObject>,
......
......
<template>
<div class="general">
<div class="resourceMetadata">
<!-- Form -->
<b-form id="edit_form" @submit.stop.prevent="">
<!-- Resource Name -->
......
......
......@@ -2,11 +2,11 @@
<div class="modal">
<b-modal
id="createAPModal"
:title="$t('page.createResource.metadata.createAp.title')"
:title="$t('page.createResource.applicationProfile.createAp.title')"
:hide-footer="true"
>
<!-- Body -->
<i18n path="page.createResource.metadata.createAp.body" tag="p">
<i18n path="page.createResource.applicationProfile.createAp.body" tag="p">
<template #br><br /></template>
</i18n>
......
......
......@@ -34,10 +34,10 @@ export default {
"Es konnte keine Verbindung zur Ressource hergestellt werden. Bitte überprüfen Sie die Eingaben.",
},
},
general: {
resourceMetadata: {
title: "Schritt 2: @:(form.steps.second)",
},
metadata: {
applicationProfile: {
title: "Schritt 3: @:(form.steps.third)",
createAp: {
tooltip: "Anfrage zur Erstellung eines Applikationsprofils",
......@@ -452,8 +452,8 @@ export default {
},
steps: {
first: "Ressourcen-Konfiguration",
second: "Generelle Informationen",
third: "Metadaten der Ressource",
second: "Ressource-Metadaten",
third: "Applikationsprofil",
fourth: "Übersicht & Bestätigung",
fifth: "Aktionen",
},
......
......
......@@ -34,10 +34,10 @@ export default {
"No connection with the resource is possible. Please check the provided data.",
},
},
general: {
resourceMetadata: {
title: "Step 2: @:(form.steps.second)",
},
metadata: {
applicationProfile: {
title: "Step 3: @:(form.steps.third)",
createAp: {
tooltip: "Request for creation of application profiles",
......@@ -440,8 +440,8 @@ export default {
},
steps: {
first: "Resource Configuration",
second: "General Information",
third: "Resource Metadata",
second: "Resource Metadata",
third: "Application Profile",
fourth: "Overview & Confirm",
fifth: "Actions",
},
......
......
......@@ -24,14 +24,14 @@
@valid="setNextTab"
@next="next"
/>
<General
<ResourceMetadata
v-else-if="currentTab === 1"
v-model="resource"
:is-loading="isLoading"
:readonly="false"
@valid="setNextTab"
/>
<MetadataView
<ApplicationProfile
v-else-if="currentTab === 2"
v-model="resource"
:application-profile-list="groupedAPList"
......@@ -81,8 +81,8 @@ import { defineComponent } from "vue";
import useResourceStore from "../store";
import useProjectStore from "@/modules/project/store";
import Configuration from "../components/create-resource/Configuration.vue";
import General from "../components/create-resource/General.vue";
import MetadataView from "../components/create-resource/Metadata.vue";
import ResourceMetadata from "../components/create-resource/ResourceMetadata.vue";
import ApplicationProfile from "../components/create-resource/ApplicationProfile.vue";
import Overview from "../components/create-resource/Overview.vue";
import type {
DisciplineObject,
......@@ -98,7 +98,7 @@ import type {
} from "../types";
export default defineComponent({
components: { Configuration, General, MetadataView, Overview },
components: { Configuration, ResourceMetadata, ApplicationProfile, Overview },
setup() {
const projectStore = useProjectStore();
const resourceStore = useResourceStore();
......@@ -144,15 +144,19 @@ export default defineComponent({
hidden: false,
},
{
title: this.$t("page.createResource.general.title").toString(),
title: this.$t(
"page.createResource.resourceMetadata.title"
).toString(),
active: this.tabsStatus[1],
step: "general",
step: "resourceMetadata",
hidden: false,
},
{
title: this.$t("page.createResource.metadata.title").toString(),
title: this.$t(
"page.createResource.applicationProfile.title"
).toString(),
active: this.tabsStatus[2],
step: "metadata",
step: "applicationProfile",
hidden: false,
},
{
......
......
......@@ -23,9 +23,9 @@
v-model="resourceForm"
/>
<!-- General Overview from Create Resource -->
<General
v-show="currentTab === 'general'"
<!-- Resource Metadata -->
<ResourceMetadata
v-show="currentTab === 'resourceMetadata'"
v-model="resourceForm"
:is-loading="isLoading"
:readonly="
......@@ -34,9 +34,9 @@
@validation="validation = $event"
/><!-- TODO: Fix @validation assignment and typing -->
<!-- Metadata -->
<MetadataView
v-show="currentTab === 'metadata'"
<!-- Application Profile -->
<ApplicationProfile
v-show="currentTab === 'applicationProfile'"
v-model="resourceForm"
:application-profile="applicationProfile"
:is-loading-form-generator="isLoading"
......@@ -82,8 +82,8 @@ import useResourceStore from "../store";
import useProjectStore from "@/modules/project/store";
import useUserStore from "@/modules/user/store";
import { navigateToProject } from "@/router";
import General from "../components/create-resource/General.vue";
import MetadataView from "../components/settings/MetadataView.vue";
import ResourceMetadata from "../components/create-resource/ResourceMetadata.vue";
import ApplicationProfile from "../components/settings/ApplicationProfile.vue";
import Actions from "../components/settings/Actions.vue";
import Overview from "../components/settings/Overview.vue";
import Configuration from "../components/settings/Configuration.vue";
......@@ -103,8 +103,8 @@ export default defineComponent({
components: {
Overview,
Configuration,
General,
MetadataView,
ResourceMetadata,
ApplicationProfile,
Actions,
},
setup() {
......@@ -146,7 +146,7 @@ export default defineComponent({
},
validResourceForm(): boolean {
if (this.resource && this.resource.archived) {
// Limit button to only changes in the "general" tab, when the resource is archived.
// Limit button to only changes in the "Resource Metadata" tab, when the resource is archived.
return !this.validation.$invalid && this.validation.$anyDirty;
} else {
// Button should always be enabled; Alternatively make the validation check here.
......@@ -156,8 +156,8 @@ export default defineComponent({
confirmButtonVisibility(): boolean {
if (this.isUserAllowedToEdit) {
if (this.resource && this.resource.archived) {
// Limit button to only be visible in the "general" tab, when the resource is archived.
return this.currentTab === "general";
// Limit button to only be visible in the "Resource Metadata" tab, when the resource is archived.
return this.currentTab === "resourceMetadata";
} else if (
this.resource &&
this.resource.type &&
......@@ -165,12 +165,13 @@ export default defineComponent({
) {
return (
this.currentTab === "configuration" ||
this.currentTab === "general" ||
this.currentTab === "metadata"
this.currentTab === "resourceMetadata" ||
this.currentTab === "applicationProfile"
);
} else {
return (
this.currentTab === "general" || this.currentTab === "metadata"
this.currentTab === "resourceMetadata" ||
this.currentTab === "applicationProfile"
);
}
}
......@@ -188,13 +189,13 @@ export default defineComponent({
{
title: this.$t("form.steps.second").toString(),
active: true,
step: "general",
step: "resourceMetadata",
hidden: false,
},
{
title: this.$t("form.steps.third").toString(),
active: true,
step: "metadata",
step: "applicationProfile",
hidden: false,
},
{
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment