diff --git a/src/admin/components/lists/filters-list.vue b/src/admin/components/lists/filters-list.vue index 2b8a983be..9c883f1b2 100644 --- a/src/admin/components/lists/filters-list.vue +++ b/src/admin/components/lists/filters-list.vue @@ -42,7 +42,7 @@ :class="{'filters-area-receive': isDraggingFromAvailable}" v-model="activeFilterList" :group="{ name:'filters', pull: false, put: true }" - :sort="(openedFilterId == '' || openedFilterId == undefined) && !isRepositoryLevel && collection && collection.current_user_can_edit" + :sort="(openedFilterId == '' || openedFilterId == undefined) && !isRepositoryLevel" :handle="'.handle'" ghost-class="sortable-ghost" filter="not-sortable-item" @@ -50,7 +50,7 @@
+ class="notice notice-success notice-alt">

{{ $i18n.get('User Role Saved') }}

@@ -183,7 +183,8 @@
-

  {{ $i18n.get('Some capabilities, such as "Manage Tainacan" and any related to All Collections shall affect other Collections capabilities.') }}

+

  {{ $i18n.get('The capability "Manage Tainacan" may affect other capabilities related to repository and collections.') }}

+

  {{ $i18n.get('Capabilities related to All Collections shall affect other Collections capabilities.') }}

@@ -419,6 +420,14 @@ justify-content: space-between; align-content: center; margin: 2rem 0 1rem 0; + + p { + margin: 0; + padding: 0; + } + .button { + padding: 2px 16px; + } } .name-edition-box label { margin-right: 2rem; diff --git a/src/admin/tainacan-admin-i18n.php b/src/admin/tainacan-admin-i18n.php index 3833690ae..78a0b0b17 100644 --- a/src/admin/tainacan-admin-i18n.php +++ b/src/admin/tainacan-admin-i18n.php @@ -694,8 +694,8 @@ return apply_filters( 'tainacan-admin-i18n', [ 'info_can_not_read_activities' => __( 'You are not allowed to read activities.', 'tainacan' ), 'info_can_not_edit_item' => __( 'You are not allowed to edit this item.', 'tainacan' ), 'info_can_not_bulk_edit_items_collection' => __( 'You are not allowed to bulk edit items from this collection.', 'tainacan' ), - 'info_not_allowed_change_order_metadata' => __( 'You are not allowed to change metadata order since you can\'t edit the collection.', 'tainacan' ), - 'info_not_allowed_change_order_filters' => __( 'You are not allowed to change filters order since you can\'t edit the collection.', 'tainacan' ), + 'info_not_allowed_change_order_metadata' => __( 'Can not change metadata order now.', 'tainacan' ), + 'info_not_allowed_change_order_filters' => __( 'Can not change filters order now.', 'tainacan' ), // Datepicker months 'datepicker_month_january' => __( 'January', 'tainacan' ), diff --git a/src/js/store/modules/collection/actions.js b/src/js/store/modules/collection/actions.js index 230089095..4916b90b0 100644 --- a/src/js/store/modules/collection/actions.js +++ b/src/js/store/modules/collection/actions.js @@ -258,10 +258,8 @@ export const updateCollection = ({ commit }, { collection }) => { return new Promise((resolve, reject) => { - axios.tainacan.patch('/collections/' + collection_id, collection).then( res => { + axios.tainacan.patch('/collections/' + collection_id + '?context=edit', collection).then( res => { commit('setCollection', collection); - commit('setCollectionName', res.data.name); - commit('setCollectionURL', res.data.url); resolve( res.data ); }).catch( error => { reject({ error_message: error['response']['data'].error_message, errors: error['response']['data'].errors }); @@ -274,7 +272,7 @@ export const sendCollection = ( { commit }, collection) => { return new Promise(( resolve, reject ) => { let param = collection; param[tainacan_plugin.exposer_mapper_param] = collection.mapper; - axios.tainacan.post('/collections/', param) + axios.tainacan.post('/collections/?context=edit', param) .then( res => { let collection = res.data; commit('setCollection', collection); @@ -328,7 +326,7 @@ export const fetchAttachments = ({ commit }, collection_id) => { export const updateThumbnail = ({ commit }, { collectionId, thumbnailId }) => { return new Promise((resolve, reject) => { - axios.tainacan.patch('/collections/' + collectionId, { + axios.tainacan.patch('/collections/' + collectionId + '?context=edit', { _thumbnail_id: thumbnailId }).then( res => { let collection = res.data @@ -343,7 +341,7 @@ export const updateThumbnail = ({ commit }, { collectionId, thumbnailId }) => { export const updateHeaderImage = ({ commit }, { collectionId, headerImageId }) => { return new Promise((resolve, reject) => { - axios.tainacan.patch('/collections/' + collectionId, { + axios.tainacan.patch('/collections/' + collectionId + '?context=edit', { header_image_id: headerImageId + '' }).then( res => { let collection = res.data diff --git a/src/js/store/modules/filter/actions.js b/src/js/store/modules/filter/actions.js index 5f4b0919e..68d6fcd00 100644 --- a/src/js/store/modules/filter/actions.js +++ b/src/js/store/modules/filter/actions.js @@ -128,7 +128,7 @@ export const addTemporaryFilter = ({ commit }, filter ) => { export const updateCollectionFiltersOrder = ({ commit }, { collectionId, filtersOrder }) => { return new Promise((resolve, reject) => { - axios.tainacan.patch('/collections/' + collectionId, { + axios.tainacan.patch('/collections/' + collectionId + '/filters_order?context=edit', { filters_order: filtersOrder }).then( res => { commit('collection/setCollection', res.data, { root: true }); diff --git a/src/js/store/modules/metadata/actions.js b/src/js/store/modules/metadata/actions.js index 94def16a3..c75999ab8 100644 --- a/src/js/store/modules/metadata/actions.js +++ b/src/js/store/modules/metadata/actions.js @@ -136,7 +136,7 @@ export const cleanMetadata = ({commit}) => { export const updateCollectionMetadataOrder = ({ commit }, {collectionId, metadataOrder}) => { return new Promise((resolve, reject) => { - axios.tainacan.patch('/collections/' + collectionId, { + axios.tainacan.patch('/collections/' + collectionId + '/metadata_order?context=edit', { metadata_order: metadataOrder }).then(res => { commit('collection/setCollection', res.data, { root: true });