Commit 06c227d6 authored by Anton Koch's avatar Anton Koch

Merge branch '379-acl-options-menu---shared' into 'release_2_0'

Create ACL options menu (#379)

See merge request !35
parents a8c5b905 c0ff15c1
Pipeline #52705 passed with stage
in 5 minutes and 8 seconds
<template lang="pug">
content-block
headline(:content="$t('labels.access_control_rights')")
q-table(:columns="config.columns", :data="tableData", dark, :pagination.sync="config.pagination", hide-bottom)
q-td(slot="body-cell-actions", slot-scope="props", :props="props")
template(v-for="btn in actions")
q-select.inline.ui-border.q-pl-sm(
v-if="btn.type === 'acl'",
v-model="model.acl",
:options="btn.options",
@input="inputChange",
hide-underline, no-parent-field, dark)
</template>
<script>
import Headline from '../../../components/shared/elements/Headline'
import ContentBlock from '../../../components/shared/elements/ContentBlock'
export default {
name: 'Permissions',
components: { ContentBlock, Headline },
data () {
return {
model: {acl: 'none'},
inviteUrl: 'https://url.motionbank.org/Dh23DJa7',
tableData: [
{ title: 'My Super Group', id: 'asdf-1234' },
{ title: 'My Other Group', id: 'qwer-5678' }
],
config: {
pagination: {
rowsPerPage: 0
},
columns: [
{
name: 'title',
required: true,
label: 'Title',
align: 'left',
field: 'title',
sortable: true
}
]
},
actions: [
{
type: 'acl',
options: [
{
label: 'None',
value: 'none'
},
{
label: 'Read',
value: 'read'
},
{
label: 'Write',
value: 'write'
}
]
}
]
}
},
mounted () {
this.config.columns.push({
name: 'actions',
align: 'right',
type: 'string',
filter: false,
sortable: false,
sort: false
// format: makeFormatter('actions')
})
},
methods: {
inputChange () {
console.log('select change')
}
}
}
</script>
<style scoped lang="stylus">
</style>
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