diff --git a/src/admin/components/edition/category-edition-form.vue b/src/admin/components/edition/category-edition-form.vue index c82f945ec..0c50a64da 100644 --- a/src/admin/components/edition/category-edition-form.vue +++ b/src/admin/components/edition/category-edition-form.vue @@ -3,7 +3,7 @@
- +
+ :src="(collection.thumbnail == undefined || collection.thumbnail == false) ? thumbPlaceholderPath : collection.thumbnail.thumb">
{ - this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53)); - }); + if (this.$route.fullPath.split("/").pop() != "new") { + document.getElementById('collection-page-container').addEventListener('scroll', ($event) => { + this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53)); + }); + } } } diff --git a/src/admin/components/lists/categories-list.vue b/src/admin/components/lists/categories-list.vue index 30ad07165..313616e88 100644 --- a/src/admin/components/lists/categories-list.vue +++ b/src/admin/components/lists/categories-list.vue @@ -80,7 +80,7 @@ -
+

@@ -93,7 +93,7 @@ tag="button" class="button is-secondary" :to="{ path: $routerHelper.getNewCategoryPath() }"> - {{ $i18n.getFrom('taxonomies', 'new') }} + {{ $i18n.getFrom('taxonomies', 'new_item') }}

diff --git a/src/admin/components/lists/collections-list.vue b/src/admin/components/lists/collections-list.vue index 463fa28a4..6dee844fc 100644 --- a/src/admin/components/lists/collections-list.vue +++ b/src/admin/components/lists/collections-list.vue @@ -13,11 +13,11 @@ position="is-bottom-left" v-if="collections.length > 0 && collections[0].current_user_can_edit" :disabled="!isSelectingCollections" - id="mass-actions-dropdown"> + id="bulk-actions-dropdown"> @@ -36,7 +36,7 @@ - +   @@ -56,6 +56,10 @@
{{ $i18n.get('label_creation') }}
+ +   + + @@ -327,7 +331,9 @@ export default { .selection-control { - padding: 20px 14px 0px 14px; + padding: 6px 0px 0px 18px; + background: white; + height: 40px; .select-all { color: $gray-light; @@ -336,38 +342,60 @@ export default { color: $gray-light; } } - } .table { width: 100%; + border-collapse: separate; - .checkbox-cell { - width: 40px; - height: 58px; - padding: 0; - position: absolute !important; - left: $page-side-padding; - visibility: hidden; - display: flex; - justify-content: space-around; + th { + position: sticky; + position: -webkit-sticky; + background-color: white; + border-bottom: 1px solid $tainacan-input-background; + top: 0px; z-index: 9; + padding: 10px; + vertical-align: bottom; + &.actions-header { + min-width: 8.333333333%; + } + } + + .checkbox-cell { + min-width: 40px; + width: 40px; + padding: 0; + position: sticky !important; + position: -webkit-sticky !important; + left: 0; + top: auto; + visibility: hidden; + display: table-cell; + &::before { box-shadow: inset 50px 0 10px -12px #222; content: " "; - width: 60px; + width: 50px; height: 100%; position: absolute; left: 0; + top: 0; } - .checkbox { + label.checkbox { border-radius: 0px; background-color: white; - padding: 10px 10px 10px 14px; + padding: 0; width: 100%; height: 100%; + display: flex; + justify-content: center; + + } + label.control-label { + display: none; } &.is-selecting { visibility: visible; @@ -379,8 +407,7 @@ export default { // } .thumbnail-cell { - width: 58px; - padding-left: 54px; + width: 60px; } tbody { @@ -389,14 +416,14 @@ export default { background-color: transparent; &.selected-row { - background-color: $primary-lighter !important; + background-color: $primary-lighter; .checkbox-cell .checkbox, .actions-cell .actions-container { - background-color: $primary-lighter !important; + background-color: $primary-lighter; } } td { - height: 58px; - max-height: 58px; + height: 60px; + max-height: 60px; padding: 10px; vertical-align: middle; line-height: 12px; @@ -408,7 +435,7 @@ export default { } td.column-default-width{ - max-width: 350px; + max-width: 300px; p { text-overflow: ellipsis; overflow-x: hidden; @@ -416,7 +443,7 @@ export default { } } img.table-thumb { - max-height: 38px !important; + max-height: 37px !important; border-radius: 3px; } @@ -428,46 +455,56 @@ export default { td.actions-cell { padding: 0px; - visibility: hidden; - position: absolute; - right: $page-side-padding; - display: none; - + position: sticky !important; + position: -webkit-sticky !important; + right: 0px; + top: auto; + width: 80px; + .actions-container { + visibility: hidden; + display: flex; position: relative; - padding: 10px; + padding: 0; height: 100%; + width: 80px; z-index: 9; - background-color: $tainacan-input-background; - } - - a .icon { - margin: 8px; + background-color: transparent; + float: right; } - &::before { - box-shadow: inset -113px 0 17px -17px #222; - content: " "; - width: 125px; - height: 100%; - position: absolute; - right: 0; - top: 0; + a { + margin: auto; + font-size: 18px !important; } + } &:hover { - background-color: $tainacan-input-background; + background-color: $tainacan-input-background !important; cursor: pointer; .checkbox-cell { visibility: visible; - .checkbox { background-color: $tainacan-input-background; } + .checkbox { background-color: $tainacan-input-background !important; } } .actions-cell { - visibility: visible; - display: block; + .actions-container { + visibility: visible; + background: $tainacan-input-background !important; + } + + &::after { + box-shadow: inset -97px 0 17px -21px #222; + content: " "; + width: 100px; + height: 100%; + position: absolute; + right: 0px; + top: 0; + } } + } } } diff --git a/src/admin/components/lists/fields-list.vue b/src/admin/components/lists/fields-list.vue index 01b488bd5..dfb25e567 100644 --- a/src/admin/components/lists/fields-list.vue +++ b/src/admin/components/lists/fields-list.vue @@ -2,10 +2,25 @@
+

{{ $i18n.get('info_repository_metadata_inheritance') }}

+
- +
-
+
+
+
+

+ +

+

{{ $i18n.get('info_there_is_no_field' ) }}

+

{{ $i18n.get('info_create_metadata' ) }}

+
+
- -

Exposer Logic goes in here.

+ +

Under construction. You will be able to map your metadata to other metadata standards in this page.

diff --git a/src/admin/components/lists/filters-list.vue b/src/admin/components/lists/filters-list.vue index 34dfe3dca..fdc7a503c 100644 --- a/src/admin/components/lists/filters-list.vue +++ b/src/admin/components/lists/filters-list.vue @@ -2,8 +2,23 @@
+

{{ $i18n.get('info_repository_filters_inheritance') }}

+
-
+
+
+
+

+ +

+

{{ $i18n.get('info_there_is_no_filter' ) }}

+

{{ $i18n.get('info_create_filters' ) }}

+
+
-

{{ $i18n.get('label_available_field_types') }}

+

{{ $i18n.get('label_available_fields') }}

+ id="bulk-actions-dropdown"> @@ -112,7 +112,8 @@ + class="column-default-width actions-cell" + :label="$i18n.get('label_actions')">
  • this.arrayViewPath.splice(i, 1, itemTitle)) .catch((error) => this.$console.error(error)); break; - case 'categories': + case 'taxonomies': this.fetchCategoryName(this.arrayRealPath[i]) .then(categoryName => this.arrayViewPath.splice(i, 1, categoryName)) .catch((error) => this.$console.error(error)); diff --git a/src/admin/components/navigation/tainacan-title.vue b/src/admin/components/navigation/tainacan-title.vue index a4e9251c3..4f4c0e34e 100644 --- a/src/admin/components/navigation/tainacan-title.vue +++ b/src/admin/components/navigation/tainacan-title.vue @@ -87,7 +87,7 @@ export default { .then(itemName => { this.arrayViewPath.splice(i, 1, itemName); this.entityName = itemName; }) .catch((error) => this.$console.error(error)); break; - case 'categories': + case 'taxonomies': this.fetchCategoryName(this.arrayRealPath[i]) .then(categoryName => this.arrayViewPath.splice(i, 1, categoryName)) .catch((error) => this.$console.error(error)); diff --git a/src/admin/components/search/search-control.vue b/src/admin/components/search/search-control.vue index 9e13b7064..d4d0ec468 100644 --- a/src/admin/components/search/search-control.vue +++ b/src/admin/components/search/search-control.vue @@ -19,9 +19,12 @@ {{ $i18n.get('add_one_item') }} - {{ $i18n.get('add_items_bulk') + ' (Not ready)' }} + + {{ $i18n.get('add_items_bulk') + ' (Not ready)' }} + + + {{ $i18n.get('add_items_external_source') + ' (Not ready)' }} - {{ $i18n.get('add_items_external_source') + ' (Not ready)' }}
    {{ $i18n.get() }}
  • diff --git a/src/admin/js/router.js b/src/admin/js/router.js index 82f8c8bdf..52242f5fc 100644 --- a/src/admin/js/router.js +++ b/src/admin/js/router.js @@ -57,10 +57,10 @@ const routes = [ { path: '/fields', name: 'FieldsPage', component: FieldsPage, meta: {title: i18nGet('title_repository_fields_page'), icon: 'format-list-checks'} }, - { path: '/categories', name: 'CategoriesPage', component: CategoriesPage, meta: {title: i18nGet('title_categories_page'), icon: 'shape'} }, - { path: '/categories/new', name: 'CategoryCreationForm', component: CategoryEditionForm, meta: {title: i18nGet('title_create_category_page'), icon: 'shape'} }, - { path: '/categories/:categoryId/edit', name: 'CategoryEditionForm', component: CategoryEditionForm, meta: {title: i18nGet('title_category_edition_page'), icon: 'shape'} }, - { path: '/categories/:categoryId', name: 'CategoryPage', component: CategoryPage, meta: {title: i18nGet('title_category_page'), icon: 'shape'} }, + { path: '/taxonomies', name: 'CategoriesPage', component: CategoriesPage, meta: {title: i18nGet('title_categories_page'), icon: 'shape'} }, + { path: '/taxonomies/new', name: 'CategoryCreationForm', component: CategoryEditionForm, meta: {title: i18nGet('title_create_category_page'), icon: 'shape'} }, + { path: '/taxonomies/:categoryId/edit', name: 'CategoryEditionForm', component: CategoryEditionForm, meta: {title: i18nGet('title_category_edition_page'), icon: 'shape'} }, + { path: '/taxonomies/:categoryId', name: 'CategoryPage', component: CategoryPage, meta: {title: i18nGet('title_category_page'), icon: 'shape'} }, { path: '/events', name: 'EventsPage', component: EventsPage, meta: {title: i18nGet('title_repository_events_page'), icon: 'calendar'} }, { path: '/events/:eventId', name: 'EventPage', component: EventPage, meta: {title: i18nGet('title_event_page'), icon: 'calendar'} }, diff --git a/src/admin/js/utilities.js b/src/admin/js/utilities.js index 9536e1a3b..712361a59 100644 --- a/src/admin/js/utilities.js +++ b/src/admin/js/utilities.js @@ -175,7 +175,7 @@ RouterHelperPlugin.install = function (Vue, options = {}) { return '/items/?' + qs.stringify(query); }, getCategoriesPath(query) { - return '/categories/?' + qs.stringify(query); + return '/taxonomies/?' + qs.stringify(query); }, getCategoryTermsPath(categoryId, query) { return '/categoryId/' + categoryId + 'terms/?' + qs.stringify(query); @@ -200,10 +200,10 @@ RouterHelperPlugin.install = function (Vue, options = {}) { return '/filters/' + id; }, getCategoryPath(id) { - return '/categories/' + id; + return '/taxonomies/' + id; }, getTermPath(categoryId, termId) { - return '/categories/' + categoryId + '/terms/' + termId; + return '/taxonomies/' + categoryId + '/terms/' + termId; }, getEventPath(id) { return '/events/' + id; @@ -228,10 +228,10 @@ RouterHelperPlugin.install = function (Vue, options = {}) { return '/filters/new'; }, getNewCategoryPath() { - return '/categories/new'; + return '/taxonomies/new'; }, getNewTermPath() { - return '/categories/' + categoryId + '/terms/new'; + return '/taxonomies/' + categoryId + '/terms/new'; }, getNewEventPath() { return '/events/new'; @@ -247,10 +247,10 @@ RouterHelperPlugin.install = function (Vue, options = {}) { return '/filters/' + id + '/edit'; }, getCategoryEditPath(id) { - return '/categories/' + id + '/edit'; + return '/taxonomies/' + id + '/edit'; }, getTermEditPath(categoryId, termId) { - return '/categories/' + categoryId + '/terms/' + termId + '/edit'; + return '/taxonomies/' + categoryId + '/terms/' + termId + '/edit'; }, getEventEditPath(id) { return '/events/' + id + '/edit'; diff --git a/src/admin/pages/lists/categories-page.vue b/src/admin/pages/lists/categories-page.vue index e264da49f..78c42b8e3 100644 --- a/src/admin/pages/lists/categories-page.vue +++ b/src/admin/pages/lists/categories-page.vue @@ -152,6 +152,7 @@ height: $subheader-height; margin-left: -$page-side-padding; margin-right: -$page-side-padding; + margin-top: -$page-top-padding; padding-top: $page-small-top-padding; padding-left: $page-side-padding; padding-right: $page-side-padding; diff --git a/src/admin/pages/lists/collections-page.vue b/src/admin/pages/lists/collections-page.vue index 1f98dfd55..b33940856 100644 --- a/src/admin/pages/lists/collections-page.vue +++ b/src/admin/pages/lists/collections-page.vue @@ -5,13 +5,28 @@ class="sub-header" v-if="totalCollections > 0">
    - - {{ $i18n.getFrom('collections', 'new_item') }} - + + + + + + {{ $i18n.get('label_blank_collection') }} +
    + {{ $i18n.get('info_choose_your_metadata') }} +
    +
    + + {{ $i18n.get('label_dublin_core') + ' (Not ready)' }} + +
    @@ -149,6 +164,7 @@ export default { height: $subheader-height; margin-left: -$page-side-padding; margin-right: -$page-side-padding; + margin-top: -$page-top-padding; padding-top: $page-small-top-padding; padding-left: $page-side-padding; padding-right: $page-side-padding; diff --git a/src/admin/pages/lists/items-page.vue b/src/admin/pages/lists/items-page.vue index fae75e67f..4e99c127e 100644 --- a/src/admin/pages/lists/items-page.vue +++ b/src/admin/pages/lists/items-page.vue @@ -412,6 +412,7 @@ #collection-search-button { border-radius: 0px !important; padding: 0px 8px !important; + border-color: $tainacan-input-background; &:focus, &:active { border-color: none !important; } diff --git a/src/admin/scss/tainacan-admin.scss b/src/admin/scss/tainacan-admin.scss index b792288b0..3580df753 100644 --- a/src/admin/scss/tainacan-admin.scss +++ b/src/admin/scss/tainacan-admin.scss @@ -103,7 +103,7 @@ a:hover { height: 1px; background-color: $secondary; } - margin-bottom: 60px; + margin-bottom: 40px; } .tainacan-modal-content { diff --git a/src/admin/tainacan-admin-i18n.php b/src/admin/tainacan-admin-i18n.php index 10d212c6e..fe48a7682 100644 --- a/src/admin/tainacan-admin-i18n.php +++ b/src/admin/tainacan-admin-i18n.php @@ -17,7 +17,7 @@ return [ 'event' => __( 'Event', 'tainacan' ), 'term' => __( 'Term', 'tainacan' ), 'terms' => __( 'Terms', 'tainacan' ), - 'exposer' => __( 'Exposer', 'tainacan' ), + 'mapping' => __( 'Mapping', 'tainacan' ), // Actions 'edit' => __( 'Edit', 'tainacan' ), @@ -50,32 +50,30 @@ return [ 'private_visibility' => __( 'Visible only for editors', 'tainacan' ), // Page Titles (used mainly on Router) - 'title_repository_collections_page' => __( 'Repository Collections Page', 'tainacan' ), - 'title_items_page' => __( 'Items Page', 'tainacan' ), - 'title_repository_fields_page' => __( 'Repository Metadata Page', 'tainacan' ), - 'title_repository_filters_page' => __( 'Repository Filters Page', 'tainacan' ), + 'title_repository_collections_page' => __( 'Repository Collections', 'tainacan' ), + 'title_items_page' => __( 'Items', 'tainacan' ), + 'title_repository_fields_page' => __( 'Repository Metadata', 'tainacan' ), + 'title_repository_filters_page' => __( 'Repository Filters', 'tainacan' ), 'title_categories_page' => __( 'Categories Page', 'tainacan' ), - 'title_terms_page' => __( 'Terms Page', 'tainacan' ), - 'title_repository_events_page' => __( 'Repository Events Page', 'tainacan' ), - 'title_collection_page' => __( 'Collection Page', 'tainacan' ), - 'title_item_page' => __( 'Item Page', 'tainacan' ), - 'title_field_page' => __( 'Metadata Page', 'tainacan' ), + 'title_terms_page' => __( 'Terms', 'tainacan' ), + 'title_repository_events_page' => __( 'Repository Events', 'tainacan' ), + 'title_collection_page' => __( 'Collection', 'tainacan' ), + 'title_item_page' => __( 'Item', 'tainacan' ), + 'title_field_page' => __( 'Metadata', 'tainacan' ), 'title_collection_events' => __( 'Collection Events', 'tainacan' ), - - /* translators: alkdjklasdj laksjd klsadj */ - 'title_filter_page' => __( 'Filter Page', 'tainacan' ), - 'title_category_page' => __( 'Taxonomy Page', 'tainacan' ), - 'title_term_page' => __( 'Term Page', 'tainacan' ), - 'title_event_page' => __( 'Event Page', 'tainacan' ), - 'title_create_collection' => __( 'Collection Creation Page', 'tainacan' ), - 'title_create_category_page' => __( 'Taxonomy Creation Page', 'tainacan' ), + 'title_filter_page' => __( 'Filter', 'tainacan' ), + 'title_category_page' => __( 'Taxonomy', 'tainacan' ), + 'title_term_page' => __( 'Term', 'tainacan' ), + 'title_event_page' => __( 'Event', 'tainacan' ), + 'title_create_collection' => __( 'Collection Creation', 'tainacan' ), + 'title_create_category_page' => __( 'Taxonomy Creation', 'tainacan' ), 'title_create_item_collection' => __( 'Create Item on Collection', 'tainacan' ), - 'title_create_filter' => __( 'Filter Creation Page', 'tainacan' ), + 'title_create_filter' => __( 'Filter Creation', 'tainacan' ), 'title_edit_collection' => __( 'Edit Collection', 'tainacan' ), 'title_edit_item' => __( 'Edit Item', 'tainacan' ), - 'title_category_edition_page' => __( 'Taxonomy Edition Page', 'tainacan' ), - 'title_filter_edition' => __( 'Filter Edition Page', 'tainacan' ), - 'title_field_edition' => __( 'Metadata Edition Page', 'tainacan' ), + 'title_category_edition_page' => __( 'Taxonomy Edition', 'tainacan' ), + 'title_filter_edition' => __( 'Filter Edition', 'tainacan' ), + 'title_field_edition' => __( 'Metadata Edition', 'tainacan' ), 'title_collection_fields_edition' => __( 'Edit Metadata of', 'tainacan' ), 'title_collection_filters_edition' => __( 'Edit Filters of', 'tainacan' ), @@ -175,7 +173,7 @@ return [ 'label_all_items' => __( 'All items', 'tainacan' ), 'label_draft_items' => __( 'Draft', 'tainacan' ), 'label_trash_items' => __( 'Trash', 'tainacan' ), - 'label_mass_actions' => __( 'Mass actions', '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_selected_items' => __( 'Delete selected items', 'tainacan' ), @@ -183,6 +181,8 @@ return [ 'label_select_all_collections_page' => __( 'Select all collections on page', 'tainacan' ), 'label_select_all_items_page' => __( 'Select all items on page', 'tainacan' ), 'label_edit_attachments' => __( 'Edit attachments', 'tainacan' ), + 'label_blank_collection' => __( 'Blank collection', 'tainacan' ), + 'label_dublin_core' => __( 'Dublin Core', 'tainacan' ), // Instructions. More complex sentences to guide user and placeholders 'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ), @@ -238,7 +238,7 @@ return [ 'info_by' => __( 'By: ', 'tainacan' ), 'info_date' => __( 'Date: ', 'tainacan' ), 'info_not_saved' => __( 'Not saved ', 'tainacan' ), - 'info_warning_item_not_saved' => __( 'Are you sure? The item is not saved, changes will be lost.', 'tainacan' ), + 'info_warning_item_not_saved' => __( 'Are you sure? The item is not saved, changes will be lost.', 'tainacan' ), 'info_warning_fields_not_saved' => __( 'Are you sure? There are metadata not saved, changes will be lost.', 'tainacan' ), 'info_warning_filters_not_saved' => __( 'Are you sure? There are filters not saved, changes will be lost.', 'tainacan' ), 'info_no_description_provided' => __( 'No description provided.', 'tainacan' ), @@ -255,6 +255,11 @@ return [ 'info_help_term_name' => __( 'The term name', 'tainacan' ), 'info_help_term_description' => __( 'The description of the Term.', 'tainacan' ), 'info_no_attachments_on_item_yet' => __( 'The are no attachments on this item so far.', 'tainacan' ), + 'info_repository_metadata_inheritance' => __( 'Repository Metadata will be inherited by all collections.', 'tainacan' ), + 'info_repository_filters_inheritance' => __( 'Repository Filters will be inherited by all collections.', 'tainacan' ), + 'info_create_filters' => __( 'Click or Drag and Drop Metadata here for creating a new Filter.', 'tainacan' ), + 'info_create_metadata' => __( 'Click or Drag and Drop Metadata Types here for creating a new Metadata.', 'tainacan' ), + 'info_choose_your_metadata' => __( 'Choose your metadata.', 'tainacan' ), // Tainacan Field Types 'tainacan-text' => __( 'Text', 'tainacan' ), diff --git a/src/theme-helper/template-tags.php b/src/theme-helper/template-tags.php index f5c5e2838..f412f8df3 100644 --- a/src/theme-helper/template-tags.php +++ b/src/theme-helper/template-tags.php @@ -21,7 +21,7 @@ function tainacan_get_the_metadata($field = null, $hide_empty = true) { $post = get_post(); $theme_helper = \Tainacan\Theme_Helper::get_instance(); - if (!$theme_helper->is_post_an_item($post)); + if (!$theme_helper->is_post_an_item($post)) return; $item = new Entities\Item($post); @@ -47,12 +47,12 @@ function tainacan_get_the_document() { $post = get_post(); $theme_helper = \Tainacan\Theme_Helper::get_instance(); - if (!$theme_helper->is_post_an_item($post)); + if (!$theme_helper->is_post_an_item($post)) return; $item = new Entities\Item($post); - return $item->get_document_html($field, $hide_empty); + return $item->get_document_html(); }