Merge branch 'develop' of https://github.com/tainacan/tainacan into develop
This commit is contained in:
commit
9b084279e2
|
@ -905,24 +905,24 @@ export default {
|
||||||
this.form.document_type = 'url';
|
this.form.document_type = 'url';
|
||||||
this.form.document = this.urlLink;
|
this.form.document = this.urlLink;
|
||||||
this.updateItemDocument({ item_id: this.itemId, document: this.form.document, document_type: this.form.document_type })
|
this.updateItemDocument({ item_id: this.itemId, document: this.form.document, document_type: this.form.document_type })
|
||||||
.then(item => {
|
.then(item => {
|
||||||
this.item.document_as_html = item.document_as_html;
|
this.item.document_as_html = item.document_as_html;
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
|
|
||||||
let oldThumbnail = this.item.thumbnail;
|
let oldThumbnail = this.item.thumbnail;
|
||||||
if (item.document_type == 'url' && oldThumbnail != item.thumbnail )
|
if (item.document_type == 'url' && oldThumbnail != item.thumbnail )
|
||||||
this.item.thumbnail = item.thumbnail;
|
this.item.thumbnail = item.thumbnail;
|
||||||
})
|
})
|
||||||
.catch((errors) => {
|
.catch((errors) => {
|
||||||
for (let error of errors.errors) {
|
for (let error of errors.errors) {
|
||||||
for (let metadatum of Object.keys(error)){
|
for (let metadatum of Object.keys(error)){
|
||||||
eventBus.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
eventBus.errors.push({ metadatum_id: metadatum, errors: error[metadatum]});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
this.formErrorMessage = errors.error_message;
|
||||||
this.formErrorMessage = errors.error_message;
|
|
||||||
|
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
cancelURLSelection() {
|
cancelURLSelection() {
|
||||||
this.isURLModalActive = false;
|
this.isURLModalActive = false;
|
||||||
|
@ -945,11 +945,24 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
deleteAttachment(attachment) {
|
deleteAttachment(attachment) {
|
||||||
this.removeAttachmentFromItem(attachment.id)
|
|
||||||
.then(() => { })
|
this.$modal.open({
|
||||||
.catch((error) => {
|
parent: this,
|
||||||
this.$console.error(error);
|
component: CustomDialog,
|
||||||
});
|
props: {
|
||||||
|
icon: 'alert',
|
||||||
|
title: this.$i18n.get('label_warning'),
|
||||||
|
message: this.$i18n.get('info_warning_attachment_delete'),
|
||||||
|
onConfirm: () => {
|
||||||
|
this.removeAttachmentFromItem(attachment.id)
|
||||||
|
.then(() => { })
|
||||||
|
.catch((error) => {
|
||||||
|
this.$console.error(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
initializeMediaFrames() {
|
initializeMediaFrames() {
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,10 @@
|
||||||
<p><strong>{{ $i18n.get('label_activity_author') }}:</strong> {{ activity.user_name }}</p>
|
<p><strong>{{ $i18n.get('label_activity_author') }}:</strong> {{ activity.user_name }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<template v-for="(diff, attributeName) in activity.log_diffs">
|
<template v-for="(diff, attributeName, index) in activity.log_diffs">
|
||||||
<div class="columns">
|
<div
|
||||||
|
:key="index"
|
||||||
|
class="columns">
|
||||||
|
|
||||||
<!-- OLD -->
|
<!-- OLD -->
|
||||||
<div class="column is-6">
|
<div class="column is-6">
|
||||||
|
@ -45,8 +47,9 @@
|
||||||
<div
|
<div
|
||||||
class="tainacan-attachments-in-modal"
|
class="tainacan-attachments-in-modal"
|
||||||
v-if="diff.old.length">
|
v-if="diff.old.length">
|
||||||
<template v-for="attachment in diff.old">
|
<template v-for="(attachment, anotherIndex ) in diff.old">
|
||||||
<div
|
<div
|
||||||
|
:key="anotherIndex"
|
||||||
class="box"
|
class="box"
|
||||||
v-if="attachment.mime_type.includes('image')">
|
v-if="attachment.mime_type.includes('image')">
|
||||||
<p class="tainacan-p-overflow">{{ `${$i18n.get('label_title')}: ${attachment.title}` }}</p>
|
<p class="tainacan-p-overflow">{{ `${$i18n.get('label_title')}: ${attachment.title}` }}</p>
|
||||||
|
@ -59,6 +62,7 @@
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
:key="anotherIndex"
|
||||||
class="box"
|
class="box"
|
||||||
v-else-if="['pdf', 'audio', 'video'].includes(attachment.mime_type.split('/')[1])">
|
v-else-if="['pdf', 'audio', 'video'].includes(attachment.mime_type.split('/')[1])">
|
||||||
<p class="tainacan-p-overflow">{{ `${$i18n.get('label_title')}: ${attachment.title}` }}</p>
|
<p class="tainacan-p-overflow">{{ `${$i18n.get('label_title')}: ${attachment.title}` }}</p>
|
||||||
|
@ -165,8 +169,9 @@
|
||||||
<div
|
<div
|
||||||
class="tainacan-attachments-in-modal"
|
class="tainacan-attachments-in-modal"
|
||||||
v-if="diff.new.length">
|
v-if="diff.new.length">
|
||||||
<template v-for="attachment in diff.new">
|
<template v-for="(attachment, index) in diff.new">
|
||||||
<div
|
<div
|
||||||
|
:key="index"
|
||||||
class="box"
|
class="box"
|
||||||
v-if="attachment.mime_type.includes('image')">
|
v-if="attachment.mime_type.includes('image')">
|
||||||
<p class="tainacan-p-overflow">{{ `${$i18n.get('label_title')}: ${attachment.title}` }}</p>
|
<p class="tainacan-p-overflow">{{ `${$i18n.get('label_title')}: ${attachment.title}` }}</p>
|
||||||
|
@ -179,6 +184,7 @@
|
||||||
</figure>
|
</figure>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
:key="index"
|
||||||
class="box"
|
class="box"
|
||||||
v-else-if="['pdf', 'audio', 'video'].includes(attachment.mime_type.split('/')[1])">
|
v-else-if="['pdf', 'audio', 'video'].includes(attachment.mime_type.split('/')[1])">
|
||||||
<p class="tainacan-p-overflow">{{ `${$i18n.get('label_title')}: ${attachment.title}` }}</p>
|
<p class="tainacan-p-overflow">{{ `${$i18n.get('label_title')}: ${attachment.title}` }}</p>
|
||||||
|
@ -373,7 +379,6 @@
|
||||||
.tainacan-modal-content {
|
.tainacan-modal-content {
|
||||||
width: auto;
|
width: auto;
|
||||||
min-height: 600px;
|
min-height: 600px;
|
||||||
border-radius: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-card-body {
|
.modal-card-body {
|
||||||
|
|
|
@ -698,7 +698,6 @@
|
||||||
.tainacan-modal-content {
|
.tainacan-modal-content {
|
||||||
width: auto;
|
width: auto;
|
||||||
min-height: 600px;
|
min-height: 600px;
|
||||||
border-radius: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tainacan-modal-title {
|
.tainacan-modal-title {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
.tainacan-modal-title {
|
.tainacan-modal-title {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-bottom: 40px;
|
margin-bottom: 30px;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
|
||||||
|
@ -32,6 +32,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.tainacan-modal-content {
|
.tainacan-modal-content {
|
||||||
|
border-radius: 0px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
padding: 40px 50px;
|
padding: 40px 50px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
@ -417,6 +417,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
||||||
'info_collection_deleted' => __( 'Collection deleted.', 'tainacan' ),
|
'info_collection_deleted' => __( 'Collection deleted.', 'tainacan' ),
|
||||||
'info_item_deleted' => __( 'Item deleted.', 'tainacan' ),
|
'info_item_deleted' => __( 'Item deleted.', 'tainacan' ),
|
||||||
'info_taxonomy_deleted' => __( 'Taxonomy deleted', 'tainacan' ),
|
'info_taxonomy_deleted' => __( 'Taxonomy deleted', 'tainacan' ),
|
||||||
|
'info_warning_attachment_delete' => __( 'Do you really want to delete this attachment?', 'tainacan' ),
|
||||||
'info_warning_collection_delete' => __( 'Do you really want to permanently delete this collection?', 'tainacan' ),
|
'info_warning_collection_delete' => __( 'Do you really want to permanently delete this collection?', 'tainacan' ),
|
||||||
'info_warning_collection_trash' => __( 'Do you really want to trash this collection?', 'tainacan' ),
|
'info_warning_collection_trash' => __( 'Do you really want to trash this collection?', 'tainacan' ),
|
||||||
'info_warning_item_delete' => __( 'Do you really want to permanently delete this item?', 'tainacan' ),
|
'info_warning_item_delete' => __( 'Do you really want to permanently delete this item?', 'tainacan' ),
|
||||||
|
|
Loading…
Reference in New Issue