Commit 83e1a5c4 authored by Vladimir Erokhov's avatar Vladimir Erokhov

Merge branch 'feature/sidebar-links-clickable-area' into 'develop'

feature/sidebar-links-clickable-area

See merge request !661
parents 15f3303e 961c659d
Pipeline #4468 passed with stage
in 3 minutes and 44 seconds
......@@ -5,12 +5,12 @@
transition="slide-y-reverse-transition",
v-bind="wrapperProps"
)
v-tooltip(slot="activator", left)
v-tooltip(slot="activator", right)
v-btn.primary(slot="activator", :input-value="isVSpeedDialOpen", v-bind="buttonProps")
v-icon settings
v-icon close
span {{ $t('layout.sideBar.buttons.settings') }}
v-tooltip(v-if="hasUpdateAnyViewAccess || hasDeleteAnyViewAccess", left)
v-tooltip(v-if="hasUpdateAnyViewAccess || hasDeleteAnyViewAccess", right)
v-btn(
slot="activator",
:input-value="isEditingMode",
......@@ -23,7 +23,7 @@
v-icon(dark) edit
v-icon(dark) done
span {{ $t('layout.sideBar.buttons.edit') }}
v-tooltip(v-if="hasCreateAnyViewAccess", left)
v-tooltip(v-if="hasCreateAnyViewAccess", right)
v-btn(
slot="activator",
color="green darken-4",
......
......@@ -30,25 +30,30 @@
)
v-icon(small) edit
v-card.secondary.lighten-1.white--text(v-for="view in getAvailableViewsForGroup(group)", :key="view._id")
v-card-text.panel-item-content
router-link.panel-item-content-link(:title="view.title", :to="{ name: 'view', params: { id: view._id } }")
span.pl-3 {{ view.title }}
v-btn(
v-show="(checkUpdateViewAccessById(view._id) || checkDeleteViewAccessById(view._id)) && isEditingMode",
depressed,
small,
icon,
@click.prevent="showEditViewModal(view)"
)
v-icon(small) edit
v-btn(
v-show="isEditingMode",
depressed,
small,
icon,
@click.prevent="showDuplicateViewModal(view)"
)
v-icon(small) file_copy
router-link.panel-item-content-link(:title="view.title", :to="{ name: 'view', params: { id: view._id } }")
v-card-text.panel-item-content
v-layout(align-center, justify-space-between)
v-flex
span.pl-2 {{ view.title }}
v-flex
v-layout(justify-end)
v-btn.ma-0(
:v-show="checkViewEditButtonAccessById(view._id)",
depressed,
small,
icon,
@click.prevent="showEditViewModal(view)"
)
v-icon(small) edit
v-btn.ma-0(
v-show="isEditingMode",
depressed,
small,
icon,
@click.prevent="showDuplicateViewModal(view)"
)
v-icon(small) file_copy
v-divider
v-divider
groups-settings-button(
:isEditingMode="isEditingMode",
......
......@@ -31,7 +31,7 @@
v-list-tile-title
span {{ view.title }}
v-btn.edit-view-button(
v-show="(checkUpdateViewAccessById(view._id) || checkDeleteViewAccessById(view._id)) && isEditingMode",
v-show="checkViewEditButtonAccessById(view._id)",
color="grey darken-2",
depressed,
small,
......
......@@ -33,6 +33,11 @@ export default {
getAvailableViewsForGroup() {
return group => group.views.filter(view => this.checkReadAccess(view._id));
},
checkViewEditButtonAccessById(viewId) {
return id =>
(this.checkUpdateViewAccessById(id) || this.checkDeleteViewAccessById(viewId)) && this.isEditingMode;
},
},
mounted() {
this.fetchGroupsList();
......
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