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

This commit is contained in:
weryques 2018-05-22 12:37:51 -03:00
commit f9189a1203
19 changed files with 216 additions and 123 deletions

View File

@ -3,7 +3,7 @@
<div class="page-container primary-page"> <div class="page-container primary-page">
<tainacan-title /> <tainacan-title />
<b-tabs v-model="activeTab"> <b-tabs v-model="activeTab">
<b-tab-item :label="$i18n.get('category')"> <b-tab-item :label="$i18n.get('taxonomy')">
<form <form
v-if="category != null && category != undefined" v-if="category != null && category != undefined"
class="tainacan-form" class="tainacan-form"

View File

@ -30,7 +30,7 @@
<img <img
id="thumbail-image" id="thumbail-image"
:alt="$i18n.get('label_thumbnail')" :alt="$i18n.get('label_thumbnail')"
:src="(collection.thumbnail == undefined || collection.thumbnail == false) ? thumbPlaceholderPath : collection.thumbnail"> :src="(collection.thumbnail == undefined || collection.thumbnail == false) ? thumbPlaceholderPath : collection.thumbnail.thumb">
</figure> </figure>
<div class="thumbnail-buttons-row"> <div class="thumbnail-buttons-row">
<a <a
@ -639,9 +639,11 @@ export default {
} }
}, },
mounted() { mounted() {
document.getElementById('collection-page-container').addEventListener('scroll', ($event) => { if (this.$route.fullPath.split("/").pop() != "new") {
this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53)); document.getElementById('collection-page-container').addEventListener('scroll', ($event) => {
}); this.$emit('onShrinkHeader', ($event.originalTarget.scrollTop > 53));
});
}
} }
} }

View File

@ -80,7 +80,7 @@
</b-table> </b-table>
<div v-if="!totalCategories || totalCategories <= 0"> <div v-if="(!totalCategories || totalCategories <= 0) && !isLoading">
<section class="section"> <section class="section">
<div class="content has-text-grey has-text-centered"> <div class="content has-text-grey has-text-centered">
<p> <p>
@ -93,7 +93,7 @@
tag="button" tag="button"
class="button is-secondary" class="button is-secondary"
:to="{ path: $routerHelper.getNewCategoryPath() }"> :to="{ path: $routerHelper.getNewCategoryPath() }">
{{ $i18n.getFrom('taxonomies', 'new') }} {{ $i18n.getFrom('taxonomies', 'new_item') }}
</router-link> </router-link>
</div> </div>
</section> </section>

View File

@ -13,11 +13,11 @@
position="is-bottom-left" position="is-bottom-left"
v-if="collections.length > 0 && collections[0].current_user_can_edit" v-if="collections.length > 0 && collections[0].current_user_can_edit"
:disabled="!isSelectingCollections" :disabled="!isSelectingCollections"
id="mass-actions-dropdown"> id="bulk-actions-dropdown">
<button <button
class="button is-white" class="button is-white"
slot="trigger"> slot="trigger">
<span>{{ $i18n.get('label_mass_actions') }}</span> <span>{{ $i18n.get('label_bulk_actions') }}</span>
<b-icon icon="menu-down"/> <b-icon icon="menu-down"/>
</button> </button>
@ -36,7 +36,7 @@
<thead> <thead>
<tr> <tr>
<!-- Checking list --> <!-- Checking list -->
<th class="checkbox-cell"> <th>
&nbsp; &nbsp;
<!-- nothing to show on header --> <!-- nothing to show on header -->
</th> </th>
@ -56,6 +56,10 @@
<th> <th>
<div class="th-wrap">{{ $i18n.get('label_creation') }}</div> <div class="th-wrap">{{ $i18n.get('label_creation') }}</div>
</th> </th>
<th class="actions-header">
&nbsp;
<!-- nothing to show on header for actions cell-->
</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
@ -327,7 +331,9 @@ export default {
.selection-control { .selection-control {
padding: 20px 14px 0px 14px; padding: 6px 0px 0px 18px;
background: white;
height: 40px;
.select-all { .select-all {
color: $gray-light; color: $gray-light;
@ -336,38 +342,60 @@ export default {
color: $gray-light; color: $gray-light;
} }
} }
} }
.table { .table {
width: 100%; width: 100%;
border-collapse: separate;
.checkbox-cell { th {
width: 40px; position: sticky;
height: 58px; position: -webkit-sticky;
padding: 0; background-color: white;
position: absolute !important; border-bottom: 1px solid $tainacan-input-background;
left: $page-side-padding; top: 0px;
visibility: hidden;
display: flex;
justify-content: space-around;
z-index: 9; 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 { &::before {
box-shadow: inset 50px 0 10px -12px #222; box-shadow: inset 50px 0 10px -12px #222;
content: " "; content: " ";
width: 60px; width: 50px;
height: 100%; height: 100%;
position: absolute; position: absolute;
left: 0; left: 0;
top: 0;
} }
.checkbox { label.checkbox {
border-radius: 0px; border-radius: 0px;
background-color: white; background-color: white;
padding: 10px 10px 10px 14px; padding: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex;
justify-content: center;
}
label.control-label {
display: none;
} }
&.is-selecting { &.is-selecting {
visibility: visible; visibility: visible;
@ -379,8 +407,7 @@ export default {
// } // }
.thumbnail-cell { .thumbnail-cell {
width: 58px; width: 60px;
padding-left: 54px;
} }
tbody { tbody {
@ -389,14 +416,14 @@ export default {
background-color: transparent; background-color: transparent;
&.selected-row { &.selected-row {
background-color: $primary-lighter !important; background-color: $primary-lighter;
.checkbox-cell .checkbox, .actions-cell .actions-container { .checkbox-cell .checkbox, .actions-cell .actions-container {
background-color: $primary-lighter !important; background-color: $primary-lighter;
} }
} }
td { td {
height: 58px; height: 60px;
max-height: 58px; max-height: 60px;
padding: 10px; padding: 10px;
vertical-align: middle; vertical-align: middle;
line-height: 12px; line-height: 12px;
@ -408,7 +435,7 @@ export default {
} }
td.column-default-width{ td.column-default-width{
max-width: 350px; max-width: 300px;
p { p {
text-overflow: ellipsis; text-overflow: ellipsis;
overflow-x: hidden; overflow-x: hidden;
@ -416,7 +443,7 @@ export default {
} }
} }
img.table-thumb { img.table-thumb {
max-height: 38px !important; max-height: 37px !important;
border-radius: 3px; border-radius: 3px;
} }
@ -428,46 +455,56 @@ export default {
td.actions-cell { td.actions-cell {
padding: 0px; padding: 0px;
visibility: hidden; position: sticky !important;
position: absolute; position: -webkit-sticky !important;
right: $page-side-padding; right: 0px;
display: none; top: auto;
width: 80px;
.actions-container { .actions-container {
visibility: hidden;
display: flex;
position: relative; position: relative;
padding: 10px; padding: 0;
height: 100%; height: 100%;
width: 80px;
z-index: 9; z-index: 9;
background-color: $tainacan-input-background; background-color: transparent;
} float: right;
a .icon {
margin: 8px;
} }
&::before { a {
box-shadow: inset -113px 0 17px -17px #222; margin: auto;
content: " "; font-size: 18px !important;
width: 125px;
height: 100%;
position: absolute;
right: 0;
top: 0;
} }
} }
&:hover { &:hover {
background-color: $tainacan-input-background; background-color: $tainacan-input-background !important;
cursor: pointer; cursor: pointer;
.checkbox-cell { .checkbox-cell {
visibility: visible; visibility: visible;
.checkbox { background-color: $tainacan-input-background; } .checkbox { background-color: $tainacan-input-background !important; }
} }
.actions-cell { .actions-cell {
visibility: visible; .actions-container {
display: block; 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;
}
} }
} }
} }
} }

View File

@ -2,10 +2,25 @@
<div> <div>
<b-loading :active.sync="isLoadingFieldTypes"/> <b-loading :active.sync="isLoadingFieldTypes"/>
<tainacan-title v-if="!isRepositoryLevel"/> <tainacan-title v-if="!isRepositoryLevel"/>
<p v-if="isRepositoryLevel">{{ $i18n.get('info_repository_metadata_inheritance') }}</p>
<br>
<b-tabs v-model="activeTab"> <b-tabs v-model="activeTab">
<b-tab-item :label="$i18n.get('taxonomy')"> <b-tab-item :label="$i18n.get('fields')">
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<section
v-if="activeFieldList.length <= 0 && !isLoadingFields"
class="field is-grouped-centered section">
<div class="content has-text-gray has-text-centered">
<p>
<b-icon
icon="format-list-bulleted-type"
size="is-large"/>
</p>
<p>{{ $i18n.get('info_there_is_no_field' ) }}</p>
<p>{{ $i18n.get('info_create_metadata' ) }}</p>
</div>
</section>
<draggable <draggable
v-model="activeFieldList" v-model="activeFieldList"
class="active-fields-area" class="active-fields-area"
@ -122,8 +137,8 @@
</div> </div>
</b-tab-item> </b-tab-item>
<!-- Exposer --> <!-- Exposer -->
<b-tab-item :label="$i18n.get('exposer')"> <b-tab-item :label="$i18n.get('mapping')">
<p>Exposer Logic goes in here.</p> <p>Under construction. You will be able to map your metadata to other metadata standards in this page.</p>
</b-tab-item> </b-tab-item>
</b-tabs> </b-tabs>
</div> </div>

View File

@ -2,8 +2,23 @@
<div> <div>
<b-loading :active.sync="isLoadingFieldTypes"/> <b-loading :active.sync="isLoadingFieldTypes"/>
<tainacan-title v-if="!isRepositoryLevel"/> <tainacan-title v-if="!isRepositoryLevel"/>
<p v-if="isRepositoryLevel">{{ $i18n.get('info_repository_filters_inheritance') }}</p>
<br>
<div class="columns"> <div class="columns">
<div class="column"> <div class="column">
<section
v-if="activeFilterList.length <= 0 && !isLoadingFilters"
class="field is-grouped-centered section">
<div class="content has-text-gray has-text-centered">
<p>
<b-icon
icon="filter"
size="is-large"/>
</p>
<p>{{ $i18n.get('info_there_is_no_filter' ) }}</p>
<p>{{ $i18n.get('info_create_filters' ) }}</p>
</div>
</section>
<draggable <draggable
class="active-filters-area" class="active-filters-area"
@change="handleChange" @change="handleChange"
@ -115,7 +130,7 @@
</div> </div>
<div class="column available-fields-area"> <div class="column available-fields-area">
<div class="field" > <div class="field" >
<h3 class="label"> {{ $i18n.get('label_available_field_types') }}</h3> <h3 class="label"> {{ $i18n.get('label_available_fields') }}</h3>
<draggable <draggable
v-if="availableFieldList.length > 0" v-if="availableFieldList.length > 0"
v-model="availableFieldList" v-model="availableFieldList"

View File

@ -16,11 +16,11 @@
position="is-bottom-left" position="is-bottom-left"
v-if="items.length > 0 && items[0].current_user_can_edit" v-if="items.length > 0 && items[0].current_user_can_edit"
:disabled="!isSelectingItems" :disabled="!isSelectingItems"
id="mass-actions-dropdown"> id="bulk-actions-dropdown">
<button <button
class="button is-white" class="button is-white"
slot="trigger"> slot="trigger">
<span>{{ $i18n.get('label_mass_actions') }}</span> <span>{{ $i18n.get('label_bulk_actions') }}</span>
<b-icon icon="menu-down"/> <b-icon icon="menu-down"/>
</button> </button>
@ -112,7 +112,8 @@
<!-- Actions --> <!-- Actions -->
<td <td
v-if="item.current_user_can_edit && !isOnTheme" v-if="item.current_user_can_edit && !isOnTheme"
class="column-default-width actions-cell"> class="column-default-width actions-cell"
:label="$i18n.get('label_actions')">
<div class="actions-container"> <div class="actions-container">
<a <a
id="button-edit" id="button-edit"
@ -317,16 +318,14 @@ export default {
border-bottom: 1px solid $tainacan-input-background; border-bottom: 1px solid $tainacan-input-background;
top: 0px; top: 0px;
z-index: 9; z-index: 9;
padding: 10px;
vertical-align: bottom;
&.actions-header { &.actions-header {
min-width: 8.333333333%; min-width: 8.333333333%;
} }
} }
// &.selectable-table th:nth-child(2), &.selectable-table td:nth-child(2) {
// padding-left: 54px;
// }
.checkbox-cell { .checkbox-cell {
min-width: 40px; min-width: 40px;
width: 40px; width: 40px;
@ -371,7 +370,7 @@ export default {
// } // }
.thumbnail-cell { .thumbnail-cell {
width: 58px; width: 60px;
} }
tbody { tbody {
@ -386,8 +385,8 @@ export default {
} }
} }
td { td {
height: 58px; height: 60px;
max-height: 58px; max-height: 60px;
padding: 10px; padding: 10px;
vertical-align: middle; vertical-align: middle;
line-height: 12px; line-height: 12px;
@ -419,7 +418,6 @@ export default {
td.actions-cell { td.actions-cell {
padding: 0px; padding: 0px;
position: sticky !important; position: sticky !important;
position: -webkit-sticky !important; position: -webkit-sticky !important;
right: 0px; right: 0px;

View File

@ -43,7 +43,7 @@
</router-link></li> </router-link></li>
<li><router-link <li><router-link
tag="a" tag="a"
to="/categories" to="/taxonomies"
:class="activeRoute == 'CategoriesPage' ? 'is-active':''"> :class="activeRoute == 'CategoriesPage' ? 'is-active':''">
<b-icon <b-icon
size="is-small" size="is-small"

View File

@ -166,7 +166,7 @@ export default {
.then(itemTitle => this.arrayViewPath.splice(i, 1, itemTitle)) .then(itemTitle => this.arrayViewPath.splice(i, 1, itemTitle))
.catch((error) => this.$console.error(error)); .catch((error) => this.$console.error(error));
break; break;
case 'categories': case 'taxonomies':
this.fetchCategoryName(this.arrayRealPath[i]) this.fetchCategoryName(this.arrayRealPath[i])
.then(categoryName => this.arrayViewPath.splice(i, 1, categoryName)) .then(categoryName => this.arrayViewPath.splice(i, 1, categoryName))
.catch((error) => this.$console.error(error)); .catch((error) => this.$console.error(error));

View File

@ -87,7 +87,7 @@ export default {
.then(itemName => { this.arrayViewPath.splice(i, 1, itemName); this.entityName = itemName; }) .then(itemName => { this.arrayViewPath.splice(i, 1, itemName); this.entityName = itemName; })
.catch((error) => this.$console.error(error)); .catch((error) => this.$console.error(error));
break; break;
case 'categories': case 'taxonomies':
this.fetchCategoryName(this.arrayRealPath[i]) this.fetchCategoryName(this.arrayRealPath[i])
.then(categoryName => this.arrayViewPath.splice(i, 1, categoryName)) .then(categoryName => this.arrayViewPath.splice(i, 1, categoryName))
.catch((error) => this.$console.error(error)); .catch((error) => this.$console.error(error));

View File

@ -19,9 +19,12 @@
{{ $i18n.get('add_one_item') }} {{ $i18n.get('add_one_item') }}
</router-link> </router-link>
</b-dropdown-item> </b-dropdown-item>
<b-dropdown-item disabled>{{ $i18n.get('add_items_bulk') + ' (Not ready)' }} <b-dropdown-item disabled>
{{ $i18n.get('add_items_bulk') + ' (Not ready)' }}
</b-dropdown-item>
<b-dropdown-item disabled>
{{ $i18n.get('add_items_external_source') + ' (Not ready)' }}
</b-dropdown-item> </b-dropdown-item>
<b-dropdown-item disabled>{{ $i18n.get('add_items_external_source') + ' (Not ready)' }}<br><small class="is-small">{{ $i18n.get() }}</small></b-dropdown-item>
</b-dropdown> </b-dropdown>
</div> </div>

View File

@ -57,10 +57,10 @@ const routes = [
{ path: '/fields', name: 'FieldsPage', component: FieldsPage, meta: {title: i18nGet('title_repository_fields_page'), icon: 'format-list-checks'} }, { 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: '/taxonomies', 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: '/taxonomies/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: '/taxonomies/: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/: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', 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'} }, { path: '/events/:eventId', name: 'EventPage', component: EventPage, meta: {title: i18nGet('title_event_page'), icon: 'calendar'} },

View File

@ -175,7 +175,7 @@ RouterHelperPlugin.install = function (Vue, options = {}) {
return '/items/?' + qs.stringify(query); return '/items/?' + qs.stringify(query);
}, },
getCategoriesPath(query) { getCategoriesPath(query) {
return '/categories/?' + qs.stringify(query); return '/taxonomies/?' + qs.stringify(query);
}, },
getCategoryTermsPath(categoryId, query) { getCategoryTermsPath(categoryId, query) {
return '/categoryId/' + categoryId + 'terms/?' + qs.stringify(query); return '/categoryId/' + categoryId + 'terms/?' + qs.stringify(query);
@ -200,10 +200,10 @@ RouterHelperPlugin.install = function (Vue, options = {}) {
return '/filters/' + id; return '/filters/' + id;
}, },
getCategoryPath(id) { getCategoryPath(id) {
return '/categories/' + id; return '/taxonomies/' + id;
}, },
getTermPath(categoryId, termId) { getTermPath(categoryId, termId) {
return '/categories/' + categoryId + '/terms/' + termId; return '/taxonomies/' + categoryId + '/terms/' + termId;
}, },
getEventPath(id) { getEventPath(id) {
return '/events/' + id; return '/events/' + id;
@ -228,10 +228,10 @@ RouterHelperPlugin.install = function (Vue, options = {}) {
return '/filters/new'; return '/filters/new';
}, },
getNewCategoryPath() { getNewCategoryPath() {
return '/categories/new'; return '/taxonomies/new';
}, },
getNewTermPath() { getNewTermPath() {
return '/categories/' + categoryId + '/terms/new'; return '/taxonomies/' + categoryId + '/terms/new';
}, },
getNewEventPath() { getNewEventPath() {
return '/events/new'; return '/events/new';
@ -247,10 +247,10 @@ RouterHelperPlugin.install = function (Vue, options = {}) {
return '/filters/' + id + '/edit'; return '/filters/' + id + '/edit';
}, },
getCategoryEditPath(id) { getCategoryEditPath(id) {
return '/categories/' + id + '/edit'; return '/taxonomies/' + id + '/edit';
}, },
getTermEditPath(categoryId, termId) { getTermEditPath(categoryId, termId) {
return '/categories/' + categoryId + '/terms/' + termId + '/edit'; return '/taxonomies/' + categoryId + '/terms/' + termId + '/edit';
}, },
getEventEditPath(id) { getEventEditPath(id) {
return '/events/' + id + '/edit'; return '/events/' + id + '/edit';

View File

@ -152,6 +152,7 @@
height: $subheader-height; height: $subheader-height;
margin-left: -$page-side-padding; margin-left: -$page-side-padding;
margin-right: -$page-side-padding; margin-right: -$page-side-padding;
margin-top: -$page-top-padding;
padding-top: $page-small-top-padding; padding-top: $page-small-top-padding;
padding-left: $page-side-padding; padding-left: $page-side-padding;
padding-right: $page-side-padding; padding-right: $page-side-padding;

View File

@ -5,13 +5,28 @@
class="sub-header" class="sub-header"
v-if="totalCollections > 0"> v-if="totalCollections > 0">
<div class="header-item"> <div class="header-item">
<router-link <b-dropdown id="collection-creation-options-dropdown">
id="button-create-collection" <button
tag="button" class="button is-secondary"
class="button is-secondary" slot="trigger">
:to="{ path: $routerHelper.getNewCollectionPath() }"> <span>{{ $i18n.getFrom('collections','new_item') }}</span>
{{ $i18n.getFrom('collections', 'new_item') }} <b-icon icon="menu-down"/>
</router-link> </button>
<b-dropdown-item>
<router-link
id="a-create-collection"
tag="div"
:to="{ path: $routerHelper.getNewCollectionPath() }">
{{ $i18n.get('label_blank_collection') }}
<br>
<small class="is-small">{{ $i18n.get('info_choose_your_metadata') }}</small>
</router-link>
</b-dropdown-item>
<b-dropdown-item disabled>
{{ $i18n.get('label_dublin_core') + ' (Not ready)' }}
</b-dropdown-item>
</b-dropdown>
</div> </div>
</div> </div>
<div class="above-subheader"> <div class="above-subheader">
@ -149,6 +164,7 @@ export default {
height: $subheader-height; height: $subheader-height;
margin-left: -$page-side-padding; margin-left: -$page-side-padding;
margin-right: -$page-side-padding; margin-right: -$page-side-padding;
margin-top: -$page-top-padding;
padding-top: $page-small-top-padding; padding-top: $page-small-top-padding;
padding-left: $page-side-padding; padding-left: $page-side-padding;
padding-right: $page-side-padding; padding-right: $page-side-padding;

View File

@ -412,6 +412,7 @@
#collection-search-button { #collection-search-button {
border-radius: 0px !important; border-radius: 0px !important;
padding: 0px 8px !important; padding: 0px 8px !important;
border-color: $tainacan-input-background;
&:focus, &:active { &:focus, &:active {
border-color: none !important; border-color: none !important;
} }

View File

@ -103,7 +103,7 @@ a:hover {
height: 1px; height: 1px;
background-color: $secondary; background-color: $secondary;
} }
margin-bottom: 60px; margin-bottom: 40px;
} }
.tainacan-modal-content { .tainacan-modal-content {

View File

@ -17,7 +17,7 @@ return [
'event' => __( 'Event', 'tainacan' ), 'event' => __( 'Event', 'tainacan' ),
'term' => __( 'Term', 'tainacan' ), 'term' => __( 'Term', 'tainacan' ),
'terms' => __( 'Terms', 'tainacan' ), 'terms' => __( 'Terms', 'tainacan' ),
'exposer' => __( 'Exposer', 'tainacan' ), 'mapping' => __( 'Mapping', 'tainacan' ),
// Actions // Actions
'edit' => __( 'Edit', 'tainacan' ), 'edit' => __( 'Edit', 'tainacan' ),
@ -50,32 +50,30 @@ return [
'private_visibility' => __( 'Visible only for editors', 'tainacan' ), 'private_visibility' => __( 'Visible only for editors', 'tainacan' ),
// Page Titles (used mainly on Router) // Page Titles (used mainly on Router)
'title_repository_collections_page' => __( 'Repository Collections Page', 'tainacan' ), 'title_repository_collections_page' => __( 'Repository Collections', 'tainacan' ),
'title_items_page' => __( 'Items Page', 'tainacan' ), 'title_items_page' => __( 'Items', 'tainacan' ),
'title_repository_fields_page' => __( 'Repository Metadata Page', 'tainacan' ), 'title_repository_fields_page' => __( 'Repository Metadata', 'tainacan' ),
'title_repository_filters_page' => __( 'Repository Filters Page', 'tainacan' ), 'title_repository_filters_page' => __( 'Repository Filters', 'tainacan' ),
'title_categories_page' => __( 'Categories Page', 'tainacan' ), 'title_categories_page' => __( 'Categories Page', 'tainacan' ),
'title_terms_page' => __( 'Terms Page', 'tainacan' ), 'title_terms_page' => __( 'Terms', 'tainacan' ),
'title_repository_events_page' => __( 'Repository Events Page', 'tainacan' ), 'title_repository_events_page' => __( 'Repository Events', 'tainacan' ),
'title_collection_page' => __( 'Collection Page', 'tainacan' ), 'title_collection_page' => __( 'Collection', 'tainacan' ),
'title_item_page' => __( 'Item Page', 'tainacan' ), 'title_item_page' => __( 'Item', 'tainacan' ),
'title_field_page' => __( 'Metadata Page', 'tainacan' ), 'title_field_page' => __( 'Metadata', 'tainacan' ),
'title_collection_events' => __( 'Collection Events', 'tainacan' ), 'title_collection_events' => __( 'Collection Events', 'tainacan' ),
'title_filter_page' => __( 'Filter', 'tainacan' ),
/* translators: alkdjklasdj laksjd klsadj */ 'title_category_page' => __( 'Taxonomy', 'tainacan' ),
'title_filter_page' => __( 'Filter Page', 'tainacan' ), 'title_term_page' => __( 'Term', 'tainacan' ),
'title_category_page' => __( 'Taxonomy Page', 'tainacan' ), 'title_event_page' => __( 'Event', 'tainacan' ),
'title_term_page' => __( 'Term Page', 'tainacan' ), 'title_create_collection' => __( 'Collection Creation', 'tainacan' ),
'title_event_page' => __( 'Event Page', 'tainacan' ), 'title_create_category_page' => __( 'Taxonomy Creation', 'tainacan' ),
'title_create_collection' => __( 'Collection Creation Page', 'tainacan' ),
'title_create_category_page' => __( 'Taxonomy Creation Page', 'tainacan' ),
'title_create_item_collection' => __( 'Create Item on Collection', '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_collection' => __( 'Edit Collection', 'tainacan' ),
'title_edit_item' => __( 'Edit Item', 'tainacan' ), 'title_edit_item' => __( 'Edit Item', 'tainacan' ),
'title_category_edition_page' => __( 'Taxonomy Edition Page', 'tainacan' ), 'title_category_edition_page' => __( 'Taxonomy Edition', 'tainacan' ),
'title_filter_edition' => __( 'Filter Edition Page', 'tainacan' ), 'title_filter_edition' => __( 'Filter Edition', 'tainacan' ),
'title_field_edition' => __( 'Metadata Edition Page', 'tainacan' ), 'title_field_edition' => __( 'Metadata Edition', 'tainacan' ),
'title_collection_fields_edition' => __( 'Edit Metadata of', 'tainacan' ), 'title_collection_fields_edition' => __( 'Edit Metadata of', 'tainacan' ),
'title_collection_filters_edition' => __( 'Edit Filters of', 'tainacan' ), 'title_collection_filters_edition' => __( 'Edit Filters of', 'tainacan' ),
@ -175,7 +173,7 @@ return [
'label_all_items' => __( 'All items', 'tainacan' ), 'label_all_items' => __( 'All items', 'tainacan' ),
'label_draft_items' => __( 'Draft', 'tainacan' ), 'label_draft_items' => __( 'Draft', 'tainacan' ),
'label_trash_items' => __( 'Trash', '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_delete_selected_collections' => __( 'Delete selected collections', 'tainacan' ),
'label_edit_selected_collections' => __( 'Edit selected collections', 'tainacan' ), 'label_edit_selected_collections' => __( 'Edit selected collections', 'tainacan' ),
'label_delete_selected_items' => __( 'Delete selected items', '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_collections_page' => __( 'Select all collections on page', 'tainacan' ),
'label_select_all_items_page' => __( 'Select all items on page', 'tainacan' ), 'label_select_all_items_page' => __( 'Select all items on page', 'tainacan' ),
'label_edit_attachments' => __( 'Edit attachments', '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 // 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' ),
@ -238,7 +238,7 @@ return [
'info_by' => __( 'By: ', 'tainacan' ), 'info_by' => __( 'By: ', 'tainacan' ),
'info_date' => __( 'Date: ', 'tainacan' ), 'info_date' => __( 'Date: ', 'tainacan' ),
'info_not_saved' => __( 'Not saved ', '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_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_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' ), 'info_no_description_provided' => __( 'No description provided.', 'tainacan' ),
@ -255,6 +255,11 @@ return [
'info_help_term_name' => __( 'The term name', 'tainacan' ), 'info_help_term_name' => __( 'The term name', 'tainacan' ),
'info_help_term_description' => __( 'The description of the Term.', '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_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 Field Types
'tainacan-text' => __( 'Text', 'tainacan' ), 'tainacan-text' => __( 'Text', 'tainacan' ),

View File

@ -21,7 +21,7 @@ function tainacan_get_the_metadata($field = null, $hide_empty = true) {
$post = get_post(); $post = get_post();
$theme_helper = \Tainacan\Theme_Helper::get_instance(); $theme_helper = \Tainacan\Theme_Helper::get_instance();
if (!$theme_helper->is_post_an_item($post)); if (!$theme_helper->is_post_an_item($post))
return; return;
$item = new Entities\Item($post); $item = new Entities\Item($post);
@ -47,12 +47,12 @@ function tainacan_get_the_document() {
$post = get_post(); $post = get_post();
$theme_helper = \Tainacan\Theme_Helper::get_instance(); $theme_helper = \Tainacan\Theme_Helper::get_instance();
if (!$theme_helper->is_post_an_item($post)); if (!$theme_helper->is_post_an_item($post))
return; return;
$item = new Entities\Item($post); $item = new Entities\Item($post);
return $item->get_document_html($field, $hide_empty); return $item->get_document_html();
} }