Add multivalue-separator to html output #17.

This commit is contained in:
mateuswetah 2020-03-19 17:07:04 -03:00
parent 7f72c716f6
commit 42ec39ef60
2 changed files with 15 additions and 2 deletions

View File

@ -125,6 +125,7 @@ class Compound extends Metadata_Type {
public function get_value_as_html(Item_Metadata_Entity $item_metadata) {
$value = $item_metadata->get_value();
$return = '';
$separator = $item_metadata->get_multivalue_separator();
if ( $item_metadata->is_multiple() ) {
@ -141,7 +142,7 @@ class Compound extends Metadata_Type {
}
}
$return .= '</div>' . "\n\n";
$return .= '</div>' . "\n" . $separator . "\n";
}

View File

@ -148,7 +148,8 @@ a:hover {
.hierarchy-separator {
color: var(--tainacan-gray3);
}
.metadata-type-textarea {
.metadata-type-textarea,
.metadata-type-compound {
.multivalue-separator {
display: block;
max-height: 1px;
@ -163,6 +164,17 @@ a:hover {
padding-left: 15px;
margin-left: 15px;
border-left: 1px solid var(--tainacan-gray2);
.tainacan-compound-metadatum {
margin-bottom: 0.5em;
.label:not(:last-child) {
margin-bottom: 0.3em;
}
p:not(:last-child) {
margin-bottom: 0.75em;
}
}
}
// Buefy notices (toast, snackbar...)