Removes the use of value_as_string from table item view for textarea values.
This commit is contained in:
parent
04cfd8cc28
commit
7b4425485b
|
@ -804,7 +804,7 @@
|
||||||
column.metadatum !== 'row_author' &&
|
column.metadatum !== 'row_author' &&
|
||||||
column.metadatum !== 'row_title' &&
|
column.metadatum !== 'row_title' &&
|
||||||
column.metadatum !== 'row_description'"
|
column.metadatum !== 'row_description'"
|
||||||
v-html="renderMetadata(item.metadata, column) != '' ? renderMetadata(item.metadata, column, column.metadata_type_object.component) : `<span class='has-text-gray3 is-italic'>` + $i18n.get('label_value_not_informed') + `</span>`"/>
|
v-html="renderMetadata(item.metadata, column) != '' ? renderMetadata(item.metadata, column) : `<span class='has-text-gray3 is-italic'>` + $i18n.get('label_value_not_informed') + `</span>`"/>
|
||||||
|
|
||||||
<span v-if="column.metadatum == 'row_thumbnail'">
|
<span v-if="column.metadatum == 'row_thumbnail'">
|
||||||
<img
|
<img
|
||||||
|
@ -1246,16 +1246,13 @@ export default {
|
||||||
goToItemEditPage(item) {
|
goToItemEditPage(item) {
|
||||||
this.$router.push(this.$routerHelper.getItemEditPath(item.collection_id, item.id));
|
this.$router.push(this.$routerHelper.getItemEditPath(item.collection_id, item.id));
|
||||||
},
|
},
|
||||||
renderMetadata(itemMetadata, column, component) {
|
renderMetadata(itemMetadata, column) {
|
||||||
|
|
||||||
let metadata = (itemMetadata != undefined && itemMetadata[column.slug] != undefined) ? itemMetadata[column.slug] : false;
|
let metadata = (itemMetadata != undefined && itemMetadata[column.slug] != undefined) ? itemMetadata[column.slug] : false;
|
||||||
|
|
||||||
if (!metadata || itemMetadata == undefined) {
|
if (!metadata || itemMetadata == undefined) {
|
||||||
return '';
|
return '';
|
||||||
} else {
|
} else {
|
||||||
if ((component != undefined && component == 'tainacan-textarea') || this.$route.query.iframemode)
|
|
||||||
return this.viewMode == 'table' ? ('<span class="sr-only">' + column.name + ': </span>' + metadata.value_as_string) : metadata.value_as_string;
|
|
||||||
else
|
|
||||||
return this.viewMode == 'table' ? ('<span class="sr-only">' + column.name + ': </span>' + metadata.value_as_html) : metadata.value_as_html;
|
return this.viewMode == 'table' ? ('<span class="sr-only">' + column.name + ': </span>' + metadata.value_as_html) : metadata.value_as_html;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -193,7 +193,7 @@
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
max-height: 1.25rem;
|
max-height: 1.125rem;
|
||||||
}
|
}
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
|
|
|
@ -156,7 +156,7 @@
|
||||||
column.metadatum !== 'row_author' &&
|
column.metadatum !== 'row_author' &&
|
||||||
column.metadatum !== 'row_title' &&
|
column.metadatum !== 'row_title' &&
|
||||||
column.metadatum !== 'row_description'"
|
column.metadatum !== 'row_description'"
|
||||||
v-html="renderMetadata(item.metadata, column) != '' ? renderMetadata(item.metadata, column, column.metadata_type_object.component) : `<span class='has-text-gray3 is-italic'>` + $i18n.get('label_value_not_informed') + `</span>`"/>
|
v-html="renderMetadata(item.metadata, column) != '' ? renderMetadata(item.metadata, column) : `<span class='has-text-gray3 is-italic'>` + $i18n.get('label_value_not_informed') + `</span>`"/>
|
||||||
|
|
||||||
<span v-if="column.metadatum == 'row_thumbnail'">
|
<span v-if="column.metadatum == 'row_thumbnail'">
|
||||||
<img
|
<img
|
||||||
|
@ -190,16 +190,13 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
renderMetadata(itemMetadata, column, component) {
|
renderMetadata(itemMetadata, column) {
|
||||||
|
|
||||||
let metadata = (itemMetadata != undefined && itemMetadata[column.slug] != undefined) ? itemMetadata[column.slug] : false;
|
let metadata = (itemMetadata != undefined && itemMetadata[column.slug] != undefined) ? itemMetadata[column.slug] : false;
|
||||||
|
|
||||||
if (!metadata) {
|
if (!metadata) {
|
||||||
return '';
|
return '';
|
||||||
} else {
|
} else {
|
||||||
if (component != undefined && component == 'tainacan-textarea')
|
|
||||||
return '<span class="sr-only">' + column.name + ': </span>' + metadata.value_as_string;
|
|
||||||
else
|
|
||||||
return '<span class="sr-only">' + column.name + ': </span>' + metadata.value_as_html;
|
return '<span class="sr-only">' + column.name + ': </span>' + metadata.value_as_html;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue