Fix content blocks, notes, and chapters.
This commit is contained in:
parent
1aaf31090d
commit
b62211a5b4
|
|
@ -3,10 +3,11 @@
|
||||||
class="module-activity"
|
class="module-activity"
|
||||||
v-if="!empty"
|
v-if="!empty"
|
||||||
>
|
>
|
||||||
<h3 class="module-activity__module-name">
|
<h3 class="module-activity__topic-name">
|
||||||
{{ module.topic.title }}
|
{{ module.topic.title }}
|
||||||
</h3>
|
</h3>
|
||||||
<h2 class="module-activity__title">{{ module.metaTitle }} - {{ module.title }}</h2>
|
<h2 class="module-activity__title">{{ module.title }}</h2>
|
||||||
|
<h3 class="module-activity__meta-title">{{ module.metaTitle }}</h3>
|
||||||
<div class="module-activity__tasks activity-tasks">
|
<div class="module-activity__tasks activity-tasks">
|
||||||
<activity-entry
|
<activity-entry
|
||||||
title="Aufgabe & Ergebnis"
|
title="Aufgabe & Ergebnis"
|
||||||
|
|
@ -27,11 +28,12 @@
|
||||||
{{ answer.survey.title }}
|
{{ answer.survey.title }}
|
||||||
</activity-entry>
|
</activity-entry>
|
||||||
<activity-entry
|
<activity-entry
|
||||||
title="Lesezeichen"
|
title="Lesezeichen ContentBlock"
|
||||||
class="module-activity__entry"
|
class="module-activity__entry"
|
||||||
|
:bookmark="bookmark"
|
||||||
v-for="bookmark in contentBookmarks"
|
v-for="bookmark in contentBookmarks"
|
||||||
:key="bookmark.id"
|
:key="bookmark.id"
|
||||||
@link="goTo(bookmark.uuid)"
|
@link="goTo(bookmark.contentBlock.id)"
|
||||||
>
|
>
|
||||||
<content-bookmark :bookmark="bookmark" />
|
<content-bookmark :bookmark="bookmark" />
|
||||||
</activity-entry>
|
</activity-entry>
|
||||||
|
|
@ -47,11 +49,12 @@
|
||||||
<activity-entry
|
<activity-entry
|
||||||
title="Notiz"
|
title="Notiz"
|
||||||
class="module-activity__entry"
|
class="module-activity__entry"
|
||||||
v-for="note in notes"
|
:bookmark="noteBookmark"
|
||||||
:key="note.id"
|
v-for="noteBookmark in notes"
|
||||||
@link="goTo(note.id)"
|
:key="noteBookmark.note.id"
|
||||||
|
@link="goTo(noteBookmark.contentBlock.id)"
|
||||||
>
|
>
|
||||||
{{ note.text }}
|
{{ noteBookmark.note.text }}
|
||||||
</activity-entry>
|
</activity-entry>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -73,11 +76,11 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
empty() {
|
empty() {
|
||||||
return !(
|
return !(
|
||||||
this.module.mySubmissions.length ||
|
this.notes.length ||
|
||||||
this.module.myAnswers.length ||
|
this.answers.length ||
|
||||||
this.module.myContentBookmarks.length ||
|
this.submissions.length ||
|
||||||
this.module.myChapterBookmarks.length ||
|
this.contentBookmarks.length ||
|
||||||
this.module.bookmark
|
this.chapterBookmarks.length
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
notes() {
|
notes() {
|
||||||
|
|
@ -86,7 +89,6 @@ export default {
|
||||||
.concat(this.module.myContentBookmarks)
|
.concat(this.module.myContentBookmarks)
|
||||||
.concat([this.module.bookmark ? this.module.bookmark : {}])
|
.concat([this.module.bookmark ? this.module.bookmark : {}])
|
||||||
.filter((b) => b.note)
|
.filter((b) => b.note)
|
||||||
.map((b) => b.note)
|
|
||||||
: [];
|
: [];
|
||||||
},
|
},
|
||||||
submissions() {
|
submissions() {
|
||||||
|
|
@ -140,9 +142,7 @@ export default {
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
}
|
}
|
||||||
|
|
||||||
margin-bottom: 2 * $large-spacing;
|
&__topic-name {
|
||||||
|
|
||||||
&__module-name {
|
|
||||||
@include regular-text;
|
@include regular-text;
|
||||||
margin-bottom: $small-spacing;
|
margin-bottom: $small-spacing;
|
||||||
}
|
}
|
||||||
|
|
@ -150,7 +150,10 @@ export default {
|
||||||
&__title {
|
&__title {
|
||||||
@include heading-2;
|
@include heading-2;
|
||||||
}
|
}
|
||||||
|
&__meta-title {
|
||||||
|
@include regular-text;
|
||||||
|
margin-bottom: $small-spacing;
|
||||||
|
}
|
||||||
&__entry {
|
&__entry {
|
||||||
&:first-of-type {
|
&:first-of-type {
|
||||||
border-top: 1px solid $color-silver;
|
border-top: 1px solid $color-silver;
|
||||||
|
|
|
||||||
|
|
@ -42,14 +42,14 @@ export default {
|
||||||
update(data) {
|
update(data) {
|
||||||
return this.$getRidOfEdges(data).myActivity;
|
return this.$getRidOfEdges(data).myActivity;
|
||||||
},
|
},
|
||||||
pollInterval: 5000,
|
pollInterval: 15000,
|
||||||
},
|
},
|
||||||
instruments: {
|
instruments: {
|
||||||
query: MY_ACTIVITY_QUERY,
|
query: MY_ACTIVITY_QUERY,
|
||||||
update(data) {
|
update(data) {
|
||||||
return this.$getRidOfEdges(data).myInstrumentActivity;
|
return this.$getRidOfEdges(data).myInstrumentActivity;
|
||||||
},
|
},
|
||||||
pollInterval: 5000,
|
pollInterval: 15000,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ class UsersQuery(object):
|
||||||
return Module.objects.all()
|
return Module.objects.all()
|
||||||
|
|
||||||
def resolve_my_instrument_activity(self, info, **kwargs):
|
def resolve_my_instrument_activity(self, info, **kwargs):
|
||||||
return BasicKnowledge.objects.all()
|
return BasicKnowledge.objects.filter(instrumentbookmark__user=info.context.user)
|
||||||
|
|
||||||
|
|
||||||
class AllUsersQuery(object):
|
class AllUsersQuery(object):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue