Better label and mapping header.

This commit is contained in:
mateuswetah 2020-07-06 10:24:24 -03:00
parent b6d959ee9c
commit ce2e525838
2 changed files with 35 additions and 6 deletions

View File

@ -37,10 +37,17 @@
v-if="importerSourceInfo != undefined && v-if="importerSourceInfo != undefined &&
importerSourceInfo != null && importerSourceInfo != null &&
!isLoading"> !isLoading">
<template v-if="importerSourceInfo.source_metadata.length > 0 || (importerSourceInfo.source_special_fields && importerSourceInfo.source_special_fields.length > 0)"> <div
<p class="mapping-header-label is-pulled-left">{{ $i18n.get('label_from_source_collection') }}</p> class="mapping-header"
<p class="mapping-header-label is-pulled-right">{{ $i18n.get('label_to_target_collection') }}</p> v-if="importerSourceInfo.source_metadata.length > 0 || (importerSourceInfo.source_special_fields && importerSourceInfo.source_special_fields.length > 0)">
</template> <p>{{ $i18n.get('label_from_source_collection') }}</p>
<hr>
<span class="icon">
<i class="tainacan-icon tainacan-icon-pointer" />
</span>
<hr>
<p>{{ $i18n.get('label_to_target_collection') }}</p>
</div>
<div <div
class="source-metadatum" class="source-metadatum"
v-for="(sourceMetadatum, index) of importerSourceInfo.source_metadata" v-for="(sourceMetadatum, index) of importerSourceInfo.source_metadata"
@ -847,11 +854,33 @@ export default {
padding: 1em 3em; padding: 1em 3em;
} }
.mapping-header-label { .mapping-header {
display: flex;
justify-content: space-between;
align-items: center;
color: var(--tainacan-info-color); color: var(--tainacan-info-color);
font-size: 0.875em; font-size: 0.875em;
font-weight: bold; font-weight: bold;
margin: 18px 0 6px 0; margin: 18px 0 6px 0;
p {
white-space: nowrap;
}
hr {
width: 100%;
margin-left: 12px;
margin-right: 12px;
height: 1px;
}
@media screen and (max-width: 768px) {
p {
white-space: normal;
}
hr {
display: none;
}
}
} }
.modal .animation-content { .modal .animation-content {

View File

@ -306,7 +306,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'label_create_metadatum' => __( 'Create metadatum', 'tainacan' ), 'label_create_metadatum' => __( 'Create metadatum', 'tainacan' ),
'label_select_metadatum_type' => __( 'Select a metadatum type', 'tainacan' ), 'label_select_metadatum_type' => __( 'Select a metadatum type', 'tainacan' ),
'label_add_more_metadata' => __( 'Add more metadata', 'tainacan' ), 'label_add_more_metadata' => __( 'Add more metadata', 'tainacan' ),
'label_from_source_collection' => __( 'From source collection', 'tainacan' ), 'label_from_source_collection' => __( 'From source file', 'tainacan' ),
'label_to_target_collection' => __( 'To target collection', 'tainacan' ), 'label_to_target_collection' => __( 'To target collection', 'tainacan' ),
'label_add_value' => __( 'Add value', 'tainacan' ), 'label_add_value' => __( 'Add value', 'tainacan' ),
'label_remove_value' => __( 'Remove value', 'tainacan' ), 'label_remove_value' => __( 'Remove value', 'tainacan' ),