Merge branch 'develop' of https://github.com/tainacan/tainacan into develop

This commit is contained in:
weryques 2018-07-27 16:22:07 -03:00
commit 1e107f8afe
37 changed files with 342 additions and 111 deletions

View File

@ -180,6 +180,7 @@ class Admin {
'admin_url' => admin_url(), 'admin_url' => admin_url(),
'custom_header_support' => get_theme_support('custom-header'), 'custom_header_support' => get_theme_support('custom-header'),
'registered_view_modes' => \Tainacan\Theme_Helper::get_instance()->get_registered_view_modes(), 'registered_view_modes' => \Tainacan\Theme_Helper::get_instance()->get_registered_view_modes(),
'repository_name' => get_bloginfo('name')
]; ];
$maps = [ $maps = [

View File

@ -1,7 +1,7 @@
<template> <template>
<div <div
class="page-container" class="page-container"
:class="{'primary-page' : isNewCollection }"> :class="{'repository-level-page' : isNewCollection }">
<tainacan-title /> <tainacan-title />
<form <form
v-if="collection != null && collection != undefined" v-if="collection != null && collection != undefined"

View File

@ -1,6 +1,6 @@
<template> <template>
<div <div
class="primary-page page-container"> class="repository-level-page page-container">
<tainacan-title /> <tainacan-title />
<form <form
class="tainacan-form" class="tainacan-form"

View File

@ -1,11 +1,11 @@
<template> <template>
<div <div
class="primary-page page-container"> class="repository-level-page page-container">
<div class="tainacan-page-title"> <div class="tainacan-page-title">
<h1>{{ $i18n.get('label_metadata_mapping') }} </h1> <h1>{{ $i18n.get('label_metadata_mapping') }} </h1>
<a <a
@click="$router.go(-1)" @click="$router.go(-1)"
class="back-link is-secondary"> class="back-link has-text-secondary">
{{ $i18n.get('back') }} {{ $i18n.get('back') }}
</a> </a>
<hr> <hr>
@ -119,7 +119,7 @@
</b-modal> </b-modal>
<a <a
v-if="collectionId != null && collectionId != undefined" v-if="collectionId != null && collectionId != undefined"
class="is-inline is-pulled-right add-link" class="is-inline is-pulled-right add-link has-text-secondary"
@click="createNewMetadatum()"> @click="createNewMetadatum()">
<b-icon <b-icon
icon="plus-circle" icon="plus-circle"

View File

@ -40,6 +40,21 @@
v-model="editForm.description" v-model="editForm.description"
@focus="clearErrors('description')"/> @focus="clearErrors('description')"/>
</b-field> </b-field>
<b-field
:addons="false">
<label class="label is-inline">
{{ $i18n.get('label_semantic_uri') }}
<help-button
:title="$i18n.getHelperTitle('metadata', 'semantic_uri')"
:message="$i18n.getHelperMessage('metadata', 'semantic_uri')"/>
</label>
<b-input
v-model="editForm.semantic_uri"
name="semantic_uri"
type="url"
@focus="clearErrors('semantic_uri')"/>
</b-field>
<b-field <b-field
:addons="false" :addons="false"

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="page-container primary-page"> <div class="page-container repository-level-page">
<tainacan-title /> <tainacan-title />
<b-tabs v-model="activeTab"> <b-tabs v-model="activeTab">
<b-tab-item :label="$i18n.get('taxonomy')"> <b-tab-item :label="$i18n.get('taxonomy')">

View File

@ -37,7 +37,8 @@
:class="{ :class="{
'not-sortable-item': filter.id == undefined || openedFilterId != '' || choosenMetadatum.name == filter.name, 'not-sortable-item': filter.id == undefined || openedFilterId != '' || choosenMetadatum.name == filter.name,
'not-focusable-item': openedFilterId == filter.id, 'not-focusable-item': openedFilterId == filter.id,
'disabled-filter': filter.enabled == false 'disabled-filter': filter.enabled == false,
'inherited-filter': filter.collection_id != collectionId || isRepositoryLevel
}" }"
v-for="(filter, index) in activeFilterList" v-for="(filter, index) in activeFilterList"
:key="index"> :key="index">
@ -130,7 +131,7 @@
</div> </div>
<div class="column available-metadata-area"> <div class="column available-metadata-area">
<div class="field" > <div class="field" >
<h3 class="label"> {{ $i18n.get('label_available_metadata') }}</h3> <h3 class="label has-text-secondary"> {{ $i18n.get('label_available_metadata') }}</h3>
<draggable <draggable
v-if="availableMetadatumList.length > 0" v-if="availableMetadatumList.length > 0"
v-model="availableMetadatumList" v-model="availableMetadatumList"
@ -141,6 +142,7 @@
}"> }">
<div <div
class="available-metadatum-item" class="available-metadatum-item"
:class="{'inherited-metadatum': metadatum.collection_id != collectionId || isRepositoryLevel}"
v-if="metadatum.enabled" v-if="metadatum.enabled"
v-for="(metadatum, index) in availableMetadatumList" v-for="(metadatum, index) in availableMetadatumList"
:key="index" :key="index"
@ -466,15 +468,6 @@ export default {
@import "../../scss/_variables.scss"; @import "../../scss/_variables.scss";
.page-title {
border-bottom: 1px solid $secondary;
h2 {
color: $blue5;
font-weight: 500;
}
margin: 1em 0em 2.0em 0em;
}
.loading-spinner { .loading-spinner {
animation: spinAround 500ms infinite linear; animation: spinAround 500ms infinite linear;
border: 2px solid #dbdbdb; border: 2px solid #dbdbdb;
@ -657,7 +650,6 @@ export default {
} }
h3 { h3 {
color: $secondary;
margin: 0.2em 0em 1em -1.2em; margin: 0.2em 0em 1em -1.2em;
font-weight: 500; font-weight: 500;
} }
@ -743,5 +735,36 @@ export default {
} }
} }
.inherited-filter {
&.active-filter-item:hover:not(.not-sortable-item) {
background-color: $blue5;
border-color: $blue5;
.switch.is-small {
input[type="checkbox"] + .check {
background-color: $blue5 !important;
}
&:hover input[type="checkbox"] + .check {
background-color: $blue5 !important;
}
}
}
}
.inherited-metadatum {
&.available-metadatum-item:hover {
background-color: $blue5 !important;
border-color: $blue5 !important;
&:after {
border-color: transparent $blue5 transparent transparent !important;
}
&:before {
border-color: transparent $blue5 transparent transparent !important;
}
}
}
</style> </style>

View File

@ -41,7 +41,8 @@
:class="{ :class="{
'not-sortable-item': metadatum.id == undefined || openedMetadatumId != '' , 'not-sortable-item': metadatum.id == undefined || openedMetadatumId != '' ,
'not-focusable-item': openedMetadatumId == metadatum.id, 'not-focusable-item': openedMetadatumId == metadatum.id,
'disabled-metadatum': metadatum.enabled == false 'disabled-metadatum': metadatum.enabled == false,
'inherited-metadatum': metadatum.collection_id != collectionId || isRepositoryLevel
}" }"
v-for="(metadatum, index) in activeMetadatumList" v-for="(metadatum, index) in activeMetadatumList"
:key="index"> :key="index">
@ -113,7 +114,7 @@
<div class="column available-metadata-area" > <div class="column available-metadata-area" >
<div class="field"> <div class="field">
<h3 class="label">{{ $i18n.get('label_available_metadata_types') }}</h3> <h3 class="label has-text-secondary">{{ $i18n.get('label_available_metadata_types') }}</h3>
<draggable <draggable
v-model="availableMetadatumList" v-model="availableMetadatumList"
:options="{ :options="{
@ -124,7 +125,7 @@
<div <div
@click.prevent="addMetadatumViaButton(metadatum)" @click.prevent="addMetadatumViaButton(metadatum)"
class="available-metadatum-item" class="available-metadatum-item"
:class="{ 'hightlighted-metadatum' : hightlightedMetadatum == metadatum.name }" :class="{ 'hightlighted-metadatum' : hightlightedMetadatum == metadatum.name, 'inherited-metadatum': isRepositoryLevel }"
v-for="(metadatum, index) in availableMetadatumList" v-for="(metadatum, index) in availableMetadatumList"
:key="index"> :key="index">
<grip-icon/> <grip-icon/>
@ -935,7 +936,6 @@ export default {
} }
h3 { h3 {
color: $secondary;
margin: 0.2em 0em 1em -1.2em; margin: 0.2em 0em 1em -1.2em;
font-weight: 500; font-weight: 500;
} }
@ -1094,6 +1094,33 @@ export default {
} }
} }
.inherited-metadatum {
&.active-metadatum-item:hover:not(.not-sortable-item) {
background-color: $blue5;
border-color: $blue5;
.switch.is-small {
input[type="checkbox"] + .check {
background-color: $blue5 !important;
}
&:hover input[type="checkbox"] + .check {
background-color: $blue5 !important;
}
}
}
&.available-metadatum-item:hover {
background-color: $blue5 !important;
border-color: $blue5 !important;
&:after {
border-color: transparent $blue5 transparent transparent !important;
}
&:before {
border-color: transparent $blue5 transparent transparent !important;
}
}
}
#mappers-options-dropdown { #mappers-options-dropdown {
background-color: transparent; background-color: transparent;
color: #fff; color: #fff;

View File

@ -31,7 +31,7 @@
:key="term.id" :key="term.id"
@click.prevent="isEditingTerm ? null : loadTerms(term.id)"> @click.prevent="isEditingTerm ? null : loadTerms(term.id)">
<a <a
class="is-small" class="is-small has-text-secondary"
type="button" type="button"
@click="addNewChildTerm(term, index)" @click="addNewChildTerm(term, index)"
:disabled="isEditingTerm"> :disabled="isEditingTerm">

View File

@ -37,9 +37,9 @@
tag="a" tag="a"
to="/metadata" to="/metadata"
:class="activeRoute == 'MetadataPage' ? 'is-active':''"> :class="activeRoute == 'MetadataPage' ? 'is-active':''">
<b-icon <span class="icon">
size="is-small" <i class="mdi mdi-format-list-bulleted-type"/>
icon="format-list-bulleted-type"/> </span>
<span class="menu-text">{{ $i18n.getFrom('metadata', 'name') }}</span> <span class="menu-text">{{ $i18n.getFrom('metadata', 'name') }}</span>
</router-link> </router-link>
</li> </li>
@ -48,9 +48,9 @@
tag="a" tag="a"
to="/filters" to="/filters"
:class="activeRoute == 'FiltersPage' ? 'is-active':''"> :class="activeRoute == 'FiltersPage' ? 'is-active':''">
<b-icon <span class="icon">
size="is-small" <i class="mdi mdi-filter"/>
icon="filter"/> </span>
<span class="menu-text">{{ $i18n.getFrom('filters', 'name') }}</span> <span class="menu-text">{{ $i18n.getFrom('filters', 'name') }}</span>
</router-link> </router-link>
</li> </li>
@ -59,9 +59,7 @@
tag="a" tag="a"
to="/taxonomies" to="/taxonomies"
:class="activeRoute == 'Page' ? 'is-active':''"> :class="activeRoute == 'Page' ? 'is-active':''">
<b-icon <taxonomies-icon />
size="is-small"
icon="shape"/>
<span class="menu-text">{{ $i18n.getFrom('taxonomies', 'name') }}</span> <span class="menu-text">{{ $i18n.getFrom('taxonomies', 'name') }}</span>
</router-link> </router-link>
</li> </li>
@ -81,6 +79,8 @@
<script> <script>
import ActivitiesIcon from '../other/activities-icon.vue'; import ActivitiesIcon from '../other/activities-icon.vue';
import TaxonomiesIcon from '../other/taxonomies-icon.vue';
export default { export default {
name: 'PrimaryMenu', name: 'PrimaryMenu',
props: { props: {
@ -88,7 +88,8 @@ export default {
activeRoute: '/collections' activeRoute: '/collections'
}, },
components: { components: {
ActivitiesIcon ActivitiesIcon,
TaxonomiesIcon
}, },
} }
</script> </script>
@ -144,6 +145,18 @@ export default {
.activities-icon { .activities-icon {
fill: white; fill: white;
margin-bottom: -4px;
}
.taxonomies-icon {
fill: white;
margin-bottom: -2px;
}
.icon {
height: auto;
width: auto;
i {
font-size: 18px !important;
}
} }
} }

View File

@ -1,18 +1,20 @@
<template> <template>
<div <div
id="tainacan-subheader" id="tainacan-subheader"
class="level secondary-page"> class="secondary-page">
<div class="level-left">
<div class="back-button">
<button
@click="$router.go(-1)"
class="button is-turquoise4">
<span class="icon">
<i class="mdi mdi-chevron-left"/>
</span>
</button>
</div>
<div class="level">
<div class="level-left">
<div class="level-item"> <div class="level-item">
<div class="back-button">
<button
@click="$router.go(-1)"
class="button is-turquoise4">
<span class="icon">
<i class="mdi mdi-chevron-left"/>
</span>
</button>
</div>
<nav class="breadcrumbs"> <nav class="breadcrumbs">
<router-link <router-link
tag="a" tag="a"
@ -32,6 +34,7 @@
</nav> </nav>
</div> </div>
</div> </div>
<ul class="menu-list level-right"> <ul class="menu-list level-right">
<li <li
:class="activeRoute == 'ItemPage' || activeRoute == 'CollectionItemsPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage' ? 'is-active':''" :class="activeRoute == 'ItemPage' || activeRoute == 'CollectionItemsPage' || activeRoute == 'ItemEditionForm' || activeRoute == 'ItemCreatePage' ? 'is-active':''"
@ -98,6 +101,7 @@
</li> </li>
</ul> </ul>
</div>
</div> </div>
</template> </template>
@ -220,7 +224,7 @@ export default {
// Tainacan Header // Tainacan Header
#tainacan-subheader { #tainacan-subheader {
background-color: $gray2; background-color: $gray1;
height: $subheader-height; height: $subheader-height;
max-height: $subheader-height; max-height: $subheader-height;
width: 100%; width: 100%;
@ -234,6 +238,10 @@ export default {
left: 0; left: 0;
right: 0; right: 0;
z-index: 9; z-index: 9;
display: flex;
align-items: center;
justify-content: space-between;
transition: padding 0.3s, height 0.3s; transition: padding 0.3s, height 0.3s;
h1 { h1 {
@ -246,25 +254,25 @@ export default {
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
-webkit-transition: margin-bottom 0.2s linear; /* Safari */
transition: margin-bottom 0.2s linear;
} }
.back-button { .back-button {
padding: 0; padding: 0;
margin: 0 12px 0 0; margin: 0;
height: 42px; height: 42px;
width: 42px; width: $page-side-padding;
background-color: $turquoise4; min-width: $page-side-padding;
color: white; background-color: $gray1;
color: $turquoise4;
display: flex; display: flex;
align-items: center; align-items: center;
button, button,
button:hover, button:hover,
button:focus, button:focus,
button:active{ button:active {
color: white; width: 100%;
color: $turquoise4;
background-color: transparent !important; background-color: transparent !important;
border: none; border: none;
.icon i { .icon i {
@ -279,49 +287,64 @@ export default {
color: #1d1d1d; color: #1d1d1d;
} }
.level {
width: 100%;
}
li{ li{
margin-right: 0px; margin-right: 0px;
transition: max-width 0.4s linear, width 0.4s linear; transition: background-color 0.2s ease;
-webkit-transition: max-width 0.4s linear, width 0.4s linear; // transition: max-width 0.4s ease-in , width 0.4s ease-in ;
overflow: hidden; // -webkit-transition: max-width 0.4s ease-in, width 0.4s ease-in ;
max-width: 50px; // overflow: hidden;
// max-width: 50px;
&.is-active { &.is-active {
background-color: $turquoise4; background-color: $turquoise4;
a { a {
background-color: $turquoise4; background-color: $turquoise4;
transition: background-color 0.2s ease;
color: white; color: white;
text-decoration: none; text-decoration: none;
} }
svg.activities-icon { svg.activities-icon {
transition: fill 0.2s ease;
fill: white !important; fill: white !important;
} }
} }
&:hover { &:hover {
max-width: 100%; background-color: $turquoise3;
transition: max-width 0.4s linear, width 0.4s linear; // max-width: 100%;
-webkit-transition: max-width 0.4s linear, width 0.4s linear; // transition: max-width 0.4s ease-out 0.2s, width 0.4s ease-out 0.2s;
a { // -webkit-transition: max-width 0.4s ease-out 0.2s, width 0.4s ease-out 0.2s;
background-color: transparent; a {
text-decoration: none; background-color: transparent;
} text-decoration: none;
.menu-text { color: white;
opacity: 1.0;
width: 100%;
visibility: visible;
transition: opacity 0.2s linear, visibility 0.2s linear, width 0.4s linear;
-webkit-transition: opacity 0.2s linear, visibility 0.2s linear, width 0.4s linear;
} }
svg.activities-icon {
fill: white !important;
}
// .menu-text {
// opacity: 1.0;
// width: 100%;
// right: 0%;
// visibility: visible;
// transition: opacity 0.4s ease-out 0.2s, visibility 0.4s ease-out 0.2s, width 0.4s ease-out 0.2s, right 0.4s ease-out 0.2s;
// -webkit-transition: opacity 0.4s ease-out 0.2s , visibility 0.4s ease-out 0.2s, width 0.4s ease-out 0.2s, right 0.4s ease-out 0.2s;
// }
} }
a { a {
color: $gray4; color: $gray4;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
padding: 1.0em 10px; padding: 10px;
min-width: 50px; min-width: 50px;
line-height: 22px; line-height: 22px;
border-radius: 0px; border-radius: 0px;
position: relative; position: relative;
align-items: center;
display: flex;
} }
a:focus{ a:focus{
box-shadow: none; box-shadow: none;
@ -329,19 +352,20 @@ export default {
.icon { .icon {
margin: 0; margin: 0;
padding: 0; padding: 0;
i { i {
font-size: 19px !important; font-size: 19px !important;
} }
} }
.menu-text { .menu-text {
margin-left: 8px;
font-size: 14px; font-size: 14px;
display: inline-flex; display: inline-flex;
width: 0px; // width: 0px;
opacity: 0.0; // right: 100%;
visibility: hidden; // opacity: 0.0;
transition: opacity 0.2s linear, visibility 0.2s linear, width 0.4s linear; // visibility: hidden;
-webkit-transition: opacity 0.2s linear, visibility 0.2s linear, width 0.4s linear; // transition: opacity 0.4s ease-in, visibility 0.4s ease-in , width 0.2s ease-in, right 0.2s ease-in;
// -webkit-transition: opacity 0.4s ease-in, visibility 0.4s ease-in, width 0.2s ease-in, right 0.2s ease-in;
} }
} }

View File

@ -64,7 +64,7 @@
</div> </div>
<button <button
@click="showProcesses = !showProcesses" @click="showProcesses = !showProcesses"
class="button is-small is-gray2 level-item"> class="button is-small is-white level-item">
<b-icon icon="swap-vertical"/> <b-icon icon="swap-vertical"/>
</button> </button>
<processes-popup <processes-popup
@ -154,7 +154,7 @@
// Tainacan Header // Tainacan Header
#tainacan-header { #tainacan-header {
background-color: $gray2; background-color: white;
height: $header-height; height: $header-height;
max-height: $header-height; max-height: $header-height;
width: 100%; width: 100%;
@ -191,7 +191,7 @@
color: $blue5 !important; color: $blue5 !important;
} }
.button:hover, .button:active, .button:focus { .button:hover, .button:active, .button:focus {
background-color: $gray2 !important; background-color: white !important;
} }
.search-area { .search-area {

View File

@ -3,8 +3,8 @@
id="tainacan-repository-subheader" id="tainacan-repository-subheader"
class="level secondary-page" class="level secondary-page"
:class="{'is-menu-compressed': isMenuCompressed, 'is-repository-level' : isRepositoryLevel}"> :class="{'is-menu-compressed': isMenuCompressed, 'is-repository-level' : isRepositoryLevel}">
<h1 v-if="isRepositoryLevel">Nome do Site</h1> <h1 v-if="isRepositoryLevel">{{ repositoryName }}</h1>
<h1 v-else>{{ collectionName }}</h1> <h1 v-else>{{ $i18n.get('collection') + '' }} <span class="has-text-weight-bold">{{ collectionName }}</span></h1>
</div> </div>
</template> </template>
@ -13,6 +13,11 @@ import { mapActions, mapGetters } from 'vuex';
export default { export default {
name: 'TainacanRepositorySubheader', name: 'TainacanRepositorySubheader',
data() {
return {
repositoryName: tainacan_plugin.repository_name
}
},
props: { props: {
isMenuCompressed: false, isMenuCompressed: false,
isRepositoryLevel: true isRepositoryLevel: true
@ -70,7 +75,6 @@ export default {
h1 { h1 {
font-size: 18px; font-size: 18px;
font-weight: 500;
color: white; color: white;
line-height: 18px; line-height: 18px;
max-width: 100%; max-width: 100%;

View File

@ -4,7 +4,7 @@
<h1>{{ pageTitle }} <span class="is-italic has-text-weight-semibold">{{ isRepositoryLevel ? '' : entityName }}</span></h1> <h1>{{ pageTitle }} <span class="is-italic has-text-weight-semibold">{{ isRepositoryLevel ? '' : entityName }}</span></h1>
<a <a
@click="$router.go(-1)" @click="$router.go(-1)"
class="back-link is-secondary"> class="back-link has-text-secondary">
{{ $i18n.get('back') }} {{ $i18n.get('back') }}
</a> </a>
<hr> <hr>

View File

@ -4,8 +4,8 @@
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
x="0px" x="0px"
y="0px" y="0px"
width="22" width="20"
height="22" height="20"
viewBox="0 0 24 24" viewBox="0 0 24 24"
class="activities-icon" class="activities-icon"
xml:space="preserve"> xml:space="preserve">
@ -25,7 +25,6 @@ export default {
<style type="text/scss"> <style type="text/scss">
svg.activities-icon { svg.activities-icon {
margin-bottom: -5px;
fill: #898d8f; fill: #898d8f;
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<span class="help-wrapper"> <span class="help-wrapper">
<a class="help-button"> <a class="help-button has-text-secondary">
<b-icon <b-icon
size="is-small" size="is-small"
icon="help-circle-outline"/></a> icon="help-circle-outline"/></a>

View File

@ -192,7 +192,7 @@ export default {
} }
.processes-popup{ .processes-popup{
background-color: #c1dae0; background-color: $blue2;
width: 320px; width: 320px;
max-width: 100%; max-width: 100%;
position: absolute; position: absolute;
@ -220,6 +220,7 @@ export default {
} }
.popup-footer { .popup-footer {
padding: 4px 12px 6px 10px; padding: 4px 12px 6px 10px;
min-height: 29px;
.footer-title { .footer-title {
margin-right: auto; margin-right: auto;
font-size: 0.625rem; font-size: 0.625rem;
@ -244,7 +245,7 @@ export default {
} }
li:hover { li:hover {
background-color: $gray2; background-color: $gray1;
.action-icon{ .action-icon{
visibility: visible; visibility: visible;
@ -318,7 +319,7 @@ export default {
border-style: solid; border-style: solid;
} }
&:before { &:before {
border-color: transparent transparent $turquoise2 transparent; border-color: transparent transparent $blue2 transparent;
border-right-width: 8px; border-right-width: 8px;
border-bottom-width: 8px; border-bottom-width: 8px;
border-left-width: 8px; border-left-width: 8px;

View File

@ -0,0 +1,29 @@
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
height="16"
width="16"
xml:space="preserve"
viewBox="0 0 20 20"
y="0px"
x="0px"
class="taxonomies-icon">
<path
d="M 0,0 H 9 V 9 H 0 V 0 M 15.5,0 C 18,0 20,2 20,4.5 20,7 18,9 15.5,9 13,9 11,7 11,4.5 11,2 13,0 15.5,0 M 4.5,12 9,20 H 0 L 4.5,12 M 17,15 h 3 v 2 h -3 v 3 h -2 v -3 h -3 v -2 h 3 v -3 h 2 z"
/>
</svg>
</template>
<script>
export default {
name: 'TaxonomiesIcon'
}
</script>
<style type="text/scss">
svg.taxonomies-icon {
fill: #898d8f;
}
</style>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="primary-page page-container"> <div class="repository-level-page page-container">
<tainacan-title /> <tainacan-title />
<h3>{{ $i18n.get('label_available_importers') }}</h3> <h3>{{ $i18n.get('label_available_importers') }}</h3>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="primary-page page-container"> <div class="repository-level-page page-container">
<b-loading :active.sync="isLoadingMetadatumMappers"/> <b-loading :active.sync="isLoadingMetadatumMappers"/>
<tainacan-title /> <tainacan-title />
<div <div

View File

@ -2,7 +2,7 @@
<div> <div>
<div <div
:class="{ :class="{
'primary-page': isRepositoryLevel, 'repository-level-page': isRepositoryLevel,
'page-container': isRepositoryLevel 'page-container': isRepositoryLevel
}"> }">
<tainacan-title /> <tainacan-title />

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="primary-page page-container"> <div class="repository-level-page page-container">
<tainacan-title /> <tainacan-title />
<filters-list/> <filters-list/>
</div> </div>

View File

@ -1,6 +1,6 @@
<template> <template>
<div <div
:class="{'primary-page': isRepositoryLevel}"> :class="{'repository-level-page': isRepositoryLevel}">
<!-- SEARCH AND FILTERS --------------------- --> <!-- SEARCH AND FILTERS --------------------- -->
<!-- Filter menu compress button --> <!-- Filter menu compress button -->
@ -40,7 +40,7 @@
</div> </div>
<a <a
@click="openAdvancedSearch = !openAdvancedSearch" @click="openAdvancedSearch = !openAdvancedSearch"
class="is-size-7 is-secondary is-pulled-right is-hidden-mobile">{{ $i18n.get('advanced_search') }}</a> class="is-size-7 has-text-secondary is-pulled-right is-hidden-mobile">{{ $i18n.get('advanced_search') }}</a>
<h3 class="has-text-weight-semibold">{{ $i18n.get('filters') }}</h3> <h3 class="has-text-weight-semibold">{{ $i18n.get('filters') }}</h3>
<a <a
@ -368,7 +368,7 @@
</div> </div>
<a <a
@click="openAdvancedSearch = !openAdvancedSearch" @click="openAdvancedSearch = !openAdvancedSearch"
class="is-size-7 is-secondary is-pulled-right">{{ $i18n.get('advanced_search') }}</a> class="is-size-7 has-text-secondary is-pulled-right">{{ $i18n.get('advanced_search') }}</a>
</div> </div>
</div> </div>
</div> </div>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="primary-page page-container"> <div class="repository-level-page page-container">
<tainacan-title /> <tainacan-title />
<metadata-list/> <metadata-list/>
</div> </div>

View File

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="primary-page page-container"> <div class="repository-level-page page-container">
<tainacan-title /> <tainacan-title />
<div <div
class="sub-header" class="sub-header"

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<div class="is-fullheight"> <div class="is-fullheight">
<div class="page-container primary-page"> <div class="page-container repository-level-page">
<tainacan-title/> <tainacan-title/>
<h1 class="event-titles">{{ event.description }}</h1> <h1 class="event-titles">{{ event.description }}</h1>
<div <div

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="columns is-fullheight"> <div class="columns is-fullheight">
<div class="page-container primary-page"> <div class="page-container repository-level-page">
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<p class="title"> <p class="title">

View File

@ -28,7 +28,7 @@
label { margin-bottom: 0; } label { margin-bottom: 0; }
&.control { font-size: 13px !important; } &.control { font-size: 13px !important; }
.b-checkbox { width: 100% }; .b-checkbox { width: 100% };
&:hover { background-color: $turquoise1; } &:hover { background-color: $gray1; }
.is-small { color: $gray4; } .is-small { color: $gray4; }
&.is-active { background-color: $turquoise2; } &.is-active { background-color: $turquoise2; }
} }

View File

@ -11,7 +11,7 @@
margin-bottom: 0px !important; margin-bottom: 0px !important;
color: $tainacan-input-color; color: $tainacan-input-color;
option:checked, option:hover { option:checked, option:hover {
background-color: $turquoise1 !important; background-color: $gray1 !important;
} }
&:focus, &:active { &:focus, &:active {
box-shadow: none !important; box-shadow: none !important;

View File

@ -211,3 +211,4 @@
} }
} }
} }

View File

@ -64,14 +64,77 @@ a:hover {
} }
} }
// Page settings // Repository-level pages
.primary-page { .repository-level-page {
margin-top: 94px; margin-top: 94px;
height: $page-height !important; height: $page-height !important;
@media screen and (max-width: 769px) { @media screen and (max-width: 769px) {
margin-top: 0; margin-top: 0;
} }
.is-primary, .is-primary:hover, .is-primary:focus {
background-color: $blue4 !important;
color: white !important;
}
.is-secondary, .is-secondary:hover, .is-secondary:focus {
background-color: $blue5 !important;
color: white !important;
}
.has-text-primary, .has-text-primary:hover, .is-has-text-primary:focus {
color: $blue4 !important;
}
a, a:hover,
.has-text-secondary, .has-text-secondary:hover, .is-has-text-secondary:focus {
color: $blue5 !important;
}
.tabs {
li.is-active a {
border-bottom: 5px solid $blue5;
color: $blue5;
}
}
.select:not(.is-multiple)::after {
color: $blue5;
option:checked, option:hover {
background-color: $gray1 !important;
}
}
.tainacan-table {
tr.selected-row {
background-color: $blue1 !important;
.checkbox-cell .checkbox, .actions-cell .actions-container {
background-color: $blue2 !important;
}
}
}
.dropdown-trigger {
.button .icon {
color: $blue5;
}
}
.dropdown-menu .dropdown-content {
.dropdown-item.is-active { background-color: $blue2; }
}
.switch {
&:hover input[type="checkbox"]:checked + .check {
background-color: $blue2;
}
input[type="checkbox"]:checked + .check {
border: 2px solid $blue5;
&::before {
background-color: $blue5;
}
}
&.is-small {
input[type="checkbox"]:checked + .check {
border: 1.5px solid $blue5;
}
}
}
} }
// Generic page container // Generic page container
.page-container { .page-container {

View File

@ -271,6 +271,7 @@ return apply_filters( 'tainacan-admin-i18n', [
'label_max_options_to_show' => __( 'Max options to show', 'tainacan' ), 'label_max_options_to_show' => __( 'Max options to show', 'tainacan' ),
'label_unamed_process' => __( 'Unamed process', 'tainacan' ), 'label_unamed_process' => __( 'Unamed process', 'tainacan' ),
'label_import_collection' => __( 'Import collection', 'tainacan' ), 'label_import_collection' => __( 'Import collection', 'tainacan' ),
'label_semantic_uri' => __( 'Semantic Uri', 'tainacan' ),
// Instructions. More complex sentences to guide user and placeholders // Instructions. More complex sentences to guide user and placeholders
'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ), 'instruction_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),

View File

@ -210,6 +210,15 @@ class Metadatum extends Entity {
public function get_exposer_mapping() { public function get_exposer_mapping() {
return $this->get_mapped_property('exposer_mapping'); return $this->get_mapped_property('exposer_mapping');
} }
/**
* Return the semantic_uri
*
* @return string
*/
function get_semantic_uri(){
return $this->get_mapped_property('semantic_uri');
}
/** /**
* Set the metadatum name * Set the metadatum name
@ -361,7 +370,16 @@ class Metadatum extends Entity {
public function set_exposer_mapping( $value ) { public function set_exposer_mapping( $value ) {
$this->set_mapped_property('exposer_mapping', $value); $this->set_mapped_property('exposer_mapping', $value);
} }
/**
* Set Semantic URI for the metadatum
*
* @param [string] $value
* @return void
*/
function set_semantic_uri( $value ){
$this->set_mapped_property('semantic_uri', $value);
}
/** /**
* Transient property used to store the status of the metadatum for a particular collection * Transient property used to store the status of the metadatum for a particular collection

View File

@ -40,6 +40,10 @@ class Metadata extends Repository {
} }
/**
* {@inheritDoc}
* @see \Tainacan\Repositories\Repository::get_map()
*/
public function get_map() { public function get_map() {
return apply_filters('tainacan-get-map-'.$this->get_name(), [ return apply_filters('tainacan-get-map-'.$this->get_name(), [
'name' => [ 'name' => [
@ -182,7 +186,15 @@ class Metadata extends Repository {
'validation' => v::stringType()->in( [ 'yes', 'no', 'never' ] ), 'validation' => v::stringType()->in( [ 'yes', 'no', 'never' ] ),
'description' => __( 'Display by default on listing or do not display or never display.', 'tainacan' ), 'description' => __( 'Display by default on listing or do not display or never display.', 'tainacan' ),
'default' => 'yes' 'default' => 'yes'
] ],
'semantic_uri' => [
'map' => 'meta',
'title' => __( 'The semantic metadatum description URI' ),
'type' => __( 'url' ),
'validation' => v::optional(v::url()),
'description' => __( 'The semantic metadatum description URI like: ', 'tainacan' ).'https://schema.org/URL',
'default' => ''
]
] ); ] );
} }

View File

@ -403,7 +403,7 @@ class Exposers {
$metadatum->set_metadata_type('Tainacan\Metadata_Types\Text'); $metadatum->set_metadata_type('Tainacan\Metadata_Types\Text');
} }
$metadatum->set_name($mapper_metadatum['label']); $metadatum->set_name($mapper_metadatum['label']);
$metadatum->set_description($mapper_metadatum['URI']); $metadatum->set_semantic_uri($mapper_metadatum['URI']);
$metadatum->set_exposer_mapping([ $metadatum->set_exposer_mapping([
$mapper->slug => $slug $mapper->slug => $slug
]); ]);

View File

@ -134,7 +134,7 @@ class CSV extends Importer {
* @return Tainacan\Entities\Item Item inserted * @return Tainacan\Entities\Item Item inserted
*/ */
public function insert( $processed_item, $collection_index ) { public function insert( $processed_item, $collection_index ) {
$inserted_item = super::insert( $processed_item, $collection_index ); $inserted_item = parent::insert( $processed_item, $collection_index );
$column_document = $this->get_option('document_index'); $column_document = $this->get_option('document_index');
$column_attachment = $this->get_option('attachment_index'); $column_attachment = $this->get_option('attachment_index');

View File

@ -430,7 +430,7 @@ class TAINACAN_REST_Exposers extends TAINACAN_UnitApiTestCase {
foreach ($metadata as $metadatum) { foreach ($metadata as $metadatum) {
$this->assertTrue(array_key_exists($metadatum->get_slug(), $mapper->metadata)); $this->assertTrue(array_key_exists($metadatum->get_slug(), $mapper->metadata));
if(! array_key_exists('core_metadatum', $mapper->metadata[$metadatum->get_slug()]) || $mapper->metadata[$metadatum->get_slug()]['core_metadatum'] == false) { if(! array_key_exists('core_metadatum', $mapper->metadata[$metadatum->get_slug()]) || $mapper->metadata[$metadatum->get_slug()]['core_metadatum'] == false) {
$this->assertEquals($mapper->metadata[$metadatum->get_slug()]['URI'], $metadatum->get_description()); $this->assertEquals($mapper->metadata[$metadatum->get_slug()]['URI'], $metadatum->get_semantic_uri());
} }
$this->assertEquals($mapper->metadata[$metadatum->get_slug()]['label'], $metadatum->get_name()); $this->assertEquals($mapper->metadata[$metadatum->get_slug()]['label'], $metadatum->get_name());
} }