new mapper modal
This commit is contained in:
parent
a29c2f7854
commit
0da18e7b65
|
@ -223,27 +223,41 @@
|
|||
</b-table>
|
||||
</section>
|
||||
<section
|
||||
v-if="mapper != '' && !isLoadingMetadatumMappers && !isMapperMetadataCreating">
|
||||
<div class="control">
|
||||
<button
|
||||
class="button is-outlined"
|
||||
type="button"
|
||||
@click="onNewMetadataMapperMetadata">
|
||||
{{ $i18n.get('new') }}
|
||||
</button>
|
||||
v-if="mapper != '' && mapper.allow_extra_metadata">
|
||||
<div
|
||||
class="modal-new-link">
|
||||
<a
|
||||
v-if="collectionId != null && collectionId != undefined"
|
||||
class="is-inline is-pulled-left add-link"
|
||||
@click="onNewMetadataMapperMetadata()">
|
||||
<b-icon
|
||||
icon="plus-circle"
|
||||
size="is-small"
|
||||
type="is-secondary"/>
|
||||
{{ $i18n.get('label_add_more_mapper_metadata') }}
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
<section
|
||||
v-if="isMapperMetadataCreating">
|
||||
<b-modal
|
||||
@close="onCancelNewMetadataMapperMetadata"
|
||||
:active.sync="isMapperMetadataCreating">
|
||||
<div
|
||||
class="tainacan-modal-content">
|
||||
<div class="tainacan-modal-title">
|
||||
<h2>{{ $i18n.get('instruction_insert_mapper_metadatum_info') }}</h2>
|
||||
<hr>
|
||||
</div>
|
||||
<b-field>
|
||||
<b-input
|
||||
v-model="new_metadata_label"
|
||||
required
|
||||
:placeholder="$i18n.get('label_name')"/>
|
||||
</b-field>
|
||||
<b-field>
|
||||
<b-input
|
||||
placeholder="URI"
|
||||
type="url"
|
||||
required
|
||||
v-model="new_metadata_uri"/>
|
||||
</b-field>
|
||||
<div class="field is-grouped form-submit">
|
||||
|
@ -256,14 +270,16 @@
|
|||
<div class="control">
|
||||
<button
|
||||
@click.prevent="onSaveNewMetadataMapperMetadata"
|
||||
class="button is-success">{{ $i18n.get('new') }}</button>
|
||||
:disabled="isNewMetadataMapperMetadataDisabled"
|
||||
class="button is-success">{{ $i18n.get('save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</b-modal>
|
||||
</template>
|
||||
<section
|
||||
v-if="mapper != '' && !isLoadingMetadatumMappers">
|
||||
<div class="field is-grouped form-submit">
|
||||
<div class="field is-grouped form-submit w-100">
|
||||
<div class="control">
|
||||
<button
|
||||
class="button is-outlined"
|
||||
|
@ -340,6 +356,11 @@ export default {
|
|||
return this.getMetadatumMappers();
|
||||
}
|
||||
},
|
||||
isNewMetadataMapperMetadataDisabled: {
|
||||
get() {
|
||||
return !this.new_metadata_label || !this.new_metadata_uri;
|
||||
}
|
||||
}
|
||||
},
|
||||
beforeRouteLeave ( to, from, next ) {
|
||||
let hasUnsavedForms = false;
|
||||
|
@ -543,7 +564,6 @@ export default {
|
|||
},
|
||||
onCancelNewMetadataMapperMetadata() {
|
||||
this.isMapperMetadataCreating = false;
|
||||
console.log('Cancel: ' + (this.isMapperMetadataCreating ? 'OK' : 'Err' ));
|
||||
},
|
||||
onSaveNewMetadataMapperMetadata() {
|
||||
this.isMapperMetadataLoading = true;
|
||||
|
@ -637,6 +657,16 @@ export default {
|
|||
margin: 1em 0em 2.0em 0em;
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.modal-new-link {
|
||||
padding: 0.5em 1em 3em 1em;
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
animation: spinAround 500ms infinite linear;
|
||||
border: 2px solid #dbdbdb;
|
||||
|
|
|
@ -13,7 +13,6 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'less_than_or_equal_to' => __( 'Less than or equal to', 'tainacan' ),
|
||||
|
||||
// Tainacan common terms
|
||||
<<<<<<< HEAD
|
||||
'repository' => __( 'Repository', 'tainacan' ),
|
||||
'collections' => __( 'Collections', 'tainacan' ),
|
||||
'items' => __( 'Items', 'tainacan' ),
|
||||
|
@ -30,27 +29,8 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'term' => __( 'Term', 'tainacan' ),
|
||||
'terms' => __( 'Terms', 'tainacan' ),
|
||||
'mapping' => __( 'Mapping', 'tainacan' ),
|
||||
'importers' => __( 'Importers', 'tainacan' ),
|
||||
'metadata' => __( 'metadata', 'tainacan' ),
|
||||
'importers' => __( 'Importers', 'tainacan' ),
|
||||
=======
|
||||
'repository' => __( 'Repository', 'tainacan' ),
|
||||
'collections' => __( 'Collections', 'tainacan' ),
|
||||
'items' => __( 'Items', 'tainacan' ),
|
||||
'metadata' => __( 'Metadata', 'tainacan' ),
|
||||
'filters' => __( 'Filters', 'tainacan' ),
|
||||
'taxonomies' => __( 'Taxonomies', 'tainacan' ),
|
||||
'events' => __( 'Events', 'tainacan' ),
|
||||
'collection' => __( 'Collection', 'tainacan' ),
|
||||
'item' => __( 'Item', 'tainacan' ),
|
||||
'metadatum' => __( 'Metadata', 'tainacan' ),
|
||||
'filter' => __( 'Filter', 'tainacan' ),
|
||||
'taxonomy' => __( 'Taxonomia', 'tainacan' ),
|
||||
'event' => __( 'Event', 'tainacan' ),
|
||||
'term' => __( 'Term', 'tainacan' ),
|
||||
'terms' => __( 'Terms', 'tainacan' ),
|
||||
'mapping' => __( 'Mapping', 'tainacan' ),
|
||||
'importers' => __( 'Importers', 'tainacan' ),
|
||||
>>>>>>> origin/develop
|
||||
|
||||
// Actions
|
||||
'edit' => __( 'Edit', 'tainacan' ),
|
||||
|
@ -170,106 +150,6 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_available_filter_types' => __( 'Available Filter Types', 'tainacan' ),
|
||||
'label_per_page' => __( 'per Page', 'tainacan' ),
|
||||
'label_displayed_metadata' => __( 'Displayed metadata', 'tainacan' ),
|
||||
<<<<<<< HEAD
|
||||
'label_required' => __( 'Required', 'tainacan' ),
|
||||
'label_allow_multiple' => __( 'Allow multiple values', 'tainacan' ),
|
||||
'label_default_value' => __( 'Default value', 'tainacan' ),
|
||||
'label_unique_value' => __( 'Unique value', 'tainacan' ),
|
||||
'label_yes' => __( 'Yes', 'tainacan' ),
|
||||
'label_no' => __( 'No', 'tainacan' ),
|
||||
'label_approved' => __( 'Approved', 'tainacan' ),
|
||||
'label_collection_related' => __( 'Collection Related', 'tainacan' ),
|
||||
'label_metadata_for_search' => __( 'Metadata for search', 'tainacan' ),
|
||||
'label_allow_repeated_items' => __( 'Allow repeated items', 'tainacan' ),
|
||||
'label_select_taxonomy' => __( 'Select taxonomy', 'tainacan' ),
|
||||
'label_select_taxonomy_input_type' => __( 'Input type', 'tainacan' ),
|
||||
'label_taxonomy_allow_new_terms' => __( 'Allow new terms', 'tainacan' ),
|
||||
'label_selectbox_init' => __( 'Select', 'tainacan' ),
|
||||
'label_options' => __( 'Insert options', 'tainacan' ),
|
||||
'label_attachments' => __( 'Attachments', 'tainacan' ),
|
||||
'label_attachment' => __( 'Attachment', 'tainacan' ),
|
||||
'label_enabled' => __( 'Enabled', 'tainacan' ),
|
||||
'label_disabled' => __( 'Disabled', 'tainacan' ),
|
||||
'label_creation' => __( 'Creation', 'tainacan' ),
|
||||
'label_creation_date' => __( 'Creation date', 'tainacan' ),
|
||||
'label_collection_items' => __( 'Collection Items', 'tainacan' ),
|
||||
'label_collection_metadata' => __( 'Collection Metadata', 'tainacan' ),
|
||||
'label_collection_filters' => __( 'Collection Filters', 'tainacan' ),
|
||||
'label_parent_term' => __( 'Parent Term', 'tainacan' ),
|
||||
'label_new_term' => __( 'New Term', 'tainacan' ),
|
||||
'label_new_child' => __( 'New Child', 'tainacan' ),
|
||||
'label_taxonomy_terms' => __( 'Taxonomy Terms', 'tainacan' ),
|
||||
'label_no_parent_term' => __( 'No parent term', 'tainacan' ),
|
||||
'label_term_without_name' => __( 'Term without name', 'tainacan' ),
|
||||
'label_inherited' => __( 'Inherited', 'tainacan' ),
|
||||
'label_sorting' => __( 'Sorting', 'tainacan' ),
|
||||
'label_event_date' => __( 'Event date', 'tainacan' ),
|
||||
'label_event_title' => __( 'Event', 'tainacan' ),
|
||||
'label_header_image' => __( 'Header Image', 'tainacan' ),
|
||||
'label_empty_header_image' => __( 'Empty Header Image', 'tainacan' ),
|
||||
'label_enable_cover_page' => __( 'Enable Cover Page', 'tainacan' ),
|
||||
'label_cover_page' => __( 'Cover Page', 'tainacan' ),
|
||||
'label_default_displayed_metadata' => __( 'Default Displayed Metadata', 'tainacan' ),
|
||||
'label_display' => __( 'Display on Listing', 'tainacan' ),
|
||||
'label_display_default' => __( 'Display by default', 'tainacan' ),
|
||||
'label_display_never' => __( 'Never displayed', 'tainacan' ),
|
||||
'label_not_display' => __( 'Not display by default', 'tainacan' ),
|
||||
'label_attach_to_item' => __( 'Attach to item', 'tainacan' ),
|
||||
'label_document' => __( 'Document', 'tainacan' ),
|
||||
'label_document_empty' => __( 'Empty document', 'tainacan' ),
|
||||
'label_file' => __( 'File', 'tainacan' ),
|
||||
'label_text' => __( 'Texto', 'tainacan' ),
|
||||
'label_url' => __( 'URL', 'tainacan' ),
|
||||
'label_select_file' => __( 'Select File', 'tainacan' ),
|
||||
'label_expand_all' => __( 'Expand all', 'tainacan' ),
|
||||
'label_collapse_all' => __( 'Collapse all', 'tainacan' ),
|
||||
'label_view_term' => __( 'View Term', 'tainacan' ),
|
||||
'label_all_items' => __( 'All items', 'tainacan' ),
|
||||
'label_draft_items' => __( 'Draft', 'tainacan' ),
|
||||
'label_trash_items' => __( 'Trash', 'tainacan' ),
|
||||
'label_bulk_actions' => __( 'Bulk actions', 'tainacan' ),
|
||||
'label_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),
|
||||
'label_edit_selected_collections' => __( 'Edit selected collections', 'tainacan' ),
|
||||
'label_delete_permanently' => __( 'Delete permanently', 'tainacan' ),
|
||||
'label_send_to_trash' => __( 'Send to trash', 'tainacan' ),
|
||||
'label_delete_selected_taxonomies' => __( 'Delete selected taxonomies', 'tainacan' ),
|
||||
'label_edit_selected_items' => __( 'Edit selected items', 'tainacan' ),
|
||||
'label_edit_selected_taxonomies' => __( 'Edit selected taxonomies', 'tainacan' ),
|
||||
'label_select_all_collections_page' => __( 'Select all collections on page', 'tainacan' ),
|
||||
'label_select_all_items_page' => __( 'Select all items on page', 'tainacan' ),
|
||||
'label_select_all_taxonomies_page' => __( 'Select all taxonomies on page', 'tainacan' ),
|
||||
'label_edit_attachments' => __( 'Edit attachments', 'tainacan' ),
|
||||
'label_blank_collection' => __( 'Blank collection', 'tainacan' ),
|
||||
'label_dublin_core' => __( 'Dublin Core', 'tainacan' ),
|
||||
'label_created_by' => __( 'Created by', 'tainacan' ),
|
||||
'label_apply_changes' => __( 'Apply changes', 'tainacan' ),
|
||||
'label_view_mode' => __( 'View mode', 'tainacan' ),
|
||||
'label_default_view_mode' => __( 'Default view mode', 'tainacan' ),
|
||||
'label_enabled_view_modes' => __( 'Enabled view modes', 'tainacan' ),
|
||||
'label_view_modes_available' => __( 'View modes available on theme', 'tainacan' ),
|
||||
'label_mapper_metadata' => __( 'Mapper Metadata', 'tainacan' ),
|
||||
'label_warning' => __( 'Warning', 'tainacan' ),
|
||||
'label_error' => __( 'Erro', 'tainacan' ),
|
||||
'label_grid' => __( 'Grid', 'tainacan' ),
|
||||
'label_table' => __( 'Table', 'tainacan' ),
|
||||
'label_cards' => __( 'Cards', 'tainacan' ),
|
||||
'label_records' => __( 'Records', 'tainacan' ),
|
||||
'label_visualization' => __( 'Visualization', 'tainacan' ),
|
||||
'label_available_importers' => __( 'Available Importers', 'tainacan' ),
|
||||
'label_target_collection' => __( 'Target Collection', 'tainacan' ),
|
||||
'label_source_file' => __( 'Source file', 'tainacan' ),
|
||||
'label_url_source_link' => __( 'URL Source link', 'tainacan' ),
|
||||
'label_metadata_mapping' => __( 'Metadata mapping', 'tainacan' ),
|
||||
'label_select_metadatum' => __( 'Select metadatum', 'tainacan' ),
|
||||
'label_select_metadatum_type' => __( 'Select a metadatum type', 'tainacan' ),
|
||||
'label_add_more_metadata' => __( 'Add more metadata', 'tainacan' ),
|
||||
'label_from_source_collection' => __( 'From source collection', 'tainacan' ),
|
||||
'label_to_target_collection' => __( 'To target collection', 'tainacan' ),
|
||||
'label_add_value' => __( 'Add value', 'tainacan' ),
|
||||
'label_remove_value' => __( 'Remove value', 'tainacan' ),
|
||||
'label_create_new_page' => __( 'Create new page', 'tainacan' ),
|
||||
'label_total_items' => __( 'Total items', 'tainacan' ),
|
||||
=======
|
||||
'label_required' => __( 'Required', 'tainacan' ),
|
||||
'label_allow_multiple' => __( 'Allow multiple values', 'tainacan' ),
|
||||
'label_default_value' => __( 'Default value', 'tainacan' ),
|
||||
|
@ -377,7 +257,8 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_publish' => __( 'Publish', 'tainacan' ),
|
||||
'label_send_to_trash' => __( 'Send to trash', 'tainacan' ),
|
||||
'label_update' => __( 'Update', 'tainacan' ),
|
||||
>>>>>>> origin/develop
|
||||
'label_mapper_metadata' => __( 'Mapper Metadata', 'tainacan' ),
|
||||
'label_add_more_mapper_metadata' => __( 'Add more mapper\'s metadata', 'tainacan' ),
|
||||
|
||||
// Instructions. More complex sentences to guide user and placeholders
|
||||
'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),
|
||||
|
@ -397,25 +278,18 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'instruction_select_term_header_image' => __( 'Select a header image for term', 'tainacan' ),
|
||||
'instruction_select_files_to_attach_to_item' => __( 'Select files to attach to item', 'tainacan' ),
|
||||
'instruction_select_document_file_for_item' => __( 'Select a document file for item', 'tainacan' ),
|
||||
<<<<<<< HEAD
|
||||
'instruction_insert_url' => __( 'Insert URL', 'tainacan' ),
|
||||
'instruction_write_text' => __( 'Write Text', 'tainacan' ),
|
||||
'instruction_search' => __( 'Search', 'tainacan' ),
|
||||
'instruction_select_a_metadatum' => __( 'Select a metadatum', 'tainacan' ),
|
||||
'instruction_select_a_mapper' => __( 'Select a mapper', 'tainacan' ),
|
||||
'instruction_search_on_repository' => __( 'Search on repository', 'tainacan' ),
|
||||
'instruction_select_a_target_collection' => __( 'Select a target collection', 'tainacan' ),
|
||||
=======
|
||||
'instruction_insert_url' => __( 'Insert URL', 'tainacan' ),
|
||||
'instruction_write_text' => __( 'Write Text', 'tainacan' ),
|
||||
'instruction_search' => __( 'Search', 'tainacan' ),
|
||||
'instruction_search_in_repository' => __( 'Search in repository', 'tainacan' ),
|
||||
'instruction_select_a_target_collection' => __( 'Select a target collection', 'tainacan' ),
|
||||
>>>>>>> origin/develop
|
||||
'instruction_select_a_metadatum' => __( 'Select a metadatum', 'tainacan' ),
|
||||
'instruction_select_a_mapper' => __( 'Select a mapper', 'tainacan' ),
|
||||
'instruction_select_an_importer_type' => __( 'Select an importer type from the options above:', 'tainacan' ),
|
||||
'instruction_drop_file_or_click_to_upload' => __( 'Drop your source file or click here to upload.', 'tainacan' ),
|
||||
'instruction_select_metadatum_type' => __( 'Select a metadatum type.', 'tainacan' ),
|
||||
'instruction_configure_new_metadatum' => __( 'Configure new metadatum.', 'tainacan' ),
|
||||
'instruction_insert_mapper_metadatum_info' => __( 'Insert the new mapper\'s metadatum info', 'tainacan' ),
|
||||
|
||||
// Info. Other feedback to user.
|
||||
'info_search_results' => __( 'Search Results', 'tainacan' ),
|
||||
|
|
Loading…
Reference in New Issue