Add code after rebase

This commit is contained in:
Daniel Egger 2023-05-26 16:05:25 +02:00
parent 9937951728
commit 2d58cdd9fe
2 changed files with 38 additions and 2 deletions

View File

@ -1,4 +1,5 @@
<script setup lang="ts">
import MediaLink from "@/components/mediaLibrary/MediaLink.vue";
import type { LearningContentDocumentList } from "@/types";
import LearningContentSimpleLayout from "../layouts/LearningContentSimpleLayout.vue";
@ -11,7 +12,41 @@ const props = defineProps<{
<LearningContentSimpleLayout :title="content.title" :learning-content="props.content">
<div class="container-medium">
<div class="lg:mt-8">
<div class="text-large my-4">List von Docs</div>
<div class="my-4">
<!-- eslint-disable vue/no-v-html -->
<p v-if="content.description" v-html="content.description"></p>
<div>
<ul class="border-t">
<li
v-for="item in content.documents"
:key="item.id"
class="flex items-center justify-between border-b py-4"
>
<div class="flex items-center justify-between">
<div v-if="item.value.icon_url">
<img class="mr-6 max-h-[70px]" :src="item.value.icon_url" />
</div>
<div>
<h4 class="text-bold">{{ item.value.title }}</h4>
<p v-if="item.value.description" class="mb-2">
{{ item.value.description }}
</p>
</div>
</div>
<div class="">
<MediaLink
:to="item.value.url"
:blank="item.value.open_window"
class="link"
>
{{ item.value.link_display_text }}
</MediaLink>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</LearningContentSimpleLayout>

View File

@ -21,6 +21,7 @@ from vbv_lernwelt.learnpath.tests.learning_path_factories import (
LearningSequenceFactory,
LearningUnitFactory,
TopicFactory,
LearningContentDocumentListFactory,
)
@ -343,7 +344,7 @@ def create_uk_circle_fahrzeug(lp, title="Fahrzeug"):
),
LearningSequenceFactory(title="Training", parent=circle)
LearningUnitFactory(title="Unterlagen", parent=circle)
LearningContentPlaceholderFactory(
LearningContentDocumentListFactory(
title="Unterlagen für den Unterricht",
parent=circle,
)