Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BC-8513 - Fix infos for sharing and importing #3482

Merged
merged 3 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 55 additions & 18 deletions src/components/share/ImportModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,47 @@

<template #content>
<div>
<div class="d-flex flex-row pa-2 mb-4 rounded bg-blue-lighten-5">
<div
class="d-flex flex-row pa-2 mb-4 rounded bg-blue-lighten-5"
v-if="showAlertInfo"
MartinSchuhmacher marked this conversation as resolved.
Show resolved Hide resolved
>
<div class="mx-2">
<v-icon color="info" :icon="mdiInformation" />
</div>
<div data-testid="import-options-table-header">
{{ t("components.molecules.import.options.tableHeader.InfoText") }}
<ul class="ml-6">
<li data-testid="import-options-personal-data-text">
<li
data-testid="import-options-personal-data-text"
v-if="showCourseInfo"
>
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.personalData"
)
}}
</li>
<li v-if="showCourseInfo || showLessonInfo">
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.geogebra"
)
}}
</li>
<li v-if="showCourseInfo || showBoardInfo || showLessonInfo">
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.etherpad"
)
}}
</li>
<li v-if="showCourseInfo || showBoardInfo">
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.whiteboard"
)
}}
</li>
<li
v-if="showCtlToolsInfo"
data-testid="import-modal-external-tools-info"
Expand All @@ -52,28 +79,18 @@
)
}}
</li>
<li data-testid="import-modal-coursefiles-info">
<li
data-testid="import-modal-coursefiles-info"
v-if="showCourseInfo"
>
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.courseFiles"
)
}}
</li>
<li>
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.etherpad"
)
}}
</li>
<li>
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.geogebra"
)
}}
</li>
<li>

<li v-if="showCourseInfo">
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.courseGroups"
Expand Down Expand Up @@ -138,4 +155,24 @@ const showCtlToolsInfo = computed(() => {
(props.parentType === "courses" || props.parentType === "columnBoard")
);
});

const showAlertInfo = computed(() => {
return (
props.parentType === "courses" ||
props.parentType === "columnBoard" ||
props.parentType === "lessons"
MartinSchuhmacher marked this conversation as resolved.
Show resolved Hide resolved
);
});

const showCourseInfo = computed(() => {
return props.parentType === "courses";
});

const showBoardInfo = computed(() => {
return props.parentType === "columnBoard";
});

const showLessonInfo = computed(() => {
return props.parentType === "lessons";
});
</script>
71 changes: 53 additions & 18 deletions src/components/share/ShareModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,47 @@
<p data-testid="share-options-info-text">
{{ t(`components.molecules.share.${type}.options.infoText`) }}
</p>
<div class="d-flex flex-row pa-2 mb-4 rounded bg-blue-lighten-5">
<div
class="d-flex flex-row pa-2 mb-4 rounded bg-blue-lighten-5"
v-if="showAlertInfo"
>
<div class="mx-2">
<v-icon color="info" :icon="mdiInformation" />
</div>
<div data-testid="share-options-table-header">
{{ t("components.molecules.share.options.tableHeader.InfoText") }}
<ul class="ml-6">
<li data-testid="share-options-personal-data-text">
<li
data-testid="share-options-personal-data-text"
v-if="showCourseInfo"
>
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.personalData"
)
}}
</li>
<li v-if="showCourseInfo || showLessonInfo">
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.geogebra"
)
}}
</li>
<li v-if="showCourseInfo || showBoardInfo || showLessonInfo">
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.etherpad"
)
}}
</li>
<li v-if="showCourseInfo || showBoardInfo">
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.whiteboard"
)
}}
</li>
<li
v-if="showCtlToolsInfo"
data-testid="share-modal-external-tools-info"
Expand All @@ -55,28 +82,17 @@
)
}}
</li>
<li data-testid="share-modal-coursefiles-info">
<li
data-testid="share-modal-coursefiles-info"
v-if="showCourseInfo"
>
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.courseFiles"
)
}}
</li>
<li>
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.etherpad"
)
}}
</li>
<li>
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.geogebra"
)
}}
</li>
<li>
<li v-if="showCourseInfo">
{{
t(
"components.molecules.shareImport.options.restrictions.infoText.courseGroups"
Expand Down Expand Up @@ -195,4 +211,23 @@ const showCtlToolsInfo = computed(() => {
(props.type === "courses" || props.type === "columnBoard")
);
});

const showAlertInfo = computed(() => {
return (
props.type === "courses" ||
props.type === "columnBoard" ||
props.type === "lessons"
);
});

const showCourseInfo = computed(() => {
return props.type === "courses";
});

const showBoardInfo = computed(() => {
return props.type === "columnBoard";
});
const showLessonInfo = computed(() => {
return props.type === "lessons";
});
</script>
4 changes: 3 additions & 1 deletion src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -683,8 +683,10 @@ export default {
"Dateien unter Kurs-Dateien",
"components.molecules.shareImport.options.restrictions.infoText.etherpad":
"Inhalte aus Etherpads",
"components.molecules.shareImport.options.restrictions.infoText.whiteboard":
"Inhalte aus Whiteboards",
"components.molecules.shareImport.options.restrictions.infoText.geogebra":
"Geogebra IDs und",
"Geogebra IDs",
"components.molecules.shareImport.options.restrictions.infoText.courseGroups":
"Kursgruppen",
"components.molecules.share.options.tableHeader.InfoText":
Expand Down
4 changes: 3 additions & 1 deletion src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,10 @@ export default {
"Files under Course Files",
"components.molecules.shareImport.options.restrictions.infoText.etherpad":
"Content from Etherpads",
"components.molecules.shareImport.options.restrictions.infoText.whiteboard":
"Content from Whiteboards",
"components.molecules.shareImport.options.restrictions.infoText.geogebra":
"Geogebra IDs and",
"Geogebra IDs",
"components.molecules.shareImport.options.restrictions.infoText.courseGroups":
"Course groups",
"components.molecules.share.options.tableHeader.InfoText":
Expand Down
4 changes: 3 additions & 1 deletion src/locales/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -688,8 +688,10 @@ export default {
"Archivos en Archivos de curso",
"components.molecules.shareImport.options.restrictions.infoText.etherpad":
"Contenido de Etherpads",
"components.molecules.shareImport.options.restrictions.infoText.whiteboard":
"Contenido de Whiteboards",
"components.molecules.shareImport.options.restrictions.infoText.geogebra":
"ID de Geogebra y",
"ID de Geogebra",
"components.molecules.shareImport.options.restrictions.infoText.courseGroups":
"Grupos de cursos",
"components.molecules.share.options.tableHeader.InfoText":
Expand Down
4 changes: 3 additions & 1 deletion src/locales/uk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,10 @@ export default {
"Файли в розділі Файли курсу",
"components.molecules.shareImport.options.restrictions.infoText.etherpad":
"Вміст із Etherpads",
"components.molecules.shareImport.options.restrictions.infoText.whiteboard":
"Вміст із Whiteboards",
"components.molecules.shareImport.options.restrictions.infoText.geogebra":
"Ідентифікатори Geogebra та",
"Ідентифікатори Geogebra",
"components.molecules.shareImport.options.restrictions.infoText.courseGroups":
"Групи курсів",
"components.molecules.share.options.tableHeader.InfoText":
Expand Down
Loading