Merge branch 'release/0.16' of https://github.com/tainacan/tainacan into release/0.16
This commit is contained in:
commit
5514f2b5e0
|
@ -747,7 +747,7 @@ class Collection extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
if( $this->is_cover_page_enabled() && !is_numeric( $this->get_cover_page_id() ) ) {
|
if( $this->is_cover_page_enabled() && !is_numeric( $this->get_cover_page_id() ) ) {
|
||||||
$this->add_error($this->get_id(), __('cover page is enabled, please inform the page', 'tainacan'));
|
$this->add_error('cover_page_id', __('cover page is enabled, please inform the page', 'tainacan'));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -463,7 +463,7 @@
|
||||||
type="button"
|
type="button"
|
||||||
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
<p class="help is-danger">{{ formErrorMessage }}</p>
|
||||||
<div
|
<div
|
||||||
style="margin-left: auto;"
|
style="margin-left: auto;"
|
||||||
class="control">
|
class="control">
|
||||||
|
@ -487,7 +487,7 @@
|
||||||
class="button is-success">{{ $i18n.get('finish') }}</button>
|
class="button is-success">{{ $i18n.get('finish') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
<br>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div v-if="!isLoading && ((isNewCollection && !$userCaps.hasCapability('tnc_rep_edit_collections')) || (!isNewCollection && collection && collection.current_user_can_edit != undefined && collection.current_user_can_edit == false))">
|
<div v-if="!isLoading && ((isNewCollection && !$userCaps.hasCapability('tnc_rep_edit_collections')) || (!isNewCollection && collection && collection.current_user_can_edit != undefined && collection.current_user_can_edit == false))">
|
||||||
|
@ -711,48 +711,49 @@ export default {
|
||||||
this.fillExtraFormData(data);
|
this.fillExtraFormData(data);
|
||||||
|
|
||||||
this.updateCollection({collection_id: this.collectionId, collection: data })
|
this.updateCollection({collection_id: this.collectionId, collection: data })
|
||||||
.then(updatedCollection => {
|
.then(updatedCollection => {
|
||||||
|
|
||||||
this.collection = updatedCollection;
|
this.collection = updatedCollection;
|
||||||
|
|
||||||
// Fills hook forms with it's real values
|
// Fills hook forms with it's real values
|
||||||
this.updateExtraFormData(this.collection);
|
this.updateExtraFormData(this.collection);
|
||||||
|
|
||||||
// Fill this.form data with current data.
|
// Fill this.form data with current data.
|
||||||
this.form.name = this.collection.name;
|
this.form.name = this.collection.name;
|
||||||
this.form.slug = this.collection.slug;
|
this.form.slug = this.collection.slug;
|
||||||
this.form.description = this.collection.description;
|
this.form.description = this.collection.description;
|
||||||
this.form.status = this.collection.status;
|
this.form.status = this.collection.status;
|
||||||
this.form.cover_page_id = this.collection.cover_page_id;
|
this.form.cover_page_id = this.collection.cover_page_id;
|
||||||
this.form.enable_cover_page = this.collection.enable_cover_page;
|
this.form.enable_cover_page = this.collection.enable_cover_page;
|
||||||
this.form.enabled_view_modes = this.collection.enabled_view_modes.map((viewMode) => viewMode.viewMode);
|
this.form.enabled_view_modes = this.collection.enabled_view_modes.map((viewMode) => viewMode.viewMode);
|
||||||
this.form.default_view_mode = this.collection.default_view_mode;
|
this.form.default_view_mode = this.collection.default_view_mode;
|
||||||
this.form.allow_comments = this.collection.allow_comments;
|
this.form.allow_comments = this.collection.allow_comments;
|
||||||
|
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.formErrorMessage = '';
|
this.formErrorMessage = '';
|
||||||
this.editFormErrors = {};
|
this.editFormErrors = {};
|
||||||
|
|
||||||
if (this.fromImporter)
|
if (this.fromImporter)
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
else {
|
else {
|
||||||
if (goTo == 'metadata')
|
if (goTo == 'metadata')
|
||||||
this.$router.push(this.$routerHelper.getCollectionMetadataPath(this.collectionId));
|
this.$router.push(this.$routerHelper.getCollectionMetadataPath(this.collectionId));
|
||||||
else if (goTo == 'filters')
|
else if (goTo == 'filters')
|
||||||
this.$router.push(this.$routerHelper.getCollectionFiltersPath(this.collectionId));
|
this.$router.push(this.$routerHelper.getCollectionFiltersPath(this.collectionId));
|
||||||
else
|
else
|
||||||
this.$router.push(this.$routerHelper.getCollectionPath(this.collectionId));
|
this.$router.push(this.$routerHelper.getCollectionPath(this.collectionId));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
|
||||||
for (let attribute of Object.keys(error))
|
|
||||||
this.editFormErrors[attribute] = error[attribute];
|
|
||||||
}
|
|
||||||
this.formErrorMessage = errors.error_message;
|
|
||||||
|
|
||||||
this.isLoading = false;
|
for (let error of errors.errors) {
|
||||||
});
|
for (let attribute of Object.keys(error))
|
||||||
|
this.editFormErrors[attribute] = error[attribute];
|
||||||
|
}
|
||||||
|
this.formErrorMessage = errors.error_message;
|
||||||
|
|
||||||
|
this.isLoading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
createNewCollection() {
|
createNewCollection() {
|
||||||
// Puts loading on Draft Collection creation
|
// Puts loading on Draft Collection creation
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
:label="$i18n.get('label_name')"
|
:label="$i18n.get('label_name')"
|
||||||
:type="editFormErrors['name'] != undefined ? 'is-danger' : ''"
|
:type="editFormErrors['name'] != undefined ? 'is-danger' : ''"
|
||||||
:message="editFormErrors['name'] != undefined ? editFormErrors['name'] : ''">
|
:message="editFormErrors['name'] != undefined ? editFormErrors['name'] : ''">
|
||||||
|
<span class="required-metadatum-asterisk">*</span>
|
||||||
<help-button
|
<help-button
|
||||||
:title="$i18n.getHelperTitle('taxonomies', 'name')"
|
:title="$i18n.getHelperTitle('taxonomies', 'name')"
|
||||||
:message="$i18n.getHelperMessage('taxonomies', 'name')"/>
|
:message="$i18n.getHelperMessage('taxonomies', 'name')"/>
|
||||||
|
@ -178,6 +179,11 @@
|
||||||
type="button"
|
type="button"
|
||||||
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
@click="cancelBack">{{ $i18n.get('cancel') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
<p
|
||||||
|
style="margin: 0 12px;"
|
||||||
|
class="help is-danger">
|
||||||
|
{{ formErrorMessage }}
|
||||||
|
</p>
|
||||||
<p
|
<p
|
||||||
v-if="updatedAt != undefined"
|
v-if="updatedAt != undefined"
|
||||||
class="updated-at">
|
class="updated-at">
|
||||||
|
@ -191,7 +197,6 @@
|
||||||
class="button is-success">{{ $i18n.get('save') }}</button>
|
class="button is-success">{{ $i18n.get('save') }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="help is-danger">{{ formErrorMessage }}</p>
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div v-if="!isLoading && (($route.name == 'TaxonomyCreationForm' && !$userCaps.hasCapability('tnc_rep_edit_taxonomies')) || ($route.name == 'TaxonomyEditionForm' && taxonomy && taxonomy.current_user_can_edit != undefined && !taxonomy.current_user_can_edit))">
|
<div v-if="!isLoading && (($route.name == 'TaxonomyCreationForm' && !$userCaps.hasCapability('tnc_rep_edit_taxonomies')) || ($route.name == 'TaxonomyEditionForm' && taxonomy && taxonomy.current_user_can_edit != undefined && !taxonomy.current_user_can_edit))">
|
||||||
|
|
|
@ -93,6 +93,7 @@
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|
||||||
.filter-item-forms {
|
.filter-item-forms {
|
||||||
|
break-inside: avoid;
|
||||||
|
|
||||||
.collapse-trigger {
|
.collapse-trigger {
|
||||||
margin-left: -5px;
|
margin-left: -5px;
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
<div
|
<div
|
||||||
v-if="!isLoadingFilters &&
|
v-if="!isLoadingFilters &&
|
||||||
((filters.length >= 0 && isRepositoryLevel) || filters.length > 0)"
|
((filters.length >= 0 && isRepositoryLevel) || filters.length > 0)"
|
||||||
class="extra-margin">
|
class="filters-components-list">
|
||||||
|
|
||||||
<!-- TERM ITEMS PAGE FILTERS -->
|
<!-- TERM ITEMS PAGE FILTERS -->
|
||||||
<template v-if="taxonomy && taxonomyFilters">
|
<template v-if="taxonomy && taxonomyFilters">
|
||||||
|
@ -464,7 +464,7 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 0.75em !important;
|
font-size: 0.75em !important;
|
||||||
}
|
}
|
||||||
.extra-margin {
|
.filters-components-list {
|
||||||
margin-bottom: 64px;
|
margin-bottom: 64px;
|
||||||
}
|
}
|
||||||
.collection-name {
|
.collection-name {
|
||||||
|
|
|
@ -294,7 +294,7 @@
|
||||||
<b-field>
|
<b-field>
|
||||||
<label
|
<label
|
||||||
class="label is-hidden-touch is-hidden-desktop-only"
|
class="label is-hidden-touch is-hidden-desktop-only"
|
||||||
style="margin-right: -10px;">
|
:style="{ marginRight: showInlineViewModeOptions ? '' : '-10px'}">
|
||||||
{{ $i18n.get('label_visualization') + ': ' }}
|
{{ $i18n.get('label_visualization') + ': ' }}
|
||||||
</label>
|
</label>
|
||||||
<label
|
<label
|
||||||
|
|
|
@ -44,9 +44,36 @@
|
||||||
background: var(--tainacan-white);
|
background: var(--tainacan-white);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
#filters-modal .modal-close {
|
||||||
|
right: var(--tainacan-one-column) !important;
|
||||||
|
right: 4.1666667vw !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-content {
|
||||||
|
padding: 42px 4.1666667vw !important;
|
||||||
|
|
||||||
|
.filters-components-list {
|
||||||
|
column-count: 3;
|
||||||
|
column-gap: 3em;
|
||||||
|
column-rule: 1px solid var(--tainacan-gray2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 1024px) {
|
||||||
|
.modal-content {
|
||||||
|
.filters-components-list {
|
||||||
|
column-count: 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
.modal-content {
|
.modal-content {
|
||||||
margin-right: 0px !important;
|
margin-right: 0px !important;
|
||||||
|
|
||||||
|
.filters-components-list {
|
||||||
|
column-count: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue