Commit 0bdbe449 authored by Anton Koch's avatar Anton Koch

Merge branch '337-documents-removal---shared' into 'master'

removed everything documents related in navigation (#337)

See merge request !32
parents 67bfc6d2 36445d18
Pipeline #50996 passed with stage
in 4 minutes and 54 seconds
......@@ -56,7 +56,7 @@
export default {
name: 'breadcrumb-nav',
props: ['timeline', 'mediaMetadata', 'media', 'grid', 'document'],
props: ['timeline', 'mediaMetadata', 'media', 'grid'],
components: {
UserNavButton
},
......@@ -74,11 +74,6 @@
route: 'mosys.grids.list',
path: '/mosys/grids'
},
documents: {
label: 'Documents',
route: 'documents.list',
path: '/documents/list'
},
users: {
label: 'Account Settings',
route: 'users.manage',
......@@ -129,17 +124,6 @@
route: '/mosys/grids/' + this.grid._uuid
})
}
if (this.document) {
bc.push({
label: this.document,
route: '/documents/edit'
})
}
if (this.$route.name === 'documents.edit') {
bc.push({
label: this.$route.params.asset
})
}
// const b = this.$route.name.split('.')
// if (b.length === 3) {
// const s = b[2]
......@@ -167,12 +151,6 @@
route: '/mosys/grids'
})
}
if (parts[0] === 'documents') {
bc.push({
label: 'Add document',
route: '/documents/list'
})
}
}
return bc
},
......@@ -236,23 +214,6 @@
name: 'mosys.grids.edit'
})
}
// ---------------------------------------------------------------------------------------------------- document
if (this.document) {
di = []
di.push({
label: this.$t('navigation.documents.documents_copy_url'),
route: '/documents/copy_url'
// name: 'bbb'
}, {
label: this.$t('navigation.documents.documents_download'),
route: '/documents/download'
// name: 'bbb'
}, {
label: this.$t('navigation.documents.documents_edit'),
route: '/documents/edit'
// name: 'bbb'
})
}
return di
},
addButton () {
......@@ -278,13 +239,6 @@
name: 'piecemaker.media.create'
}
}
if (this.breadcrumbs[0].label === 'Documents') {
ab = {
label: this.$t('buttons.create_document'),
route: '/documents/create',
name: 'documents.create'
}
}
return ab
},
cancelButton () {
......
......@@ -101,12 +101,6 @@
],
gridCreate: [
'mosys.grids.create'
],
document: [
'documents.list'
],
documentCreate: [
'documents.create'
]
},
config: {
......@@ -324,34 +318,6 @@
}
},
*/
/*
document: {
specialFunctions: {
'documents.list': [
{
type: 'link',
label: this.$t('buttons.create_document'),
color: 'primary',
name: 'documents.create',
icon: 'add'
}
]
}
},
*/
/*
documentCreate: {
specialFunctions: {
'documents.create': [
{
type: 'link',
label: 'Cancel',
name: 'documents.list'
}
]
}
}
*/
}
}
},
......
......@@ -13,8 +13,7 @@
// breadcrumbs in toolbar? horizontally scrollable when content wider than viewport width.
.gt-xs
// FIXME: this needs to become abstract instead of one prop per case
breadcrumb-nav(:timeline="timeline", :mediaMetadata="mediaMetadata", :media="media", :grid="grid",
:document="document")
breadcrumb-nav(:timeline="timeline", :mediaMetadata="mediaMetadata", :media="media", :grid="grid")
// display current app name in mobile view
.lt-sm
......@@ -205,46 +204,7 @@
:class="[currentRoute === 'mosys.grids.create' ? 'bg-grey-9' : 'bg-primary']")
q-item-side(v-if="currentRoute === 'mosys.grids.create'")
q-btn.bg-primary.text-white(type="a", to="/mosys/grids", icon="clear", round, size="sm")
// --------------------------------------------------------------------------------------------------- documents
q-item.q-pa-none(v-if="showDocuments", multiline, :class="{'active-app': currentApp === 'documents'}")
// q-item-side
q-icon.q-mt-md.q-ml-md.icon-offset(:class="[currentApp === 'documents' ? 'text-primary' : 'text-white']",
name="attach_file", size="1.2rem")
q-item-main
q-item-tile
user-nav-button.text-white(
@click.native="clearCurrentId",
:route="'/documents/list'",
:label="$t('navigation.documents.label')",
:name="'documents.list'",
:class="[currentApp === 'documents' ? 'bg-grey-10' : '']")
q-list.q-pa-none.q-ml-sm.q-mr-md.q-mt-md.q-mb-lg.lt-sm(v-if="documents", multiline)
q-item.q-pa-none.q-pl-sm
q-item-side
q-icon.q-mt-sm.icon-color-inactive(name="chevron_right")
q-item-main
q-item-tile
user-nav-button(
:route="'/documents/edit'",
:label="$t('navigation.documents.documents_edit')",
:name="'documents.edit'")
// "add document"-button
q-item.q-my-sm.lt-sm(v-if="currentApp === 'documents'", :class="{'q-pt-sm': currentId.grid}")
q-item-main
user-nav-button.text-white.round-borders(
:route="'/documents/create'",
:label="$t('buttons.create_document')",
:name="'documents.create'",
:icon="'add'",
:disabled="currentRoute === 'documents.create'",
:class="[currentRoute === 'documents.create' ? 'bg-grey-9' : 'bg-primary']")
q-item-side(v-if="currentRoute === 'documents.create'")
q-btn.bg-primary.text-white(type="a", to="/documents/list", icon="clear", round, size="sm")
// -------------------------------------------------------------------------------------------- account settings
q-item.q-pa-none.ui-border-bottom.q-mt-xl(multiline, :class="{'active-app': currentApp === 'users'}")
//
......@@ -286,7 +246,6 @@
<script>
import { openURL } from 'quasar'
import { mapGetters } from 'vuex'
import { userHasFeature } from 'mbjs-quasar/src/lib'
import { parseURI } from 'mbjs-data-models/src/lib'
// import ButtonList from './ButtonList'
......@@ -336,8 +295,7 @@
currentId: {
timeline: undefined,
media: undefined,
grid: undefined,
documents: undefined
grid: undefined
}
}
},
......@@ -345,9 +303,6 @@
...mapGetters({
user: 'auth/getUserState'
}),
userHasDocuments () {
return userHasFeature(this.user, 'documents')
},
isElectron () {
return this.$q.platform.is.electron
},
......@@ -357,9 +312,6 @@
showMosys () {
return !process.env.UI_HIDE_MOSYS
},
showDocuments () {
return !process.env.UI_HIDE_DOCUMENTS
},
editUserURL () {
return process.env.OAUTH_EDIT_PROFILE_URL
},
......@@ -381,7 +333,7 @@
if (process.env.OAUTH_EDIT_PROFILE_URL) openURL(process.env.OAUTH_EDIT_PROFILE_URL)
},
clearCurrentId () {
this.currentId.timeline = this.currentId.grid = this.currentId.documents = this.currentId.media = ''
this.currentId.timeline = this.currentId.grid = this.currentId.media = ''
},
checkRoute (route) {
this.timeline = undefined
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment