This commit is contained in:
@@ -3,12 +3,21 @@
|
||||
<!-- <span class="v-label v-label--active theme--light">
|
||||
Wiki
|
||||
</span> -->
|
||||
<div>
|
||||
<v-btn depressed tile @click="switchView()">
|
||||
<v-icon left>{{ switchViewIcon() }}</v-icon
|
||||
>Wiki</v-btn
|
||||
>
|
||||
</div>
|
||||
<template v-if="readOnly">
|
||||
<div>
|
||||
<v-btn depressed tile @click="switchView()">
|
||||
Wiki<v-icon right>{{ switchViewIcon() }}</v-icon></v-btn
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div>
|
||||
<v-btn depressed tile @click="switchView()">
|
||||
Wiki<v-icon right>{{ switchViewIcon() }}</v-icon></v-btn
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<v-sheet
|
||||
v-if="currentView != 0"
|
||||
elevation="2"
|
||||
@@ -16,11 +25,8 @@
|
||||
>
|
||||
<v-row>
|
||||
<!-- DESIGNER -->
|
||||
<v-col
|
||||
v-if="canEdit"
|
||||
v-show="showDesigner()"
|
||||
:cols="currentView == 1 ? 6 : 12"
|
||||
>
|
||||
<!-- v-show="showDesigner()" -->
|
||||
<v-col v-if="showDesigner()" :cols="currentView == 1 ? 6 : 12">
|
||||
<div>
|
||||
<v-btn depressed tile> <v-icon>fa-bold</v-icon></v-btn>
|
||||
<v-btn depressed tile> <v-icon>fa-italic</v-icon></v-btn>
|
||||
@@ -44,7 +50,7 @@
|
||||
<v-textarea v-model="value" auto-grow></v-textarea>
|
||||
</v-col>
|
||||
<!-- WIKI -->
|
||||
<v-col v-show="showWiki()" :cols="currentView == 1 ? 6 : 12">
|
||||
<v-col v-if="showWiki()" :cols="currentView == 1 ? 6 : 12">
|
||||
<div class="aywiki" v-html="compiledOutput()"></div>
|
||||
</v-col>
|
||||
</v-row>
|
||||
@@ -67,14 +73,14 @@ export default {
|
||||
},
|
||||
props: {
|
||||
value: String,
|
||||
canEdit: Boolean
|
||||
readOnly: Boolean
|
||||
},
|
||||
methods: {
|
||||
switchViewIcon() {
|
||||
//return the icon that indicates what it will change to if you click it
|
||||
//mirror of switchview below
|
||||
|
||||
if (!this.canEdit) {
|
||||
if (this.readOnly) {
|
||||
if (this.currentView == HIDDEN_VIEW) {
|
||||
return "fa-eye";
|
||||
} else {
|
||||
@@ -102,7 +108,7 @@ export default {
|
||||
},
|
||||
switchView() {
|
||||
//if user can't edit then cycle between hidden and wiki view
|
||||
if (!this.canEdit) {
|
||||
if (this.readOnly) {
|
||||
if (this.currentView == HIDDEN_VIEW) {
|
||||
this.currentView = WIKI_VIEW;
|
||||
} else {
|
||||
@@ -157,6 +163,8 @@ Standard view maybe top and bottom better?
|
||||
baseurl setting for local images:
|
||||
https://marked.js.org/#/USING_ADVANCED.md#options
|
||||
|
||||
todo: event log type just for edit wiki?
|
||||
- this is because a wiki is not a discrete object in v8 so rights follow object itself and maybe it's necessary to know when wiki was edited?
|
||||
|
||||
Clean up the example markdown, go through and use mine and sprinkle in the marked sample stuff where it differs
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@
|
||||
<v-col cols="12">
|
||||
<gz-wiki
|
||||
v-model="obj.wikiContent"
|
||||
:canEdit="true"
|
||||
:readOnly="formstate.readOnly"
|
||||
:parentVM="this"
|
||||
></gz-wiki
|
||||
></v-col>
|
||||
|
||||
Reference in New Issue
Block a user