Add clickable link to my activities
This commit is contained in:
parent
e45847fe1e
commit
ddf3bde076
|
|
@ -0,0 +1,64 @@
|
||||||
|
<template>
|
||||||
|
<div class="activity-entry">
|
||||||
|
<div class="activity-entry__content">
|
||||||
|
<h3 class="activity-entry__title">{{title}}</h3>
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="activity-entry__link" @click="$emit('link')">
|
||||||
|
<chevron-right class="activity-entry__icon"></chevron-right>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import ChevronRight from '@/components/icons/ChevronRight';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: ['title'],
|
||||||
|
|
||||||
|
components: {
|
||||||
|
ChevronRight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@import "@/styles/_variables.scss";
|
||||||
|
@import "@/styles/_mixins.scss";
|
||||||
|
|
||||||
|
.activity-entry {
|
||||||
|
padding: $small-spacing 0;
|
||||||
|
border-bottom: 1px solid $color-silver;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
|
&__title {
|
||||||
|
@include small-text;
|
||||||
|
// todo: make style definition for small text and silver color
|
||||||
|
color: $color-silver-dark;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__content {
|
||||||
|
flex-grow: 1;
|
||||||
|
@include regular-text;
|
||||||
|
line-height: $default-line-height;
|
||||||
|
}
|
||||||
|
&__link {
|
||||||
|
display: flex;
|
||||||
|
flex-grow: 0;
|
||||||
|
align-content: center;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__icon {
|
||||||
|
fill: $color-brand;
|
||||||
|
width: 30px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ p {
|
||||||
|
@include regular-text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="content-bookmark module-activity-entry">
|
<div class="content-bookmark module-activity-entry">
|
||||||
<h3 class="module-activity-entry__title">Lesezeichen</h3>
|
|
||||||
<div v-html="text" v-if="content.type === 'text_block'"></div>
|
<div v-html="text" v-if="content.type === 'text_block'"></div>
|
||||||
<div v-else-if="content.type === 'link_block'">
|
<div v-else-if="content.type === 'link_block'">
|
||||||
<link-block :value="content.value"></link-block>
|
<link-block :value="content.value"></link-block>
|
||||||
|
|
@ -38,13 +37,3 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
@import "@/styles/_mixins.scss";
|
|
||||||
|
|
||||||
.content-bookmark {
|
|
||||||
/deep/ p {
|
|
||||||
@include regular-text;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -3,48 +3,35 @@
|
||||||
<h3 class="module-activity__module-name">{{module.topic.title}}</h3>
|
<h3 class="module-activity__module-name">{{module.topic.title}}</h3>
|
||||||
<h2 class="module-activity__title">{{module.metaTitle}} - {{module.title}}</h2>
|
<h2 class="module-activity__title">{{module.metaTitle}} - {{module.title}}</h2>
|
||||||
<div class="module-activity__tasks activity-tasks">
|
<div class="module-activity__tasks activity-tasks">
|
||||||
<div class="module-activity__entry module-activity-entry"
|
<activity-entry title="Aufgabe & Ergebnis" class="module-activity__entry"
|
||||||
v-for="submission in module.mySubmissions"
|
v-for="submission in module.mySubmissions"
|
||||||
:key="submission.id"
|
:key="submission.id"
|
||||||
@click="goTo(submission.assignment.id)">
|
@link="goTo(submission.assignment.id)">
|
||||||
<h3 class="module-activity-entry__title">Aufgabe & Ergebnis</h3>
|
{{submission.text}}
|
||||||
<p class="module-activity-entry__text">
|
</activity-entry>
|
||||||
{{submission.text}}
|
<activity-entry title="Übung" class="module-activity__entry"
|
||||||
</p>
|
v-for="answer in module.myAnswers"
|
||||||
</div>
|
:key="answer.id"
|
||||||
<div class="module-activity__entry module-activity-entry"
|
@link="goTo(answer.survey.id)">
|
||||||
v-for="answer in module.myAnswers"
|
{{answer.survey.title}}
|
||||||
:key="answer.id"
|
</activity-entry>
|
||||||
@click="goTo(answer.survey.id)">
|
<activity-entry title="Lesezeichen" class="module-activity__entry"
|
||||||
<h3 class="module-activity-entry__title">Übung</h3>
|
v-for="bookmark in module.myContentBookmarks"
|
||||||
<p class="module-activity-entry__text">
|
:key="bookmark.id"
|
||||||
{{answer.survey.title}}
|
@link="goTo(bookmark.uuid)">
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="module-activity__entry"
|
|
||||||
v-for="bookmark in module.myContentBookmarks"
|
|
||||||
:key="bookmark.id"
|
|
||||||
@click="goTo(bookmark.uuid)">
|
|
||||||
<content-bookmark :bookmark="bookmark"></content-bookmark>
|
<content-bookmark :bookmark="bookmark"></content-bookmark>
|
||||||
</div>
|
</activity-entry>
|
||||||
<div class="module-activity__entry"
|
<activity-entry title="Lesezeichen" class="module-activity__entry"
|
||||||
v-for="bookmark in module.myChapterBookmarks"
|
v-for="bookmark in module.myChapterBookmarks"
|
||||||
:key="bookmark.id"
|
:key="bookmark.id"
|
||||||
@click="goTo(bookmark.chapter.id)">
|
@link="goTo(bookmark.chapter.id)">
|
||||||
<h3 class="module-activity-entry__title">Lesezeichen</h3>
|
{{bookmark.chapter.description}}
|
||||||
<p class="module-activity-entry__text">
|
</activity-entry>
|
||||||
{{bookmark.chapter.description}}
|
<activity-entry title="Notiz" class="module-activity__entry"
|
||||||
</p>
|
v-for="note in notes" :key="note.id"
|
||||||
</div>
|
@link="goTo(note.id)">
|
||||||
<div class="module-activity__entry"
|
{{note.text}}
|
||||||
v-for="note in notes" :key="note.id">
|
</activity-entry>
|
||||||
<h3 class="module-activity-entry__title">Notiz</h3>
|
|
||||||
<p class="module-activity-entry__text">
|
|
||||||
{{note.text}}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -53,13 +40,15 @@
|
||||||
|
|
||||||
import {mapActions} from 'vuex'
|
import {mapActions} from 'vuex'
|
||||||
import ContentBookmark from '@/components/profile/ContentBookmark';
|
import ContentBookmark from '@/components/profile/ContentBookmark';
|
||||||
|
import ActivityEntry from '@/components/profile/ActivityEntry';
|
||||||
|
|
||||||
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
|
import SCROLL_TO_MUTATION from '@/graphql/gql/local/mutations/scrollTo.gql';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: ['module'],
|
props: ['module'],
|
||||||
components: {
|
components: {
|
||||||
ContentBookmark
|
ContentBookmark,
|
||||||
|
ActivityEntry
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
empty() {
|
empty() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue