use allow comments instead of comment status in collection
This commit is contained in:
parent
8910ad2ab8
commit
a8cbdd304a
|
@ -236,10 +236,10 @@
|
|||
size="is-small"
|
||||
true-value="open"
|
||||
false-value="closed"
|
||||
v-model="form.comment_status" />
|
||||
v-model="form.allow_comments" />
|
||||
<help-button
|
||||
:title="$i18n.getHelperTitle('collections', 'comment_status')"
|
||||
:message="$i18n.getHelperMessage('collections', 'comment_status')"/>
|
||||
:title="$i18n.getHelperTitle('collections', 'allow_comments')"
|
||||
:message="$i18n.getHelperMessage('collections', 'allow_comments')"/>
|
||||
</b-field>
|
||||
</div>
|
||||
<div class="column is-1" />
|
||||
|
@ -440,7 +440,7 @@ export default {
|
|||
moderators_ids: [],
|
||||
enabled_view_modes: [],
|
||||
default_view_mode: [],
|
||||
comment_status: ''
|
||||
allow_comments: ''
|
||||
},
|
||||
thumbnail: {},
|
||||
cover: {},
|
||||
|
@ -543,7 +543,7 @@ export default {
|
|||
parent: this.form.parent,
|
||||
enabled_view_modes: this.form.enabled_view_modes,
|
||||
default_view_mode: this.form.default_view_mode,
|
||||
comment_status: this.form.comment_status
|
||||
allow_comments: this.form.allow_comments
|
||||
};
|
||||
this.updateCollection(data).then(updatedCollection => {
|
||||
|
||||
|
@ -558,7 +558,7 @@ export default {
|
|||
this.form.enable_cover_page = this.collection.enable_cover_page;
|
||||
this.form.enabled_view_modes = this.collection.enabled_view_modes;
|
||||
this.form.default_view_mode = this.collection.default_view_mode;
|
||||
this.form.comment_status = this.collection.comment_status;
|
||||
this.form.allow_comments = this.collection.allow_comments;
|
||||
|
||||
this.isLoading = false;
|
||||
this.formErrorMessage = '';
|
||||
|
@ -603,7 +603,7 @@ export default {
|
|||
this.form.default_view_mode = this.collection.default_view_mode;
|
||||
this.form.enabled_view_modes = [];
|
||||
this.moderators = [];
|
||||
this.form.comment_status = this.collection.comment_status;
|
||||
this.form.allow_comments = this.collection.allow_comments;
|
||||
|
||||
// Pre-fill status with publish to incentivate it
|
||||
this.form.status = 'publish';
|
||||
|
@ -790,7 +790,7 @@ export default {
|
|||
this.form.default_view_mode = this.collection.default_view_mode;
|
||||
this.form.enabled_view_modes = JSON.parse(JSON.stringify(this.collection.enabled_view_modes));
|
||||
this.moderators = JSON.parse(JSON.stringify(this.collection.moderators));
|
||||
this.form.comment_status = this.collection.comment_status;
|
||||
this.form.allow_comments = this.collection.allow_comments;
|
||||
|
||||
// Generates CoverPage from current cover_page_id info
|
||||
if (this.form.cover_page_id != undefined && this.form.cover_page_id != '') {
|
||||
|
|
|
@ -254,7 +254,7 @@
|
|||
<b-field
|
||||
:addons="false"
|
||||
:label="$i18n.get('label_comment_status')"
|
||||
v-if="collectionCommentStatus == 'open'">
|
||||
v-if="collectionAllowComments == 'open'">
|
||||
<b-switch
|
||||
id="tainacan-checkbox-comment-status"
|
||||
size="is-small"
|
||||
|
@ -485,7 +485,7 @@ export default {
|
|||
textLink: '',
|
||||
isUpdatingValues: false,
|
||||
collectionName: '',
|
||||
collectionCommentStatus: ''
|
||||
collectionAllowComments: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -524,7 +524,7 @@ export default {
|
|||
]),
|
||||
...mapActions('collection', [
|
||||
'fetchCollectionName',
|
||||
'fetchCollectionCommentStatus',
|
||||
'fetchCollectionAllowComments',
|
||||
'deleteItem',
|
||||
]),
|
||||
onSubmit(status) {
|
||||
|
@ -827,9 +827,9 @@ export default {
|
|||
this.collectionName = collectionName;
|
||||
});
|
||||
|
||||
// Obtains collection name
|
||||
this.fetchCollectionCommentStatus(this.collectionId).then((collectionCommentStatus) => {
|
||||
this.collectionCommentStatus = collectionCommentStatus;
|
||||
// Obtains if collection allow items comments
|
||||
this.fetchCollectionAllowComments(this.collectionId).then((collectionAllowComments) => {
|
||||
this.collectionAllowComments = collectionAllowComments;
|
||||
});
|
||||
|
||||
// Sets feedback variables
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<b-field
|
||||
:addons="false"
|
||||
:label="$i18n.get('label_comment_status')"
|
||||
v-if="collectionCommentStatus == 'open'">
|
||||
v-if="collectionAllowComments == 'open'">
|
||||
<b-switch
|
||||
id="tainacan-checkbox-comment-status"
|
||||
size="is-small"
|
||||
|
@ -271,7 +271,7 @@
|
|||
collectionName: '',
|
||||
thumbPlaceholderPath: tainacan_plugin.base_url + '/admin/images/placeholder_square.png',
|
||||
urls_open: false,
|
||||
collectionCommentStatus: ''
|
||||
collectionAllowComments: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
|
@ -285,7 +285,7 @@
|
|||
]),
|
||||
...mapActions('collection', [
|
||||
'fetchCollectionName',
|
||||
'fetchCollectionCommentStatus'
|
||||
'fetchCollectionAllowComments'
|
||||
]),
|
||||
...mapGetters('item', [
|
||||
'getItem',
|
||||
|
@ -370,8 +370,8 @@
|
|||
this.fetchAttachments(this.itemId);
|
||||
|
||||
// Obtains collection Comment Status
|
||||
this.fetchCollectionCommentStatus(this.collectionId).then((collectionCommentStatus) => {
|
||||
this.collectionCommentStatus = collectionCommentStatus;
|
||||
this.fetchCollectionAllowComments(this.collectionId).then((collectionAllowComments) => {
|
||||
this.collectionAllowComments = collectionAllowComments;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue