diff --git a/src/admin/admin.vue b/src/admin/admin.vue index 13dc0eac3..7f6fe0a03 100644 --- a/src/admin/admin.vue +++ b/src/admin/admin.vue @@ -59,7 +59,7 @@ .is-secondary-content { padding: 0px; - margin: 78px auto 0 auto; + margin: $header-height auto 0 auto; position: relative; overflow-y: auto; @@ -68,6 +68,11 @@ overflow-y: visible; } } + + .columns { + margin-left: 0px; + margin-right: 0px; + } } diff --git a/src/admin/components/edition/item-edition-form.vue b/src/admin/components/edition/item-edition-form.vue index 90784536e..ad22e6546 100644 --- a/src/admin/components/edition/item-edition-form.vue +++ b/src/admin/components/edition/item-edition-form.vue @@ -224,7 +224,7 @@ export default { .catch((errors) => { for (let error of errors.errors) { for (let field of Object.keys(error)){ - eventBus.errors.push({ field_id: attribute, errors: error[field]}); + eventBus.errors.push({ field_id: field, errors: error[field]}); } } this.formErrorMessage = errors.error_message; diff --git a/src/admin/components/navigation/tainacan-header.vue b/src/admin/components/navigation/tainacan-header.vue index 5abaac6e5..7bf934983 100644 --- a/src/admin/components/navigation/tainacan-header.vue +++ b/src/admin/components/navigation/tainacan-header.vue @@ -5,19 +5,17 @@ :class="{'secondary-page': onSecondaryPage}">
-

{{ pageTitle }}

+ + + - +
@@ -145,7 +145,7 @@ export default { // Tainacan Header #tainacan-header { - background-color: $primary; + background-color: $secondary; height: $header-height; max-height: $header-height; width: 100%; @@ -156,6 +156,7 @@ export default { right: 0; position: absolute; z-index: 9; + color: white; .icon { padding-right: 1.3em; @@ -174,7 +175,7 @@ export default { } &.secondary-page { .level-item { - margin-left: 310px; + margin-left: 87px; } } diff --git a/src/admin/components/navigation/tainacan-subheader.vue b/src/admin/components/navigation/tainacan-subheader.vue index bc5a91ecb..683b4c191 100644 --- a/src/admin/components/navigation/tainacan-subheader.vue +++ b/src/admin/components/navigation/tainacan-subheader.vue @@ -33,7 +33,9 @@ :aria-label="$i18n.get('label_collection_fields')"> {{ $i18n.getFrom('items', 'name') }} + icon="file-multiple"/> +
+ {{ $i18n.getFrom('items', 'name') }}
  • {{ $i18n.get('edit') }} + icon="pencil"/> +
    + {{ $i18n.get('edit') }}
  • {{ $i18n.getFrom('fields', 'name') }} + icon="format-list-checks"/> +
    + {{ $i18n.getFrom('fields', 'name') }}
  • {{ $i18n.getFrom('filters', 'name') }} + icon="filter"/> +
    + {{ $i18n.getFrom('filters', 'name') }}
  • @@ -82,14 +90,23 @@ export default { currentIcon: '' } }, + props: { + id: Number + }, watch: { '$route' (to) { this.activeRoute = to.name; + + this.onSecondaryPage = (to.params.collectionId != undefined); + this.pageTitle = this.$route.meta.title; + this.currentIcon = this.$route.meta.icon; + + this.arrayRealPath = to.path.split("/"); + this.arrayRealPath = this.arrayRealPath.filter((item) => item.length != 0); + + this.generateViewPath(); } }, - created () { - this.activeRoute = this.$route.name; - }, methods: { ...mapActions('collection', [ 'fetchCollectionName' @@ -150,19 +167,9 @@ export default { } } }, - watch: { - '$route' (to) { - this.onSecondaryPage = (to.params.collectionId != undefined); - this.pageTitle = this.$route.meta.title; - this.currentIcon = this.$route.meta.icon; - - this.arrayRealPath = to.path.split("/"); - this.arrayRealPath = this.arrayRealPath.filter((item) => item.length != 0); - - this.generateViewPath(); - } - }, created() { + this.activeRoute = this.$route.name; + this.onSecondaryPage = (this.$route.params.collectionId != undefined); this.pageTitle = this.$route.meta.title; this.currentIcon = this.$route.meta.icon; @@ -180,17 +187,17 @@ export default { @import "../../scss/_variables.scss"; // Tainacan Header - #tainacan-header { + #tainacan-subheader { background-color: $primary-lighter; - height: $header-height; - max-height: $header-height; + height: $subheader-height; + max-height: $subheader-height; width: 100%; border-bottom: 0.5px solid #ddd; padding: 1.0em; + margin: 0px; vertical-align: middle; left: 0; right: 0; - position: absolute; z-index: 9; .icon { @@ -205,12 +212,57 @@ export default { .level-left { .level-item { display: inline-block; - margin-left: 268px; + margin-left: 45px; } } - &.secondary-page { - .level-item { - margin-left: 310px; + + li{ + a { + color: $secondary; + text-align: center; + white-space: nowrap; + overflow: hidden; + padding: 1.0em 1.8em; + line-height: 1.5em; + border-radius: 0px; + -webkit-transition: padding 0.3s linear; /* Safari */ + transition: padding 0.3s linear; + } + a:hover { + background-color: rgba(255,255,255,0.4); + color: $tertiary; + } + a.is-active { + background-color: rgba(255,255,255,0.6); + color: $tertiary; + } + .icon { + margin: 0; + padding: 0; + } + .menu-text { + opacity: 1; + visibility: visible; + transition: opacity 0.3s linear, visibility 0.3s linear; + -webkit-transition: opacity 0.3s linear, visibility 0.3s linear; + } + } + + @media screen and (max-width: 769px) { + width: 100% !important; + max-width: 100% !important; + ul { + flex-flow: wrap; + display: flex; + align-items: stretch; + justify-content: space-evenly; + a { + padding: 0.5em 0.7em !important; + text-align: center; + } + .menu-text { + padding-left: 0.3em !important; + } } } @@ -221,14 +273,7 @@ export default { margin-left: 30px; } } - .level-right { - display: none; - } - top: 206px; - &.secondary-page { - top: 237px !important; - } margin-bottom: 0px !important; } diff --git a/src/admin/components/search/search-control.vue b/src/admin/components/search/search-control.vue index 350fe92c9..a8440f656 100644 --- a/src/admin/components/search/search-control.vue +++ b/src/admin/components/search/search-control.vue @@ -15,7 +15,7 @@ custom> + :native-value="column.field"> {{ column.name }} diff --git a/src/admin/pages/lists/items-page.vue b/src/admin/pages/lists/items-page.vue index c8c282c98..ad71b6993 100644 --- a/src/admin/pages/lists/items-page.vue +++ b/src/admin/pages/lists/items-page.vue @@ -20,21 +20,21 @@ :table-fields="tableFields" :pref-table-fields="prefTableFields"/> -
    -