Skip to content
Snippets Groups Projects
Commit e1b4a3b8 authored by Ron Lucke's avatar Ron Lucke Committed by Marcus Eibrink-Lunzenauer
Browse files

BIEST #536

parent 10339902
No related branches found
No related tags found
No related merge requests found
...@@ -1637,6 +1637,12 @@ v i e w w i d g e t ...@@ -1637,6 +1637,12 @@ v i e w w i d g e t
} }
} }
.cw-action-widget { .cw-action-widget {
.cw-action-widget-show-toc {
@include background-icon(table-of-contents, clickable);
}
.cw-action-widget-show-consume-mode {
@include background-icon(fullscreen-on, clickable);
}
.cw-action-widget-edit{ .cw-action-widget-edit{
@include background-icon(edit, clickable); @include background-icon(edit, clickable);
} }
......
<template> <template>
<ul class="widget-list widget-links cw-action-widget" v-if="structuralElement"> <ul class="widget-list widget-links cw-action-widget" v-if="structuralElement">
<li class="cw-action-widget-show-toc" @click="toggleTOC">
{{ tocText }}
</li>
<li class="cw-action-widget-show-consume-mode" @click="showConsumeMode">
<translate>Vollbild einschalten</translate>
</li>
<li v-show="canEdit" class="cw-action-widget-edit" @click="editElement"> <li v-show="canEdit" class="cw-action-widget-edit" @click="editElement">
<translate>Seite bearbeiten</translate> <translate>Seite bearbeiten</translate>
</li> </li>
...@@ -37,6 +43,8 @@ export default { ...@@ -37,6 +43,8 @@ export default {
oerEnabled: 'oerEnabled', oerEnabled: 'oerEnabled',
oerTitle: 'oerTitle', oerTitle: 'oerTitle',
userId: 'userId', userId: 'userId',
consumeMode: 'consumeMode',
showToolbar: 'showToolbar'
}), }),
isRoot() { isRoot() {
if (!this.structuralElement) { if (!this.structuralElement) {
...@@ -66,6 +74,9 @@ export default { ...@@ -66,6 +74,9 @@ export default {
blockedByAnotherUser() { blockedByAnotherUser() {
return this.blocked && this.userId !== this.blockerId; return this.blocked && this.userId !== this.blockerId;
}, },
tocText() {
return this.showToolbar ? this.$gettext('Inhaltsverzeichnis ausblenden') : this.$gettext('Inhaltsverzeichnis anzeigen');
}
}, },
methods: { methods: {
...mapActions({ ...mapActions({
...@@ -78,6 +89,9 @@ export default { ...@@ -78,6 +89,9 @@ export default {
companionInfo: 'companionInfo', companionInfo: 'companionInfo',
addBookmark: 'addBookmark', addBookmark: 'addBookmark',
lockObject: 'lockObject', lockObject: 'lockObject',
setConsumeMode: 'coursewareConsumeMode',
setViewMode: 'coursewareViewMode',
setShowToolbar: 'coursewareShowToolbar'
}), }),
async editElement() { async editElement() {
if (this.blockedByAnotherUser) { if (this.blockedByAnotherUser) {
...@@ -118,6 +132,13 @@ export default { ...@@ -118,6 +132,13 @@ export default {
oerElement() { oerElement() {
this.showElementOerDialog(true); this.showElementOerDialog(true);
}, },
toggleTOC() {
this.setShowToolbar(!this.showToolbar);
},
showConsumeMode() {
this.setViewMode('read');
this.setConsumeMode(true);
},
}, },
}; };
</script> </script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment