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_title' &&
|
||||
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'">
|
||||
<img
|
||||
|
@ -1246,16 +1246,13 @@ export default {
|
|||
goToItemEditPage(item) {
|
||||
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;
|
||||
|
||||
if (!metadata || itemMetadata == undefined) {
|
||||
return '';
|
||||
} 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;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -193,7 +193,7 @@
|
|||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
max-height: 1.25rem;
|
||||
max-height: 1.125rem;
|
||||
}
|
||||
a:hover {
|
||||
text-decoration: none !important;
|
||||
|
|
|
@ -156,7 +156,7 @@
|
|||
column.metadatum !== 'row_author' &&
|
||||
column.metadatum !== 'row_title' &&
|
||||
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'">
|
||||
<img
|
||||
|
@ -190,16 +190,13 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
renderMetadata(itemMetadata, column, component) {
|
||||
renderMetadata(itemMetadata, column) {
|
||||
|
||||
let metadata = (itemMetadata != undefined && itemMetadata[column.slug] != undefined) ? itemMetadata[column.slug] : false;
|
||||
|
||||
if (!metadata) {
|
||||
return '';
|
||||
} 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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue