commit
f7640dac5f
|
@ -908,11 +908,17 @@ export default {
|
|||
loadMetadata() {
|
||||
// Obtains Item Metadatum
|
||||
this.fetchMetadata(this.itemId).then((metadata) => {
|
||||
this.metadataCollapses = [];
|
||||
|
||||
if (this.isOnSequenceEdit && this.$route.query.collapses) {
|
||||
this.metadataCollapses = [];
|
||||
for (let i = 0; i < metadata.length; i++) {
|
||||
this.metadataCollapses.push(this.$route.query.collapses[i] != undefined ? this.$route.query.collapses[i] : true);
|
||||
}
|
||||
} else if (this.isOnSequenceEdit && !this.$route.query.collapses) {
|
||||
for (let i = 0; i < metadata.length; i++) {
|
||||
this.metadataCollapses.push(true);
|
||||
this.metadataCollapses[i] = false;
|
||||
}
|
||||
} else {
|
||||
for (let i = 0; i < metadata.length; i++) {
|
||||
this.metadataCollapses.push(false);
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
<template>
|
||||
<div class="tainacan-cards-container">
|
||||
<div
|
||||
style="min-height: initial; position: relative"
|
||||
class="tainacan-cards-container">
|
||||
<template v-if="collections.length <= 0 && !isLoading">
|
||||
<ul class="new-collection-menu">
|
||||
<li>
|
||||
|
|
|
@ -109,6 +109,9 @@
|
|||
</section>
|
||||
|
||||
<section class="home-section home-section-collection">
|
||||
<div
|
||||
class="collection-section-connector"
|
||||
aria-hidden/>
|
||||
<div class="home-section-header collections-section-header">
|
||||
<div class="home-section-icon">
|
||||
<router-link
|
||||
|
@ -119,28 +122,29 @@
|
|||
</router-link>
|
||||
</div>
|
||||
<h1>{{ $i18n.get('label_recent_collections') }}</h1>
|
||||
<router-link
|
||||
tag="a"
|
||||
to="/collections">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-20px tainacan-icon-viewtable"/>
|
||||
</span>
|
||||
<span
|
||||
v-if="collectionsTotal != undefined && collectionsTotal > 1"
|
||||
class="menu-text">
|
||||
{{ $i18n.getWithVariables('label_view_all_%s_collections', [collectionsTotal]) }}
|
||||
</span>
|
||||
<span
|
||||
v-if="collectionsTotal != undefined && collectionsTotal == 1"
|
||||
class="menu-text">
|
||||
{{ $i18n.get('label_view_collections_list') }}
|
||||
</span>
|
||||
</router-link>
|
||||
</div>
|
||||
<collections-home-list
|
||||
:is-loading="isLoadingCollections"
|
||||
:collections="collections"
|
||||
:collections-total="collectionsTotal"/>
|
||||
<router-link
|
||||
class="collections-see-more"
|
||||
tag="a"
|
||||
to="/collections">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-20px tainacan-icon-viewtable"/>
|
||||
</span>
|
||||
<span
|
||||
v-if="collectionsTotal != undefined && collectionsTotal > 1"
|
||||
class="menu-text">
|
||||
{{ $i18n.getWithVariables('label_view_all_%s_collections', [collectionsTotal]) }}
|
||||
</span>
|
||||
<span
|
||||
v-if="collectionsTotal != undefined && collectionsTotal == 1"
|
||||
class="menu-text">
|
||||
{{ $i18n.get('label_view_collections_list') }}
|
||||
</span>
|
||||
</router-link>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
@ -214,6 +218,7 @@ export default {
|
|||
}
|
||||
}
|
||||
&.home-section-collection {
|
||||
position: relative;
|
||||
margin-left: 52px;
|
||||
}
|
||||
|
||||
|
@ -226,6 +231,15 @@ export default {
|
|||
top: 43px;
|
||||
left: 26px;
|
||||
}
|
||||
.collection-section-connector {
|
||||
border-left: 1px solid $gray2;
|
||||
border-bottom: 1px solid $gray2;
|
||||
position: absolute;
|
||||
width: calc(100% + 26px);
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: -26px;
|
||||
}
|
||||
|
||||
.home-section-header {
|
||||
width: 100%;
|
||||
|
@ -293,6 +307,34 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
a.collections-see-more {
|
||||
padding: 10px 16px;
|
||||
display: inline-flex;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
background: $gray1;
|
||||
color: $turquoise5;
|
||||
float: right;
|
||||
width: calc(100% - 20px);
|
||||
|
||||
@media screen and (min-width: 768px) {
|
||||
width: calc(50% - 20px);
|
||||
}
|
||||
@media screen and (min-width: 1215px) {
|
||||
width: calc(33.3333% - 20px);
|
||||
}
|
||||
@media screen and (min-width: 1408px) {
|
||||
width: calc(25% - 20px);
|
||||
}
|
||||
@media screen and (min-width: 1920px) {
|
||||
width: calc(20% - 20px);
|
||||
}
|
||||
|
||||
.menu-text { margin-left: 0.5rem;}
|
||||
&:hover {
|
||||
background-color: $gray2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.repository-menu-list {
|
||||
|
|
|
@ -129,7 +129,7 @@
|
|||
@click="onChangeTab('')"
|
||||
:class="{ 'is-active': status == undefined || status == ''}"
|
||||
v-tooltip="{
|
||||
content: $i18n.getWithVariables('info_%s_tab_all',[$i18n.get('collections')]),
|
||||
content: $i18n.get('info_collections_tab_all'),
|
||||
autoHide: true,
|
||||
placement: 'auto',
|
||||
}">
|
||||
|
@ -188,7 +188,7 @@
|
|||
v-for="(statusOption, index) of $statusHelper.getStatuses()"
|
||||
:key="index"
|
||||
v-if="status == statusOption.slug">
|
||||
{{ $i18n.getWithVariables('info_no_%s_' + statusOption.slug,['collection']) }}
|
||||
{{ $i18n.get('info_no_collections_' + statusOption.slug) }}
|
||||
</p>
|
||||
|
||||
<div v-if="$userCaps.hasCapability('edit_tainacan-collections') && status == undefined || status == ''">
|
||||
|
|
|
@ -621,7 +621,7 @@
|
|||
@click="onChangeTab('')"
|
||||
:class="{ 'is-active': status == undefined || status == ''}"
|
||||
v-tooltip="{
|
||||
content: $i18n.getWithVariables('info_%s_tab_all',[$i18n.get('items')]),
|
||||
content: $i18n.get('info_items_tab_all'),
|
||||
autoHide: true,
|
||||
placement: 'auto',
|
||||
}">
|
||||
|
@ -753,7 +753,7 @@
|
|||
v-for="(statusOption, index) of $statusHelper.getStatuses()"
|
||||
:key="index"
|
||||
v-if="status == statusOption.slug">
|
||||
{{ $i18n.getWithVariables('info_no_%s_' + statusOption.slug,['item']) }}
|
||||
{{ $i18n.get('info_no_items_' + statusOption.slug) }}
|
||||
</p>
|
||||
|
||||
<router-link
|
||||
|
|
|
@ -96,7 +96,7 @@
|
|||
@click="onChangeTab('')"
|
||||
:class="{ 'is-active': status == undefined || status == ''}"
|
||||
v-tooltip="{
|
||||
content: $i18n.getWithVariables('info_%s_tab_all',[$i18n.get('taxonomies')]),
|
||||
content: $i18n.get('info_taxonomies_tab_all'),
|
||||
autoHide: true,
|
||||
placement: 'auto',
|
||||
}">
|
||||
|
@ -152,7 +152,7 @@
|
|||
v-for="(statusOption, index) of $statusHelper.getStatuses()"
|
||||
:key="index"
|
||||
v-if="status == statusOption.slug">
|
||||
{{ $i18n.getWithVariables('info_no_%s_' + statusOption.slug,['taxonomy']) }}
|
||||
{{ $i18n.get('info_no_taxonomies_' + statusOption.slug) }}
|
||||
</p>
|
||||
<router-link
|
||||
v-if="status == undefined || status == ''"
|
||||
|
|
|
@ -599,7 +599,7 @@
|
|||
@click="onChangeTab('')"
|
||||
:class="{ 'is-active': status == undefined || status == ''}"
|
||||
v-tooltip="{
|
||||
content: $i18n.getWithVariables('info_%s_tab_all',[$i18n.get('items')]),
|
||||
content: $i18n.get('info_items_tab_all'),
|
||||
autoHide: true,
|
||||
placement: 'auto',
|
||||
}">
|
||||
|
@ -730,7 +730,7 @@
|
|||
v-for="(statusOption, index) of $statusHelper.getStatuses()"
|
||||
:key="index"
|
||||
v-if="status == statusOption.slug">
|
||||
{{ $i18n.getWithVariables('info_no_%s_' + statusOption.slug,['items']) }}
|
||||
{{ $i18n.get('info_no_items_' + statusOption.slug) }}
|
||||
</p>
|
||||
|
||||
<router-link
|
||||
|
|
|
@ -459,25 +459,48 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'instruction_click_or_drag_metadatum_create' => __( 'Click or drag and drop to create a new metadatum', 'tainacan' ),
|
||||
'instruction_drag_and_drop_filter_sort' => __( 'Drag and drop to change filter order', 'tainacan' ),
|
||||
'instruction_drag_and_drop_metadatum_sort' => __( 'Drag and drop to change metadatum order', 'tainacan' ),
|
||||
'instruction_select_step_options_to_show' => __( 'Select which Step values to show', 'tainacan' ),
|
||||
'instruction_select_maximum_options_to_show' => __( 'Select which amount of maximum of options to show', 'tainacan' ),
|
||||
'instruction_select_a_date' => __( 'Select a date', 'tainacan' ),
|
||||
|
||||
// Info. Other feedback to user.
|
||||
'info_%s_tab_all' => __( 'Every published %s, including those visible only to editors.', 'tainacan' ),
|
||||
'info_%s_tab_publish' => __( 'Only %s that are visible to everyone.', 'tainacan' ),
|
||||
'info_%s_tab_private' => __( '%s visible only to editors.', 'tainacan' ),
|
||||
'info_%s_tab_draft' => __( 'Draft %s, not published.', 'tainacan' ),
|
||||
'info_%s_tab_trash' => __( '%s that were sent to trash.', 'tainacan' ),
|
||||
'info_items_tab_all' => __( 'Every published item, including those visible only to editors.', 'tainacan' ),
|
||||
'info_items_tab_publish' => __( 'Only items that are visible to everyone.', 'tainacan' ),
|
||||
'info_items_tab_private' => __( 'Items visible only to editors.', 'tainacan' ),
|
||||
'info_items_tab_draft' => __( 'Draft items, not published.', 'tainacan' ),
|
||||
'info_items_tab_trash' => __( 'Items that were sent to trash.', 'tainacan' ),
|
||||
|
||||
'info_collections_tab_all' => __( 'Every published collection, including those visible only to editors.', 'tainacan' ),
|
||||
'info_collections_tab_publish' => __( 'Only collections that are visible to everyone.', 'tainacan' ),
|
||||
'info_collections_tab_private' => __( 'Collections visible only to editors.', 'tainacan' ),
|
||||
'info_collections_tab_draft' => __( 'Draft collections, not published.', 'tainacan' ),
|
||||
'info_collections_tab_trash' => __( 'Collections that were sent to trash.', 'tainacan' ),
|
||||
|
||||
'info_taxonomies_tab_all' => __( 'Every published taxonomy, including those visible only to editors.', 'tainacan' ),
|
||||
'info_taxonomies_tab_publish' => __( 'Only taxonomies that are visible to everyone.', 'tainacan' ),
|
||||
'info_taxonomies_tab_private' => __( 'Taxonomies visible only to editors.', 'tainacan' ),
|
||||
'info_taxonomies_tab_draft' => __( 'Draft taxonomies, not published.', 'tainacan' ),
|
||||
'info_taxonomies_tab_trash' => __( 'Taxonomies that were sent to trash.', 'tainacan' ),
|
||||
|
||||
'info_error_invalid_date' => __( 'Invalid date', 'tainacan' ),
|
||||
'info_search_results' => __( 'Search Results', 'tainacan' ),
|
||||
'info_search_criteria' => __( 'Search Criteria', 'tainacan' ),
|
||||
'info_name_is_required' => __( 'Name is required.', 'tainacan' ),
|
||||
'info_no_collection_created' => __( 'No collection was created in this repository.', 'tainacan' ),
|
||||
'info_no_%s_publish' => __( 'No public %s found.', 'tainacan' ),
|
||||
'info_no_%s_private' => __( 'No private %s found.', 'tainacan' ),
|
||||
'info_no_%s_draft' => __( 'No draft %s found.', 'tainacan' ),
|
||||
'info_no_%s_trash' => __( 'No %s found on trash.', 'tainacan' ),
|
||||
|
||||
'info_no_items_publish' => __( 'No public items found.', 'tainacan' ),
|
||||
'info_no_items_private' => __( 'No private items found.', 'tainacan' ),
|
||||
'info_no_items_draft' => __( 'No draft items found.', 'tainacan' ),
|
||||
'info_no_items_trash' => __( 'No items found on trash.', 'tainacan' ),
|
||||
|
||||
'info_no_collections_publish' => __( 'No public collections found.', 'tainacan' ),
|
||||
'info_no_collections_private' => __( 'No private collections found.', 'tainacan' ),
|
||||
'info_no_collections_draft' => __( 'No draft collections found.', 'tainacan' ),
|
||||
'info_no_collections_trash' => __( 'No collections found on trash.', 'tainacan' ),
|
||||
|
||||
'info_no_taxonomies_publish' => __( 'No public taxonomies found.', 'tainacan' ),
|
||||
'info_no_taxonomies_private' => __( 'No private taxonomies found.', 'tainacan' ),
|
||||
'info_no_taxonomies_draft' => __( 'No draft taxonomies found.', 'tainacan' ),
|
||||
'info_no_taxonomies_trash' => __( 'No taxonomies found on trash.', 'tainacan' ),
|
||||
|
||||
'info_no_taxonomy_created' => __( 'No taxonomy was created in this repository.', 'tainacan' ),
|
||||
'info_no_terms_created_on_taxonomy' => __( 'No term was created for this taxonomy.', 'tainacan' ),
|
||||
'info_no_terms_found' => __( 'No term was found here', 'tainacan' ),
|
||||
|
|
|
@ -399,7 +399,7 @@
|
|||
position: relative;
|
||||
display: inline-block;
|
||||
margin: 12px;
|
||||
min-height: 54px;
|
||||
min-height: 24px;
|
||||
min-width: 22%;
|
||||
width: 22%; }
|
||||
.wp-block-tainacan-facets-list ul.facets-list.facets-layout-list li.facet-list-item a,
|
||||
|
|
|
@ -32,7 +32,7 @@ class Date extends Filter_Type {
|
|||
<div class="dropdown-menu" style="display: none;">
|
||||
<div role="list" class="dropdown-content">
|
||||
<a class="dropdown-item is-active">= ' . __('Equal', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">≠ '. __('Not qual', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">≠ '. __('Not equal', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">> '. __('After', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">≥ '. __('After (inclusive)', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">< '. __('Before', 'tainacan') .'</a>
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
<b-select
|
||||
name="step_options"
|
||||
v-model="step"
|
||||
@input="onUpdateStep"
|
||||
:placeholder="$i18n.get('instruction_select_step_options_to_show')">
|
||||
@input="onUpdateStep">
|
||||
<option value="0.001">0.001</option>
|
||||
<option value="0.01">0.01</option>
|
||||
<option value="0.1">0.1</option>
|
||||
|
|
|
@ -36,7 +36,7 @@ class Numeric extends Filter_Type {
|
|||
<div class="dropdown-menu" style="display: none;">
|
||||
<div role="list" class="dropdown-content">
|
||||
<a class="dropdown-item is-active">= ' . __('Equal', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">≠ '. __('Not qual', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">≠ '. __('Not equal', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">> '. __('Greater than', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">≥ '. __('Greater than or equal to', 'tainacan') .'</a>
|
||||
<a class="dropdown-item">< '. __('Less than', 'tainacan') .'</a>
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
:disabled="disabled"
|
||||
:class="{'has-content': inputValue !== undefined && inputValue !== ''}"
|
||||
:id="id"
|
||||
lang="en"
|
||||
type="number"
|
||||
:value="inputValue"
|
||||
step="0.01"
|
||||
|
|
|
@ -43,8 +43,8 @@
|
|||
v-for="facet in Number(maxFacetsNumber)"
|
||||
class="facet-list-item skeleton"
|
||||
:style="{
|
||||
marginBottom: layout == 'grid' ? (showName ? gridMargin + 12 : gridMargin) + 'px' : '',
|
||||
height: layout == 'grid' ? '230px' : '54px'
|
||||
marginBottom: layout == 'grid' && ((metadatumType == 'Relationship' || metadatumType == 'Taxonomy') && showImage) ? (showName ? gridMargin + 12 : gridMargin) + 'px' : '',
|
||||
height: getSkeletonHeight()
|
||||
}" />
|
||||
</ul>
|
||||
<div v-else>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<div
|
||||
v-else
|
||||
class="spinner-container">
|
||||
{{ facets.length > 0 ? (offset > 0 ? $root.__('No more facets found.', 'tainacan') : '') : $root.__('No facets found.', 'tainacan') }}
|
||||
{{ facets.length > 0 ? '' : $root.__('Nothing found.', 'tainacan') }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -257,6 +257,21 @@ export default {
|
|||
this.isLoading = false;
|
||||
// console.log(error);
|
||||
});
|
||||
},
|
||||
getSkeletonHeight() {
|
||||
switch(this.layout) {
|
||||
case 'grid':
|
||||
if ((this.metadatumType == 'Relationship' || this.metadatumType == 'Taxonomy') && this.showImage)
|
||||
return '230px';
|
||||
else
|
||||
return '24px'
|
||||
case 'list':
|
||||
if ((this.metadatumType == 'Relationship' || this.metadatumType == 'Taxonomy') && this.showImage)
|
||||
return '54px';
|
||||
else
|
||||
return '24px'
|
||||
default: return '54px';
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
|
|
@ -319,7 +319,7 @@
|
|||
position: relative;
|
||||
display: inline-block;
|
||||
margin: 12px;
|
||||
min-height: 54px;
|
||||
min-height: 24px;
|
||||
min-width: 22%;
|
||||
width: 22%;
|
||||
|
||||
|
|
|
@ -933,7 +933,15 @@ abstract class Importer {
|
|||
|
||||
$name = $properties[0];
|
||||
$type = $properties[1];
|
||||
|
||||
|
||||
$supported_types = \Tainacan\Repositories\Metadata::get_instance()->fetch_metadata_types('NAME');
|
||||
$supported_types = array_map('strtolower', $supported_types);
|
||||
|
||||
if ( ! \in_array($type, $supported_types) ) {
|
||||
$this->add_log( __('Unknown Metadata type "' . $type . '" for '.$name.'. Considering text type.', 'tainacan') );
|
||||
$type = 'text';
|
||||
}
|
||||
|
||||
$newMetadatum = new Entities\Metadatum();
|
||||
$newMetadatum->set_name($name);
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ Plugin Name: Tainacan
|
|||
Plugin URI: https://tainacan.org/
|
||||
Description: powerfull and flexible repository platform for WordPress. Manage and publish you digital collections as easily as publishing a post to your blog, while having all the tools of a professional respository platform.
|
||||
Author: Media Lab / UFG
|
||||
Version: 0.9.1
|
||||
Version: 0.10 RC1
|
||||
Text Domain: tainacan
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
const TAINACAN_VERSION = '0.9.1';
|
||||
const TAINACAN_VERSION = '0.10RC1';
|
||||
|
||||
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
||||
$TAINACAN_BASE_URL = plugins_url('', __FILE__);
|
||||
|
|
Loading…
Reference in New Issue