From 78b7638193179532785d47315fc0fa6ac3109bec Mon Sep 17 00:00:00 2001 From: Mateus Machado Luna Date: Thu, 25 Oct 2018 17:18:26 -0300 Subject: [PATCH] Advancements on bulk add initial form. --- .../edition/item-bulk-edition-form.vue | 116 ++++++++++++++---- src/admin/tainacan-admin-i18n.php | 5 + 2 files changed, 100 insertions(+), 21 deletions(-) diff --git a/src/admin/components/edition/item-bulk-edition-form.vue b/src/admin/components/edition/item-bulk-edition-form.vue index bfe4510bd..54e6adc79 100644 --- a/src/admin/components/edition/item-bulk-edition-form.vue +++ b/src/admin/components/edition/item-bulk-edition-form.vue @@ -14,7 +14,6 @@
@@ -44,7 +43,26 @@
+ +
+

+ + + + {{ $i18n.get('label_upload_file_prepare_items') }} +

+

+ {{ (uploadedItems.length - amountFinished) + " " + $i18n.get('label_files_remaining') }} +

+

+ {{ "1 " + $i18n.get('label_file_remaining') }} +

+
- + +
-
-
- +
+
@@ -203,9 +234,19 @@ export default { } }, + sequenceEditGroup() { + let onlyItemIds = this.uploadedItems.map(item => item.id); + console.log(onlyItemIds) + this.createEditGroup({ + object: onlyItemIds, + collectionID: this.collectionId + }).then((group) => { + let sequenceId = group.id; + this.$router.push(this.$routerHelper.getCollectionSequenceEditPath(this.collectionId, sequenceId, 1)); + }); + }, createBulkEditGroup() { let onlyItemIds = this.uploadedItems.map(item => item.id); - this.createEditGroup({ object: onlyItemIds, collectionID: this.collectionId @@ -298,6 +339,7 @@ export default { .document-list { display: inline-block; width: 100%; + padding: 1rem $page-side-padding; .document-item { display: flex; @@ -305,7 +347,7 @@ export default { width: 100%; justify-content: space-between; align-items: center; - margin: 0.75rem; + padding: 0.5rem 0.75rem; cursor: default; .document-thumb { @@ -317,7 +359,6 @@ export default { .document-actions { margin-left: auto; - .loading-icon .control.is-loading::after { position: relative !important; right: 0; @@ -329,22 +370,55 @@ export default { margin-left: auto; } } + .sequence-progress-info { + display: flex; + justify-content: space-between; + .i::before { + font-size: 18px; + } + } .sequence-progress { height: 5px; background: $turquoise5; width: 0%; transition: width 0.2s; + margin-bottom: 1rem; } .sequence-progress-background { height: 5px; background: $gray3; width: 100%; - top: -5px; + top: -21px; z-index: -1; position: relative; + margin-bottom: 1rem; } } + + .footer { + padding: 18px $page-side-padding; + position: absolute; + bottom: 0; + z-index: 999999; + background-color: $gray1; + width: 100%; + height: 65px; + display: flex; + justify-content: flex-end; + align-items: center; + left: 0; + + .form-submission-footer { + .button { + margin-left: 16px; + margin-right: 6px; + } + // .is-outlined { + // border: none; + // } + } + } } diff --git a/src/admin/tainacan-admin-i18n.php b/src/admin/tainacan-admin-i18n.php index 381678d56..17d66eeb1 100644 --- a/src/admin/tainacan-admin-i18n.php +++ b/src/admin/tainacan-admin-i18n.php @@ -315,6 +315,11 @@ return apply_filters( 'tainacan-admin-i18n', [ 'label_selected_terms' => __( 'Selected terms', 'tainacan'), 'label_editing_item_number' => __( 'Editing item n.', 'tainacan'), 'label_sequence_editing_item' => __( 'Sequence editing: Item', 'tainacan'), + 'label_files_remaining' => __( 'files remaining.', 'tainacan'), + 'label_file_remaining' => __( 'file remaining.', 'tainacan'), + 'label_upload_file_prepare_items' => __( 'Uploading files and preparing items', 'tainacan'), + 'label_bulk_edit_items' => __( 'Bulk edit items', 'tainacan'), + 'label_sequence_edit_items' => __( 'Sequence edit items', 'tainacan'), // Instructions. More complex sentences to guide user and placeholders 'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),