Merge branch 'hotfix/0.17.4'
This commit is contained in:
commit
4813c5d59e
|
@ -248,7 +248,7 @@ class REST_Background_Processes_Controller extends REST_Controller {
|
|||
if ( !isset($body['status']) || ($body['status'] != 'open' && $body['status'] != 'closed') ) {
|
||||
return new \WP_REST_Response([
|
||||
'error_message' => __('Status must be informed', 'tainacan' ),
|
||||
'session_id' => $session_id
|
||||
'session_id' => $id
|
||||
], 400);
|
||||
}
|
||||
|
||||
|
|
|
@ -108,12 +108,13 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
$this->table,
|
||||
[
|
||||
'data' => maybe_serialize($this->data),
|
||||
'progress_value' => 0,
|
||||
'user_id' => get_current_user_id(),
|
||||
'priority' => $priority,
|
||||
'action' => $this->action,
|
||||
'name' => $this->get_name(),
|
||||
'queued_on' => date('Y-m-d H:i:s'),
|
||||
'status' => 'waiting'
|
||||
'status' => 'waiting'
|
||||
]
|
||||
);
|
||||
$this->ID = $wpdb->insert_id;
|
||||
|
@ -126,7 +127,7 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
* Update queue
|
||||
*
|
||||
* @param string $key Key.
|
||||
* @param array $data Data.
|
||||
* @param array|object $batch Data.
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
|
@ -288,29 +289,24 @@ abstract class Background_Process extends \Tainacan_WP_Background_Process {
|
|||
$this->write_log($batch->key, ['New Request']);
|
||||
$newRequest = false;
|
||||
}
|
||||
|
||||
|
||||
register_shutdown_function(function() use($batch) {
|
||||
$error = error_get_last();
|
||||
|
||||
if ( is_null($error) ||
|
||||
! is_array($error) ||
|
||||
! isset($error['type']) ||
|
||||
$error['type'] !== 1 ) {
|
||||
if ( is_null($error) )
|
||||
return;
|
||||
|
||||
$error_str = "Fatal error: " . json_encode($error);
|
||||
if ( is_array($error) ) {
|
||||
$error_str = $error['message'] . ' - ' . $error['file'] . ' - Line: ' . $error['line'];
|
||||
}
|
||||
|
||||
|
||||
$this->debug('Shutdown with Fatal error captured');
|
||||
|
||||
$error_str = $error['message'] . ' - ' . $error['file'] . ' - Line: ' . $error['line'].
|
||||
|
||||
$this->debug($error_str);
|
||||
|
||||
$this->write_error_log($batch->key, ['Fatal Error: ' . $error_str]);
|
||||
$this->write_error_log($batch->key, ['Process aborted']);
|
||||
|
||||
$this->close( $batch->key, 'errored' );
|
||||
$this->debug('Batch closed due to captured error');
|
||||
|
||||
$this->unlock_process();
|
||||
});
|
||||
|
||||
$task = $batch;
|
||||
|
|
|
@ -492,7 +492,7 @@ class Metadatum extends Entity {
|
|||
if ( sizeof($meta_childrens) > 0 ) {
|
||||
foreach($meta_childrens as $meta_children) {
|
||||
if( $meta_children->is_required() ) {
|
||||
$this->add_error($this->get_id(), __("Compound metadata with multiple values can't have a children metadata set to as required", 'tainacan'));
|
||||
$this->add_error($this->get_id(), __("Compound metadata with multiple values can't have a children metadata set to as required", 'tainacan'));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,9 +9,9 @@ class Background_Importer extends Background_Process {
|
|||
*/
|
||||
protected $action = 'import';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
private $finish_status = 1;
|
||||
|
||||
public function __construct() {
|
||||
|
@ -20,11 +20,11 @@ class Background_Importer extends Background_Process {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param $status
|
||||
*/
|
||||
* @param $status
|
||||
*/
|
||||
private function set_finish_status( $status ){
|
||||
$this->finish_status = $status;
|
||||
}
|
||||
$this->finish_status = $status;
|
||||
}
|
||||
|
||||
function task($batch) {
|
||||
|
||||
|
@ -41,10 +41,10 @@ class Background_Importer extends Background_Process {
|
|||
$this->write_log($key, $object->get_log());
|
||||
$this->write_error_log($key, $object->get_error_log());
|
||||
|
||||
$batch->progress_label = $object->get_progress_label();
|
||||
$batch->progress_value = $object->get_progress_value();
|
||||
$batch->progress_label = $object->get_progress_label();
|
||||
$batch->progress_value = $object->get_progress_value();
|
||||
|
||||
$batch->data = $object->_to_Array(true);
|
||||
$batch->data = $object->_to_Array(true);
|
||||
|
||||
if (true === $object->get_abort()) {
|
||||
throw new \Exception('Process aborted by Importer');
|
||||
|
|
|
@ -169,6 +169,7 @@
|
|||
session_write_close();
|
||||
|
||||
if ( $this->is_process_running() ) {
|
||||
$this->debug('process already running. To die...');
|
||||
// Background process already running.
|
||||
wp_die();
|
||||
}
|
||||
|
@ -219,6 +220,7 @@
|
|||
* in a background process.
|
||||
*/
|
||||
protected function is_process_running() {
|
||||
$this->debug('Checking if process ' . $this->identifier . ' is running:');
|
||||
if ( get_site_transient( $this->identifier . '_process_lock' ) ) {
|
||||
// Process already running.
|
||||
$this->debug('process already running');
|
||||
|
@ -236,10 +238,10 @@
|
|||
* defined in the time_exceeded() method.
|
||||
*/
|
||||
protected function lock_process() {
|
||||
$this->debug('locking process');
|
||||
$this->debug('locking process: ' . $this->identifier);
|
||||
$this->start_time = time(); // Set start time of current process.
|
||||
|
||||
$lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : 60; // 1 minute
|
||||
$max_execution_time = ini_get('max_execution_time');
|
||||
$lock_duration = ( property_exists( $this, 'queue_lock_time' ) ) ? $this->queue_lock_time : ( empty($max_execution_time) ? 60 : $max_execution_time ); // 1 minute
|
||||
$lock_duration = apply_filters( $this->identifier . '_queue_lock_time', $lock_duration );
|
||||
|
||||
set_site_transient( $this->identifier . '_process_lock', microtime(), $lock_duration );
|
||||
|
|
|
@ -46,6 +46,13 @@ abstract class Repository {
|
|||
$this->use_logs = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get if creation of logs while inserting and updating entities are enable
|
||||
*/
|
||||
public function get_enabled_logs() {
|
||||
return $this->use_logs;
|
||||
}
|
||||
|
||||
/**
|
||||
* Register hooks
|
||||
*/
|
||||
|
|
|
@ -96,7 +96,7 @@ class Theme_Helper {
|
|||
'implements_skeleton' => true
|
||||
]);
|
||||
$this->register_view_mode('slideshow', [
|
||||
'label' => __('Slideshow', 'tainacan'),
|
||||
'label' => __('Slides', 'tainacan'),
|
||||
'dynamic_metadata' => false,
|
||||
'description' => 'A fullscreen slideshow view, that shows the item document instead of just thumbnails.',
|
||||
'icon' => '<span class="icon"><i class="tainacan-icon tainacan-icon-viewgallery tainacan-icon-1-25em"></i></span>',
|
||||
|
@ -390,10 +390,48 @@ class Theme_Helper {
|
|||
return "<div id='tainacan-item-submission-form' $props ></div>";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the div used by Vue to render the Items List with a powerful faceted search
|
||||
*
|
||||
* The items list bellong to a collection, to the whole repository or a taxonomy term, according to where
|
||||
* it is used on the loop, or to given params
|
||||
*
|
||||
* The following params are all optional for customizing the rendered vue component
|
||||
*
|
||||
* @param array $args {
|
||||
* Optional. Array of arguments.
|
||||
* @type string $collection_id Collection ID for a collection items list
|
||||
* @type string $term_id Term ID for a taxonomy term items list
|
||||
* @type bool $hide_filters Completely hide filter sidebar or modal
|
||||
* @type bool $hide_hide_filters_button Hides the button resonsible for collpasing filters sidebar on desktop
|
||||
* @type bool $hide_search Hides the complete search bar, including advanced search link
|
||||
* @type bool $hide_advanced_search Hides only the advanced search link
|
||||
* @type bool $hide_displayed_metadata_dropdown Hides the "Displayed metadata" dropdown even if the current view modes allows it
|
||||
* @type bool $hide_sorting_area Completely hides all sorting controls
|
||||
* @type bool $hide_sort_by_button Hides the button where user can select the metadata to sort by items (keeps the sort direction)
|
||||
* @type bool $hide_items_thumbnail Forces the thumbnail to be hiden on every listing. This setting also disables view modes that contain the 'requires-thumbnail' attr. By default is false or inherited from collection setting
|
||||
* @type bool $hide_exposers_button Hides the "View as..." button, a.k.a. Exposers modal
|
||||
* @type bool $hide_items_per_page_button Hides the button for selecting amount of items loaded per page
|
||||
* @type bool $hide_go_to_page_button Hides the button for skiping to a specific page
|
||||
* @type bool $hide_pagination_area Completely hides pagination controls
|
||||
* @type int $default_items_per_page Default number of items per page loaded
|
||||
* @type bool $show_filters_button_inside_search_control Display the "hide filters" button inside of the search control instead of floating
|
||||
* @type bool $start_with_filters_hidden Loads the filters list hidden from start
|
||||
* @type bool $filters_as_modal Display the filters as a modal instead of a collapsable region on desktop
|
||||
* @type bool $show_inline_view_mode_options Display view modes as inline icon buttons instead of the dropdown
|
||||
* @type bool $show_fullscreen_with_view_modes Lists fullscreen viewmodes alongside with other view modes istead of separatelly
|
||||
* @type string $default_view_mode The default view mode
|
||||
* @type bool $is_forced_view_mode Ignores user prefs to always render the choosen default view mode
|
||||
* @type string[] $enabled_view_modes The list os enable view modes to display
|
||||
* @return string The HTML div to be used for rendering the items list vue component
|
||||
*/
|
||||
public function search_shortcode($args) {
|
||||
|
||||
return $this->get_tainacan_items_list($args, true);
|
||||
}
|
||||
|
||||
public function get_tainacan_items_list($args, $force_enqueue = false) {
|
||||
$props = ' ';
|
||||
|
||||
|
||||
// Loads info related to view modes
|
||||
$view_modes = tainacan_get_the_view_modes();
|
||||
$default_view_mode = $view_modes['default_view_mode'];
|
||||
|
@ -413,20 +451,18 @@ class Theme_Helper {
|
|||
}
|
||||
|
||||
// If in a collection page
|
||||
$collection_id = tainacan_get_collection_id();
|
||||
if ($collection_id) {
|
||||
$props .= 'collection-id="' . $collection_id . '" ';
|
||||
$collection = new \Tainacan\Entities\Collection($collection_id);
|
||||
$collection = tainacan_get_collection($args);
|
||||
if ($collection) {
|
||||
$props .= 'collection-id="' . $collection->get_id() . '" ';
|
||||
$default_view_mode = $collection->get_default_view_mode();
|
||||
$enabled_view_modes = $collection->get_enabled_view_modes();
|
||||
|
||||
|
||||
// Gets hideItemsThumbnail info from collection setting
|
||||
$args['hide-items-thumbnail'] = $collection->get_hide_items_thumbnail_on_lists() == 'yes' ? true : false;
|
||||
}
|
||||
|
||||
// If in a tainacan taxonomy
|
||||
$term = tainacan_get_term();
|
||||
$term = tainacan_get_term($args);
|
||||
if ($term) {
|
||||
$props .= 'term-id="' . $term->term_id . '" ';
|
||||
$props .= 'taxonomy="' . $term->taxonomy . '" ';
|
||||
|
@ -442,10 +478,9 @@ class Theme_Helper {
|
|||
}
|
||||
}
|
||||
|
||||
$this->enqueue_scripts(true);
|
||||
$this->enqueue_scripts($force_enqueue);
|
||||
|
||||
return "<div id='tainacan-items-page' $props ></div>";
|
||||
|
||||
}
|
||||
|
||||
function get_items_list_slug() {
|
||||
|
|
|
@ -155,16 +155,16 @@ function tainacan_get_collection_id() {
|
|||
* @uses tainacan_get_collection_id()
|
||||
* @return \Tainacan\Entities\Collection | false
|
||||
*/
|
||||
function tainacan_get_collection() {
|
||||
$collection_id = tainacan_get_collection_id();
|
||||
function tainacan_get_collection($args = []) {
|
||||
$collection_id = isset($args['collection_id']) ? $args['collection_id'] : tainacan_get_collection_id();
|
||||
if ( $collection_id ) {
|
||||
$TainacanCollections = Repositories\Collections::get_instance();
|
||||
$collection = $TainacanCollections->fetch($collection_id);
|
||||
if ( $collection instanceof Entities\Collection ) {
|
||||
return $collection;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -268,9 +268,8 @@ function tainacan_get_the_view_modes() {
|
|||
$enabled_view_modes = apply_filters( 'tainacan-enabled-view-modes-for-themes', $registered_view_modes_slugs );
|
||||
|
||||
// If in a collection page
|
||||
$collection_id = tainacan_get_collection_id();
|
||||
if ($collection_id) {
|
||||
$collection = new \Tainacan\Entities\Collection($collection_id);
|
||||
$collection = tainacan_get_collection();
|
||||
if ($collection) {
|
||||
$default_view_mode = $collection->get_default_view_mode();
|
||||
$enabled_view_modes = $collection->get_enabled_view_modes();
|
||||
}
|
||||
|
@ -303,89 +302,40 @@ function tainacan_is_view_mode_enabled($view_mode_slug) {
|
|||
* Outputs the div used by Vue to render the Items List with a powerful faceted search
|
||||
*
|
||||
* The items list bellong to a collection, to the whole repository or a taxonomy term, according to where
|
||||
* it is used on the loop
|
||||
* it is used on the loop, or to given params
|
||||
*
|
||||
* The following params all optional for customizing the rendered vue component
|
||||
* The following params are all optional for customizing the rendered vue component
|
||||
*
|
||||
* @param array $args {
|
||||
* Optional. Array of arguments.
|
||||
*
|
||||
* @type bool $hide_filters Completely hide filter sidebar or modal
|
||||
* @type bool $hide_hide_filters_button Hides the button resonsible for collpasing filters sidebar on desktop
|
||||
* @type bool $hide_search Hides the complete search bar, including advanced search link
|
||||
* @type bool $hide_advanced_search Hides only the advanced search link
|
||||
* @type bool $hide_displayed_metadata_dropdown Hides the "Displayed metadata" dropdown even if the current view modes allows it
|
||||
* @type bool $hide_sorting_area Completely hides all sorting controls
|
||||
* @type bool $hide_sort_by_button Hides the button where user can select the metadata to sort by items (keeps the sort direction)
|
||||
* @type bool $hide_items_thumbnail Forces the thumbnail to be hiden on every listing. This setting also disables view modes that contain the 'requires-thumbnail' attr. By default is false or inherited from collection setting
|
||||
* @type bool $hide_exposers_button Hides the "View as..." button, a.k.a. Exposers modal
|
||||
* @type bool $hide_items_per_page_button Hides the button for selecting amount of items loaded per page
|
||||
* @type bool $hide_go_to_page_button Hides the button for skiping to a specific page
|
||||
* @type bool $hide_pagination_area Completely hides pagination controls
|
||||
* @type int $default_items_per_page Default number of items per page loaded
|
||||
* @type bool $show_filters_button_inside_search_control Display the "hide filters" button inside of the search control instead of floating
|
||||
* @type bool $start_with_filters_hidden Loads the filters list hidden from start
|
||||
* @type bool $filters_as_modal Display the filters as a modal instead of a collapsable region on desktop
|
||||
* @type bool $show_inline_view_mode_options Display view modes as inline icon buttons instead of the dropdown
|
||||
* @type bool $show_fullscreen_with_view_modes Lists fullscreen viewmodes alongside with other view modes istead of separatelly
|
||||
* @type string $default_view_mode The default view mode
|
||||
* @type bool $is_forced_view_mode Ignores user prefs to always render the choosen default view mode
|
||||
* @type string[] $enabled_view_modes The list os enable view modes to display
|
||||
* @type string $collection_id Collection ID for a collection items list
|
||||
* @type string $term_id Term ID for a taxonomy term items list
|
||||
* @type bool $hide_filters Completely hide filter sidebar or modal
|
||||
* @type bool $hide_hide_filters_button Hides the button resonsible for collpasing filters sidebar on desktop
|
||||
* @type bool $hide_search Hides the complete search bar, including advanced search link
|
||||
* @type bool $hide_advanced_search Hides only the advanced search link
|
||||
* @type bool $hide_displayed_metadata_dropdown Hides the "Displayed metadata" dropdown even if the current view modes allows it
|
||||
* @type bool $hide_sorting_area Completely hides all sorting controls
|
||||
* @type bool $hide_sort_by_button Hides the button where user can select the metadata to sort by items (keeps the sort direction)
|
||||
* @type bool $hide_items_thumbnail Forces the thumbnail to be hiden on every listing. This setting also disables view modes that contain the 'requires-thumbnail' attr. By default is false or inherited from collection setting
|
||||
* @type bool $hide_exposers_button Hides the "View as..." button, a.k.a. Exposers modal
|
||||
* @type bool $hide_items_per_page_button Hides the button for selecting amount of items loaded per page
|
||||
* @type bool $hide_go_to_page_button Hides the button for skiping to a specific page
|
||||
* @type bool $hide_pagination_area Completely hides pagination controls
|
||||
* @type int $default_items_per_page Default number of items per page loaded
|
||||
* @type bool $show_filters_button_inside_search_control Display the "hide filters" button inside of the search control instead of floating
|
||||
* @type bool $start_with_filters_hidden Loads the filters list hidden from start
|
||||
* @type bool $filters_as_modal Display the filters as a modal instead of a collapsable region on desktop
|
||||
* @type bool $show_inline_view_mode_options Display view modes as inline icon buttons instead of the dropdown
|
||||
* @type bool $show_fullscreen_with_view_modes Lists fullscreen viewmodes alongside with other view modes istead of separatelly
|
||||
* @type string $default_view_mode The default view mode
|
||||
* @type bool $is_forced_view_mode Ignores user prefs to always render the choosen default view mode
|
||||
* @type string[] $enabled_view_modes The list os enable view modes to display
|
||||
* @return string The HTML div to be used for rendering the items list vue component
|
||||
*/
|
||||
function tainacan_the_faceted_search($args = array()) {
|
||||
|
||||
$props = ' ';
|
||||
|
||||
// Loads info related to view modes
|
||||
$view_modes = tainacan_get_the_view_modes();
|
||||
$default_view_mode = $view_modes['default_view_mode'];
|
||||
$enabled_view_modes = $view_modes['enabled_view_modes'];
|
||||
|
||||
if( isset($args['default_view_mode']) ) {
|
||||
$default_view_mode = $args['default_view_mode'];
|
||||
unset($args['default_view_mode']);
|
||||
}
|
||||
|
||||
if( isset($args['enabled_view_modes']) ) {
|
||||
$enabled_view_modes = $args['enabled_view_modes'];
|
||||
if ( !in_array($default_view_mode, $enabled_view_modes) ) {
|
||||
$default_view_mode = $enabled_view_modes[0];
|
||||
}
|
||||
unset($args['enabled_view_modes']);
|
||||
}
|
||||
|
||||
// If in a collection page
|
||||
$collection_id = tainacan_get_collection_id();
|
||||
if ($collection_id) {
|
||||
$props .= 'collection-id="' . $collection_id . '" ';
|
||||
$collection = new \Tainacan\Entities\Collection($collection_id);
|
||||
$default_view_mode = $collection->get_default_view_mode();
|
||||
$enabled_view_modes = $collection->get_enabled_view_modes();
|
||||
|
||||
// Gets hideItemsThumbnail info from collection setting
|
||||
$args['hide-items-thumbnail'] = $collection->get_hide_items_thumbnail_on_lists() == 'yes' ? true : false;
|
||||
}
|
||||
|
||||
// If in a tainacan taxonomy
|
||||
$term = tainacan_get_term();
|
||||
if ($term) {
|
||||
$props .= 'term-id="' . $term->term_id . '" ';
|
||||
$props .= 'taxonomy="' . $term->taxonomy . '" ';
|
||||
}
|
||||
|
||||
$props .= 'default-view-mode="' . $default_view_mode . '" ';
|
||||
$props .= 'enabled-view-modes="' . implode(',', $enabled_view_modes) . '" ';
|
||||
|
||||
// Passes arguments to custom props
|
||||
foreach ($args as $key => $value) {
|
||||
if ($value == true || $value == 'true') {
|
||||
$props .= str_replace('_', '-', $key) . '="' . $value . '" ';
|
||||
}
|
||||
}
|
||||
|
||||
echo "<main id='tainacan-items-page' $props ></main>";
|
||||
|
||||
$theme_helper = \Tainacan\Theme_Helper::get_instance();
|
||||
echo $theme_helper->get_tainacan_items_list($args);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -393,7 +343,15 @@ function tainacan_the_faceted_search($args = array()) {
|
|||
*
|
||||
* @return false|\WP_Term
|
||||
*/
|
||||
function tainacan_get_term() {
|
||||
function tainacan_get_term($args = []) {
|
||||
if ( isset( $args['term_id'] ) ) {
|
||||
$term = get_term($args['term_id']);
|
||||
|
||||
if ( $term instanceof \WP_Error ) {
|
||||
return false;
|
||||
}
|
||||
return $term;
|
||||
}
|
||||
if ( is_tax() ) {
|
||||
$term = get_queried_object();
|
||||
$theme_helper = \Tainacan\Theme_Helper::get_instance();
|
||||
|
|
|
@ -4,7 +4,7 @@ Tags: museums, libraries, archives, GLAM, collections, repository
|
|||
Requires at least: 4.8
|
||||
Tested up to: 5.6
|
||||
Requires PHP: 5.6
|
||||
Stable tag: 0.17.3
|
||||
Stable tag: 0.17.4
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
|
|
|
@ -4,13 +4,13 @@ Plugin Name: Tainacan
|
|||
Plugin URI: https://tainacan.org/
|
||||
Description: Open source, 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: Tainacan.org
|
||||
Version: 0.17.3
|
||||
Version: 0.17.4
|
||||
Text Domain: tainacan
|
||||
License: GPLv2 or later
|
||||
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||
*/
|
||||
|
||||
const TAINACAN_VERSION = '0.17.3';
|
||||
const TAINACAN_VERSION = '0.17.4';
|
||||
|
||||
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
||||
$TAINACAN_BASE_URL = plugins_url('', __FILE__);
|
||||
|
|
|
@ -25,6 +25,7 @@ class MetadataTypeControlHelper {
|
|||
static function update_control_metadatum( $item ) {
|
||||
if ( $item instanceof \Tainacan\Entities\Item ) {
|
||||
$item_metadata_repositories = \Tainacan\Repositories\Item_Metadata::get_instance();
|
||||
$enabled_logs = $item_metadata_repositories->get_enabled_logs();
|
||||
$item_metadata_repositories->disable_logs();
|
||||
$collection = $item->get_collection();
|
||||
$args = [
|
||||
|
@ -68,7 +69,7 @@ class MetadataTypeControlHelper {
|
|||
$errors[] = $update_item_metadatum->get_errors();
|
||||
}
|
||||
}
|
||||
$item_metadata_repositories->enable_logs();
|
||||
if($enabled_logs) $item_metadata_repositories->enable_logs();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -569,8 +569,8 @@ registerBlockType('tainacan/faceted-search', {
|
|||
}
|
||||
/>
|
||||
<ToggleControl
|
||||
label={__('Show Fullscreen with other View Modes', 'tainacan')}
|
||||
help={ showFullscreenWithViewModes ? __('Toggle to show Fullscreen view mode alongside with other View Modes', 'tainacan') : __('Keep Fullscreen view mode separated from other View Mode Options', 'tainacan')}
|
||||
label={__('Show fullscreen Slides with other View Modes', 'tainacan')}
|
||||
help={ showFullscreenWithViewModes ? __('Toggle to show fullscreen Slides view mode alongside with other View Modes', 'tainacan') : __('Keep fullscreen Slides view mode separated from other View Mode Options', 'tainacan')}
|
||||
checked={ showFullscreenWithViewModes }
|
||||
onChange={ ( isChecked ) => {
|
||||
showFullscreenWithViewModes = isChecked;
|
||||
|
|
|
@ -20,12 +20,14 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'repository' => __( 'Repository', 'tainacan' ),
|
||||
'collections' => __( 'Collections', 'tainacan' ),
|
||||
'items' => __( 'Items', 'tainacan' ),
|
||||
/* translators: Plural, a list of metadata */
|
||||
'metadata' => __( 'Metadata', 'tainacan' ),
|
||||
'filters' => __( 'Filters', 'tainacan' ),
|
||||
'taxonomies' => __( 'Taxonomies', 'tainacan' ),
|
||||
'activities' => __( 'Activities', 'tainacan' ),
|
||||
'collection' => __( 'Collection', 'tainacan' ),
|
||||
'item' => __( 'Item', 'tainacan' ),
|
||||
/* translators: The singular unit of metadata */
|
||||
'metadatum' => __( 'Metadatum', 'tainacan' ),
|
||||
'filter' => __( 'Filter', 'tainacan' ),
|
||||
'taxonomy' => __( 'Taxonomy', 'tainacan' ),
|
||||
|
@ -59,7 +61,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'exit' => __( 'Exit', 'tainacan' ),
|
||||
'see' => __( 'View', 'tainacan' ),
|
||||
'search' => __( 'Search', 'tainacan' ),
|
||||
'advanced_search' => __( 'Advanced Search', 'tainacan' ),
|
||||
'advanced_search' => __( 'Advanced search', 'tainacan' ),
|
||||
'continue' => __( 'Continue', 'tainacan' ),
|
||||
'approve_item' => __( 'Approve', 'tainacan' ),
|
||||
'not_approve_item' => __( 'Not approve', 'tainacan' ),
|
||||
|
@ -67,7 +69,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'add_items_bulk' => __( 'Bulk add items', 'tainacan' ),
|
||||
'add_items_external_source' => __( 'Add items from an external source', 'tainacan' ),
|
||||
'new_mapped_item' => __( 'New mapped collection', 'tainacan' ),
|
||||
'new_blank_collection' => __( 'New Blank Collection', 'tainacan' ),
|
||||
'new_blank_collection' => __( 'New blank collection', 'tainacan' ),
|
||||
'split' => __( 'Split', 'tainacan' ),
|
||||
'unified' => __( 'Unified', 'tainacan' ),
|
||||
'add_another_search_criterion' => __( 'Add another search criterion', 'tainacan' ),
|
||||
|
@ -97,14 +99,18 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'comments_status_closed' => __( 'Closed', 'tainacan' ),
|
||||
|
||||
// Wordpress Status
|
||||
/* translators: The noun for the public/published status */
|
||||
'status_publish' => __( 'Publish', 'tainacan' ),
|
||||
/* translators: Also the noun for the public/published status */
|
||||
'status_public' => __( 'Public', 'tainacan' ),
|
||||
/* translators: The noun for the draft status, not the verb */
|
||||
'status_draft' => __( 'Draft', 'tainacan' ),
|
||||
'status_private' => __( 'Private', 'tainacan' ),
|
||||
/* translators: The noun for the trash status, not the verb */
|
||||
'status_trash' => __( 'Trash', 'tainacan' ),
|
||||
'status_auto-draft' => __( 'Automatic Draft', 'tainacan' ),
|
||||
'publish_visibility' => __( 'Public (Visible to everyone)', 'tainacan' ),
|
||||
'private_visibility' => __( 'Private (Visible only for editors)', 'tainacan' ),
|
||||
'status_auto-draft' => __( 'Automatic draft', 'tainacan' ),
|
||||
'publish_visibility' => __( 'Public (visible to everyone)', 'tainacan' ),
|
||||
'private_visibility' => __( 'Private (visible only for editors)', 'tainacan' ),
|
||||
|
||||
// Page Titles (used mainly on Router)
|
||||
'title_repository_collections_page' => __( 'Repository Collections', 'tainacan' ),
|
||||
|
@ -145,10 +151,11 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'title_exporter_page' => __( 'Exporter', 'tainacan'),
|
||||
'title_collection_capabilities' => __( 'Capabilities Related to the Collection', 'tainacan'),
|
||||
'title_repository_capabilities' => __( 'Capabilities Related to the Repository', 'tainacan'),
|
||||
'title_gallery-help-modal' => __( 'Welcome to the gallery view mode', 'tainacan'),
|
||||
'title_slides-help-modal' => __( 'Welcome to the slides view mode', 'tainacan'),
|
||||
|
||||
// Labels (used mainly on Aria Labels and Inputs)
|
||||
'label' => __( 'Label', 'tainacan' ),
|
||||
/* translators: The verb to clear */
|
||||
'label_clean' => __( 'Clear', 'tainacan' ),
|
||||
'label_none' => __( 'None', 'tainacan' ),
|
||||
'label_clear_filters' => __( 'Clear filters', 'tainacan' ),
|
||||
|
@ -170,8 +177,8 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_image' => __( 'Image', 'tainacan' ),
|
||||
'label_thumbnail' => __( 'Thumbnail', 'tainacan' ),
|
||||
'label_thumbnail_alt' => __( 'Thumbnail alternative text', 'tainacan' ),
|
||||
'label_empty_thumbnail' => __( 'Empty Thumbnail', 'tainacan' ),
|
||||
'label_empty_term_image' => __( 'Empty Term Image', 'tainacan' ),
|
||||
'label_empty_thumbnail' => __( 'Empty thumbnail', 'tainacan' ),
|
||||
'label_empty_term_image' => __( 'Empty term image', 'tainacan' ),
|
||||
'label_parent_collection' => __( 'Parent collection', 'tainacan' ),
|
||||
'label_no_parent_collection' => __( 'No parent collection', 'tainacan' ),
|
||||
'label_button_view' => __( 'Button View', 'tainacan' ),
|
||||
|
@ -192,9 +199,11 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_attachments_per_page' => __( 'Attachments per Page:', 'tainacan' ),
|
||||
'label_processes_per_page' => __( 'Processes per Page:', 'tainacan' ),
|
||||
'label_go_to_page' => __( 'Go to Page:', 'tainacan' ),
|
||||
/* translators: 'Active' here refers to a mode that the metadata are, not a verb or action */
|
||||
'label_active_metadata' => __( 'Active Metadata', 'tainacan' ),
|
||||
'label_available_metadata' => __( 'Available Metadata', 'tainacan' ),
|
||||
'label_available_metadata_types' => __( 'Available Metadata Types', 'tainacan' ),
|
||||
/* translators: 'Active' here refers to a mode that the filters are, not a verb or action */
|
||||
'label_active_filters' => __( 'Active Filters', 'tainacan' ),
|
||||
'label_filter_type' => __( 'Filter Type', 'tainacan' ),
|
||||
'label_available_filters' => __( 'Available Filters', 'tainacan' ),
|
||||
|
@ -208,7 +217,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_yes' => __( 'Yes', 'tainacan' ),
|
||||
'label_no' => __( 'No', 'tainacan' ),
|
||||
'label_approved' => __( 'Approved', 'tainacan' ),
|
||||
'label_collection_related' => __( 'Collection Related', 'tainacan' ),
|
||||
'label_collection_related' => __( 'Collection related', 'tainacan' ),
|
||||
'label_metadata_for_search' => __( 'Metadata for search', 'tainacan' ),
|
||||
'label_allow_repeated_items' => __( 'Allow repeated items', 'tainacan' ),
|
||||
'label_select_taxonomy' => __( 'Select taxonomy', 'tainacan' ),
|
||||
|
@ -236,10 +245,15 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_no_parent_term' => __( 'No parent term', 'tainacan' ),
|
||||
'label_term_without_name' => __( 'Term without name', 'tainacan' ),
|
||||
'label_inherited' => __( 'Inherited', 'tainacan' ),
|
||||
/* translators: 'Core' as in 'main' - the most important and default title */
|
||||
'label_core_title' => __( 'Core Title', 'tainacan' ),
|
||||
/* translators: 'Core' as in 'main' - the most important and default description */
|
||||
'label_core_description' => __( 'Core Description', 'tainacan' ),
|
||||
/* translators: noun, not the verb. This comes after options to be sorted by */
|
||||
'label_sorting' => __( 'Sorting', 'tainacan' ),
|
||||
/* translators: noun, not the verb. This comes after options 'ASC' and 'DESC' */
|
||||
'label_sorting_direction' => __( 'Sorting direction', 'tainacan' ),
|
||||
/* translators: shorter version of the 'sorting' noun label */
|
||||
'label_sort' => __( 'Sort', 'tainacan' ),
|
||||
'label_activity_date' => __( 'Activity date', 'tainacan' ),
|
||||
'label_activity_title' => __( 'Activity', 'tainacan' ),
|
||||
|
@ -250,22 +264,26 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_allow_comments' => __( 'Allow comments', 'tainacan' ),
|
||||
'label_comments' => __( 'Comments', 'tainacan' ),
|
||||
'label_default_displayed_metadata' => __( 'Default Displayed Metadata', 'tainacan' ),
|
||||
'label_display' => __( 'Display on Listing', 'tainacan' ),
|
||||
'label_display' => __( 'Display on listing', 'tainacan' ),
|
||||
'label_display_default' => __( 'Display by default', 'tainacan' ),
|
||||
'label_display_never' => __( 'Never displayed', 'tainacan' ),
|
||||
'label_not_display' => __( 'Not display by default', 'tainacan' ),
|
||||
'label_not_display' => __( 'Do not display by default', 'tainacan' ),
|
||||
'label_no_terms_selected' => __( 'No terms selected', 'tainacan' ),
|
||||
'label_attach_to_item' => __( 'Attach to item', 'tainacan' ),
|
||||
/* translators: Document is the main content of the Item. It can be a file, a url link or a text */
|
||||
'label_document' => __( 'Document', 'tainacan' ),
|
||||
'label_document_empty' => __( 'Empty document', 'tainacan' ),
|
||||
'label_file' => __( 'File', 'tainacan' ),
|
||||
'label_text' => __( 'Text', 'tainacan' ),
|
||||
'label_url' => __( 'URL', 'tainacan' ),
|
||||
'label_select_file' => __( 'Select File', 'tainacan' ),
|
||||
'label_select_file' => __( 'Select file', 'tainacan' ),
|
||||
'label_selected_file' => __( 'Selected file', 'tainacan' ),
|
||||
/* translators: Label for collapsable, accordeon-like elements */
|
||||
'label_expand_all' => __( 'Expand all', 'tainacan' ),
|
||||
/* translators: Label for collapsable, accordeon-like elements */
|
||||
'label_collapse_all' => __( 'Collapse all', 'tainacan' ),
|
||||
'label_view_term' => __( 'View Term', 'tainacan' ),
|
||||
/* translators: 'Published' here refers to the sum of public and private items, not including draft or trashed ones. The are visible to those with permission */
|
||||
'label_all_published_items' => __( 'All published items', 'tainacan' ),
|
||||
'label_all_collections' => __( 'All collections', 'tainacan' ),
|
||||
'label_all_taxonomies' => __( 'All taxonomies', 'tainacan' ),
|
||||
|
@ -285,9 +303,11 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_select_all_processes_page' => __( 'Select all processes on page', 'tainacan' ),
|
||||
'label_edit_attachments' => __( 'Edit attachments', 'tainacan' ),
|
||||
'label_blank_collection' => __( 'Blank collection', 'tainacan' ),
|
||||
/* translators: the metadata scheme https://dublincore.org/ */
|
||||
'label_dublin_core' => __( 'Dublin Core', 'tainacan' ),
|
||||
'label_created_by' => __( 'Created by', 'tainacan' ),
|
||||
'label_apply_changes' => __( 'Apply changes', 'tainacan' ),
|
||||
/* translators: view here is the noun, not the verb */
|
||||
'label_view_mode' => __( 'View mode', 'tainacan' ),
|
||||
'label_default_view_mode' => __( 'Default view mode', 'tainacan' ),
|
||||
'label_enabled_view_modes' => __( 'Enabled view modes', 'tainacan' ),
|
||||
|
@ -295,26 +315,35 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_warning' => __( 'Warning', 'tainacan' ),
|
||||
'label_error' => __( 'Error', 'tainacan' ),
|
||||
'label_thumbnails' => __( 'Thumbnails', 'tainacan' ),
|
||||
/* translators: The 'thumbnails' view mode type, previously named 'Grid' */
|
||||
'label_grid' => __( 'Thumbnails', 'tainacan' ),
|
||||
'label_table' => __( 'Table', 'tainacan' ),
|
||||
'label_cards' => __( 'Cards', 'tainacan' ),
|
||||
/* translators: The 'records' view mode, in the sense of a catalog file */
|
||||
'label_records' => __( 'Records', 'tainacan' ),
|
||||
'label_masonry' => __( 'Masonry', 'tainacan' ),
|
||||
/* translators: The 'list' view mode, an horizontal, full width version of the 'records' view mode */
|
||||
'label_list' => __( 'List', 'tainacan' ),
|
||||
/* translators: label for the view modes dropdown, for example: Visualization - table */
|
||||
'label_visualization' => __( 'Visualization', 'tainacan' ),
|
||||
/* translators: This should be a short term for `visualization` such as `view on` referring to the view modes dropdown */
|
||||
/* translators: This should be a short term for 'visualization' such as 'View on - table' referring to the view modes dropdown */
|
||||
'label_view_on' => __( 'View on', 'tainacan' ),
|
||||
'label_available_importers' => __( 'Available Importers', 'tainacan' ),
|
||||
'label_target_collection' => __( 'Target Collection', 'tainacan' ),
|
||||
/* translators: The collection into which the contents of a file will be imported */
|
||||
'label_source_file' => __( 'Source file', 'tainacan' ),
|
||||
/* translators: The file from which the contents will be imported to a collection */
|
||||
'label_url_source_link' => __( 'URL Source link', 'tainacan' ),
|
||||
/* translators: The link to the file from which the contents will be imported to a collection */
|
||||
'label_metadata_mapping' => __( 'Metadata mapping', 'tainacan' ),
|
||||
'label_select_metadatum' => __( 'Select metadatum', 'tainacan' ),
|
||||
'label_create_metadatum' => __( 'Create metadatum', 'tainacan' ),
|
||||
'label_create_repository_metadata' => __( 'Create repository metadata', 'tainacan' ),
|
||||
'label_create_repository_metadata' => __( 'Create repository metadata', 'tainacan' ),
|
||||
'label_select_metadatum_type' => __( 'Select a metadatum type', 'tainacan' ),
|
||||
'label_add_more_metadata' => __( 'Add more metadata', 'tainacan' ),
|
||||
/* translators: Header of the column where the metadata columns from file are in the Mapping Metadata Importer screen */
|
||||
'label_from_source_collection' => __( 'From source file', 'tainacan' ),
|
||||
/* translators: Header of the column where the existing collection metadata are in the Mapping Metadata Importer screen */
|
||||
'label_to_target_collection' => __( 'To target collection', 'tainacan' ),
|
||||
'label_add_value' => __( 'Add value', 'tainacan' ),
|
||||
'label_remove_value' => __( 'Remove value', 'tainacan' ),
|
||||
|
@ -332,10 +361,12 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
/* translators: The status 'publish' not the verb 'to publish' */
|
||||
'label_publish' => _x( 'Publish', 'noun', 'tainacan' ),
|
||||
'label_update' => __( 'Update', 'tainacan' ),
|
||||
'label_mapper_metadata' => __( 'Mapper Metadata', 'tainacan' ),
|
||||
'label_add_more_mapper_metadata' => __( 'Add more mapper\'s metadata', 'tainacan' ),
|
||||
'label_mapper_metadata' => __( 'Metadata Mapper', 'tainacan' ),
|
||||
'label_add_more_mapper_metadata' => __( 'Add more metadata mappers', 'tainacan' ),
|
||||
/* translators: 'Exposer' here is not the same as 'Exporter'. These are links where you can see the items in different file formats such as CSV,JSON, etc, but not a download of a zip file. */
|
||||
'label_exposer_urls' => __( 'Exposer URLs' ),
|
||||
'label_exposer_mapper_values' => __( 'values only, no metadata scheme' ),
|
||||
/* translators: 'Exposer' here is not the same as 'Exporter'. These are links where you can see the items in different file formats such as CSV,JSON, etc, but not a download of a zip file. */
|
||||
'label_exposer' => __( 'exposer' ),
|
||||
'label_mapper' => __( 'mapper' ),
|
||||
'label_no_details_of_process' => __( 'There are no details about this process', 'tainacan' ),
|
||||
|
@ -344,23 +375,23 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_progress' => __( 'Progress', 'tainacan' ),
|
||||
'label_process_completed' => __( 'Process completed', 'tainacan' ),
|
||||
'label_process_completed_with_errors' => __( 'Process completed with errors', 'tainacan' ),
|
||||
'label_process_cancelled' => __( 'Process cancelled by user', 'tainacan' ),
|
||||
'label_process_paused' => __( 'Process paused', 'tainacan' ),
|
||||
'label_process_waiting' => __( 'Process waiting', 'tainacan' ),
|
||||
'label_process_cancelled' => __( 'Process cancelled by user', 'tainacan' ),
|
||||
'label_process_paused' => __( 'Process paused', 'tainacan' ),
|
||||
'label_process_waiting' => __( 'Process waiting', 'tainacan' ),
|
||||
'label_stop_process' => __( 'Stop process', 'tainacan' ),
|
||||
'label_stop_process' => __( 'Stop process', 'tainacan' ),
|
||||
'label_process_failed' => __( 'Process failed', 'tainacan' ),
|
||||
'label_max_options_to_show' => __( 'Max options to show', 'tainacan' ),
|
||||
'label_unamed_process' => __( 'Unamed process', 'tainacan' ),
|
||||
'loading_processes' => __( 'Loading processes', 'tainacan' ),
|
||||
'loading_processes' => __( 'Loading processes', 'tainacan' ),
|
||||
'label_semantic_uri' => __( 'Semantic Uri', 'tainacan' ),
|
||||
'label_view_collection_on_website' => __( 'View collection on website', 'tainacan' ),
|
||||
'label_view_more' => __( 'View more', 'tainacan' ),
|
||||
'label_log_file' => __( 'Log file', 'tainacan' ),
|
||||
'label_error_log_file' => __( 'Error Log file', 'tainacan' ),
|
||||
'label_import_items' => __( 'Import items', 'tainacan' ),
|
||||
'label_hide_filters' => __( 'Hide filters menu', 'tainacan' ),
|
||||
'label_show_filters' => __( 'Show filters menu', 'tainacan' ),
|
||||
'label_hide_filters' => __( 'Hide filters panel', 'tainacan' ),
|
||||
'label_show_filters' => __( 'Show filters panel', 'tainacan' ),
|
||||
'label_select_all_items' => __( 'Select all items', 'tainacan' ),
|
||||
'label_select_all' => __( 'Select all', 'tainacan' ),
|
||||
'label_untrash_selected_items' => __( 'Restore from trash', 'tainacan' ),
|
||||
|
@ -378,11 +409,13 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_show_metadata' => __( 'Show metadata', 'tainacan' ),
|
||||
'label_all_terms' => __( 'All terms', 'tainacan' ),
|
||||
'label_selected_terms' => __( 'Selected terms', 'tainacan' ),
|
||||
'label_selected_term' => __( 'Selected term', 'tainacan' ),
|
||||
'label_selected_term' => __( 'Selected term', 'tainacan' ),
|
||||
'label_all_metadatum_values' => __( 'All metadatum values', 'tainacan' ),
|
||||
'label_selected_metadatum_values' => __( 'Selected metadatum values', 'tainacan' ),
|
||||
/* translators: 'n.' here comes from 'number' */
|
||||
'label_editing_item_number' => __( 'Editing item n.', 'tainacan' ),
|
||||
'label_sequence_editing_item' => __( 'Sequence editing: Item', 'tainacan' ),
|
||||
/* translators: The amount of files remaining to be processed */
|
||||
'label_%s_files_remaining' => __( '%s files remaining.', 'tainacan' ),
|
||||
'label_one_file_remaining' => __( 'One file remaining.', 'tainacan' ),
|
||||
'label_upload_file_prepare_items' => __( 'Uploading files and preparing items', 'tainacan' ),
|
||||
|
@ -393,7 +426,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_filters_from' => __( 'Filters from', 'tainacan' ),
|
||||
'label_available_exporters' => __( 'Available Exporters', 'tainacan' ),
|
||||
'label_source_collection' => __( 'Origin collection', 'tainacan'),
|
||||
'label_send_email' => __( 'Send me an e-mail when done.', 'tainacan' ),
|
||||
'label_send_email' => __( 'Send me an email when done.', 'tainacan' ),
|
||||
'label_urls' => __( 'URLs', 'tainacan' ),
|
||||
'label_page' => __( 'Page', 'tainacan' ),
|
||||
'label_item_page' => __( 'Item page', 'tainacan' ),
|
||||
|
@ -410,9 +443,12 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_no_output_info' => __( 'No output info', 'tainacan' ),
|
||||
'label_output' => __( 'Output', 'tainacan' ),
|
||||
'label_no_mapping' => __( 'No mapping', 'tainacan' ),
|
||||
/* translators: The sorting/order option 'desc'. A noun, not a verb */
|
||||
'label_descending' => __( 'Descending', 'tainacan' ),
|
||||
/* translators: The sorting/order option 'asc'. A noun, not a verb */
|
||||
'label_ascending' => __( 'Ascending', 'tainacan' ),
|
||||
'label_slideshow' => __( 'Slideshow', 'tainacan' ),
|
||||
/* translators: The slides/slideshow fullscreen view mode */
|
||||
'label_slides' => __( 'Slides', 'tainacan' ),
|
||||
'label_items_list' => __( 'Items List', 'tainacan' ),
|
||||
'label_list_pagination' => __( 'List pagination', 'tainacan' ),
|
||||
'label_sort_visualization' => __( 'Sorting and visualization control', 'tainacan' ),
|
||||
|
@ -429,6 +465,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_delete_collection' => __( 'Delete collection', 'tainacan' ),
|
||||
'label_no_collections_using_taxonomy' => __( 'There is no collection using this taxonomy', 'tainacan' ),
|
||||
'label_collections_using' => __( 'Collections using', 'tainacan' ),
|
||||
/* translators: The amount of items selected */
|
||||
'label_select_all_%s_items' => __( 'Select all %s items', 'tainacan' ),
|
||||
'label_next_page' => __( 'Next page', 'tainacan' ),
|
||||
'label_previous_page' => __( 'Previous page', 'tainacan' ),
|
||||
|
@ -436,9 +473,13 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_current_page' => __( 'Current page', 'tainacan' ),
|
||||
'label_shrink_menu' => __( 'Shrink menu', 'tainacan' ),
|
||||
'label_document_uploaded' => __( 'Document uploaded', 'tainacan' ),
|
||||
/* translators: Filter of the repository, not a repository of filter! */
|
||||
'label_repository_filter' => __( 'Repository filter', 'tainacan' ),
|
||||
/* translators: Metadatum of the repository, not a repository of metadatum! */
|
||||
'label_repository_metadatum' => __( 'Repository metadatum', 'tainacan' ),
|
||||
/* translators: Metadata of the repository, not a repository of metadata! */
|
||||
'label_repository_metadata' => __( 'Repository metadata', 'tainacan' ),
|
||||
/* translators: Filters of the repository, not a repository of filters! */
|
||||
'label_collection_filter' => __( 'Collection filter', 'tainacan' ),
|
||||
'label_collection_metadatum' => __( 'Collection metadatum', 'tainacan' ),
|
||||
'label_collection_capabilities' => __( 'Collection capabilities', 'tainacan' ),
|
||||
|
@ -450,6 +491,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_previous_group_slides' => __( 'Previous group of slides', 'tainacan' ),
|
||||
'label_plugin_home_page' => __( 'Plugin home page', 'tainacan' ),
|
||||
'label_wordpress_admin_page' => __( 'WordPress Admin Page', 'tainacan' ),
|
||||
/* translators: Number of collections */
|
||||
'label_view_all_%s_collections' => __( 'View all %s collections', 'tainacan' ),
|
||||
'label_view_collections_list' => __( 'View collections list', 'tainacan' ),
|
||||
'label_comparator' => __( 'Comparator', 'tainacan' ),
|
||||
|
@ -466,6 +508,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_expose_only_displayed_metadata' => __( 'Expose only displayed metadata', 'tainacan' ),
|
||||
'label_allowed' => __( 'Allowed', 'tainacan' ),
|
||||
'label_not_allowed' => __( 'Not allowed', 'tainacan' ),
|
||||
/* translators: Label for the button that opens the Exposers modal */
|
||||
'label_view_as' => __( 'View as...', 'tainacan' ),
|
||||
'label_day' => __( 'Day', 'tainacan' ),
|
||||
'label_month' => __( 'Month', 'tainacan' ),
|
||||
|
@ -481,9 +524,11 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'label_know_more' => __( 'Know more', 'tainacan' ),
|
||||
'label_request_details' => __( 'Request details', 'tainacan' ),
|
||||
'label_root_terms' => __( 'Root terms', 'tainacan' ),
|
||||
'label_see_on_fullscreen' => __( 'See on fullscreen', 'tainacan' ),
|
||||
'label_gallery_help' => __( 'Help with the gallery view mode', 'tainacan' ),
|
||||
'label_see_on_fullscreen' => __( 'See on fullscreen slides', 'tainacan' ),
|
||||
'label_slides_help' => __( 'Help with the slides view mode', 'tainacan' ),
|
||||
/* translators: The 'SPACE' key on keyboard */
|
||||
'label_space_key' => __( 'SPACE', 'tainacan' ),
|
||||
/* translators: The 'ESC' key on keyboard */
|
||||
'label_esc_key' => __( 'ESC', 'tainacan' ),
|
||||
'label_view_selected_items_as' => __( 'View selected items as...', 'tainacan' ),
|
||||
'label_actions_for_the_selection' => __( 'Actions for the selection', 'tainacan' ),
|
||||
|
@ -626,6 +671,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'info_warning_selected_taxonomies_delete' => __( 'Do you really want to delete the selected taxonomies?', 'tainacan' ),
|
||||
'info_warning_collection_related' => __( 'The metadata Collection related is required', 'tainacan' ),
|
||||
'info_warning_no_metadata_found' => __( 'No metadata found in this collection', 'tainacan' ),
|
||||
/* translators: This is displayed before sentences like "Showing items 2 to 8 of 12 */
|
||||
'info_showing_items' => __( 'Showing items ', 'tainacan' ),
|
||||
'info_showing_attachments' => __( 'Showing attachments ', 'tainacan' ),
|
||||
'info_showing_collections' => __( 'Showing collections ', 'tainacan' ),
|
||||
|
@ -639,7 +685,9 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'info_inherited_roles' => __( 'These are the roles that have greater capabilities, which inherit this one. You can not edit this as it will not have precendece over the greater capability.', 'tainacan' ),
|
||||
'info_showing_terms' => __( 'Showing terms ', 'tainacan' ),
|
||||
'info_warning_remove_from_trash_first' => __( 'Remove this item from trash first' ),
|
||||
/* translators: This is displayed before sentences like "Showing items 2 to 8 of 12 */
|
||||
'info_to' => __( ' to ', 'tainacan' ),
|
||||
/* translators: This is displayed before sentences like "Showing items 2 to 8 of 12 */
|
||||
'info_of' => __( ' of ', 'tainacan' ),
|
||||
'info_created_by' => __( 'Created by: ', 'tainacan' ),
|
||||
'info_by' => __( 'By: ', 'tainacan' ),
|
||||
|
@ -713,12 +761,12 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'info_leaving_bulk_edition' => __( 'You are leaving the bulk edition now.', 'tainacan' ),
|
||||
'info_current_view_mode_metadata_not_allowed' => __( 'Current view mode does not allow displayed metadata selection.', 'tainacan' ),
|
||||
'info_cant_select_metadata_without_items' => __( 'Can not select displayed metadata without items on list.', 'tainacan' ),
|
||||
'info_process_status_finished' => __('Finished', 'tainacan'),
|
||||
'info_process_status_finished_errors' => __('Finished with errors', 'tainacan'),
|
||||
'info_process_status_errored' => __('Failed', 'tainacan'),
|
||||
'info_process_status_cancelled' => __('Cancelled', 'tainacan'),
|
||||
'info_process_status_paused' => __('Paused', 'tainacan'),
|
||||
'info_process_status_running' => __('Running', 'tainacan'),
|
||||
'info_process_status_finished' => __( 'Finished', 'tainacan'),
|
||||
'info_process_status_finished_errors' => __( 'Finished with errors', 'tainacan'),
|
||||
'info_process_status_errored' => __( 'Failed', 'tainacan'),
|
||||
'info_process_status_cancelled' => __( 'Cancelled', 'tainacan'),
|
||||
'info_process_status_paused' => __( 'Paused', 'tainacan'),
|
||||
'info_process_status_running' => __( 'Running', 'tainacan'),
|
||||
'info_warning_process_cancelled' => __( 'Are you sure? This process will be cancelled', 'tainacan' ),
|
||||
'info_empty' => __( 'empty', 'tainacan' ),
|
||||
'info_url_copied' => __( 'URL link copied', 'tainacan' ),
|
||||
|
@ -747,14 +795,15 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
'info_not_allowed_change_order_metadata' => __( 'Can not change metadata order here.', 'tainacan' ),
|
||||
'info_not_allowed_change_order_filters' => __( 'Can not change filters order here.', 'tainacan' ),
|
||||
'info_no_value_compound_metadata' => __( 'No value has been added to this compound metadata.', 'tainacan' ),
|
||||
/* translators: Refers to the hierarchy of compound metadata. Like in 'Metadata X (child of Metadata Y) */
|
||||
'info_child_of' => __( 'child of', 'tainacan' ),
|
||||
'info_gallery_help_introduction' => __( 'Use the following commands to navigate thorugh the items', 'tainacan' ),
|
||||
'info_gallery_previous_item' => __( 'to go to the previous item', 'tainacan' ),
|
||||
'info_gallery_next_item' => __( 'to go to the next item', 'tainacan' ),
|
||||
'info_gallery_hide_controls' => __( 'to hide the controls and focus on the document', 'tainacan' ),
|
||||
'info_gallery_start_transition' => __( 'to start or pause automatic transition after every 3s', 'tainacan' ),
|
||||
'info_gallery_exit' => __( ' to leave the fullscreen gallery view mode', 'tainacan' ),
|
||||
'info_gallery_help_end' => __( 'At any moment, you can also check the item metadata list by clicking on the metadata icon (%1$s) or go directly to the item page, where you will have all its details, by clicking on the eye icon (%2$s).', 'tainacan' ),
|
||||
'info_slides_help_introduction' => __( 'Use the following commands to navigate thorugh the items', 'tainacan' ),
|
||||
'info_slides_previous_item' => __( 'to go to the previous item', 'tainacan' ),
|
||||
'info_slides_next_item' => __( 'to go to the next item', 'tainacan' ),
|
||||
'info_slides_hide_controls' => __( 'to hide the controls and focus on the document', 'tainacan' ),
|
||||
'info_slides_start_transition' => __( 'to start or pause automatic transition after every 3s', 'tainacan' ),
|
||||
'info_slides_exit' => __( 'to leave the fullscreen slides view mode', 'tainacan' ),
|
||||
'info_slides_help_end' => __( 'At any moment, you can also check the item metadata list by clicking on the metadata icon (%1$s) or go directly to the item page, where you will have all its details, by clicking on the eye icon (%2$s).', 'tainacan' ),
|
||||
'info_thumbnail_custom' => __( 'Upload the desired image for the thumbnail', 'tainacan'),
|
||||
'info_thumbnail_default_from_document' => __( 'A thumbnail will be automatically generated from the submitted document file', 'tainacan'),
|
||||
'info_submission_processing' => __( 'Please, wait while the submission is being processed', 'tainacan'),
|
||||
|
@ -795,7 +844,7 @@ return apply_filters( 'tainacan-admin-i18n', [
|
|||
/* translators: This refers to the short label that will appear on datepickers for Saturday */
|
||||
'datepicker_short_saturday' => __( 'Sa', 'tainacan' ),
|
||||
|
||||
/* Errors displayed on the interface botom notifications */
|
||||
/* Errors displayed on the interface bottom notifications */
|
||||
'error_connectivity_label' => __('Connectivity issue', 'tainacan'),
|
||||
'error_connectivity' => __('It is possible that you are disconnected or the server is not working properly.', 'tainacan'),
|
||||
'error_400' => __('Some request went wrong due to invalid syntax.', 'tainacan'),
|
||||
|
|
|
@ -1,24 +1,24 @@
|
|||
<template>
|
||||
<div class="tainacan-modal-content">
|
||||
<header class="tainacan-modal-title">
|
||||
<h2>{{ $i18n.get('title_gallery-help-modal') }}</h2>
|
||||
<h2>{{ $i18n.get('title_slides-help-modal') }}</h2>
|
||||
<hr>
|
||||
</header>
|
||||
<div class="gallery-help-modal-content">
|
||||
<p>{{ $i18n.get('info_gallery_help_introduction') }}:</p>
|
||||
<div class="slides-help-modal-content">
|
||||
<p>{{ $i18n.get('info_slides_help_introduction') }}:</p>
|
||||
<ul>
|
||||
<li><kbd>←</kbd> {{ $i18n.get('info_gallery_previous_item') }};</li>
|
||||
<li><kbd>→</kbd> {{ $i18n.get('info_gallery_next_item') }};</li>
|
||||
<li><kbd>↑</kbd> / <kbd>↓</kbd> {{ $i18n.get('info_gallery_hide_controls') }};</li>
|
||||
<li><kbd>{{ $i18n.get('label_space_key') }}</kbd> {{ $i18n.get('info_gallery_start_transition') }};</li>
|
||||
<li><kbd>{{ $i18n.get('label_esc_key') }}</kbd> {{ $i18n.get('info_gallery_exit') }}.</li>
|
||||
<li><kbd>←</kbd> {{ $i18n.get('info_slides_previous_item') }};</li>
|
||||
<li><kbd>→</kbd> {{ $i18n.get('info_slides_next_item') }};</li>
|
||||
<li><kbd>↑</kbd> / <kbd>↓</kbd> {{ $i18n.get('info_slides_hide_controls') }};</li>
|
||||
<li><kbd>{{ $i18n.get('label_space_key') }}</kbd> {{ $i18n.get('info_slides_start_transition') }};</li>
|
||||
<li><kbd>{{ $i18n.get('label_esc_key') }}</kbd> {{ $i18n.get('info_slides_exit') }}.</li>
|
||||
</ul>
|
||||
<p v-html="$i18n.getWithVariables('info_gallery_help_end', [`<i class='tainacan-icon tainacan-icon-metadata'></i>`, `<i class='tainacan-icon tainacan-icon-see'></i>`])" />
|
||||
<p v-html="$i18n.getWithVariables('info_slides_help_end', [`<i class='tainacan-icon tainacan-icon-metadata'></i>`, `<i class='tainacan-icon tainacan-icon-see'></i>`])" />
|
||||
</div>
|
||||
<footer class="field is-grouped form-submit">
|
||||
<div class="control">
|
||||
<button
|
||||
id="button-close-gallery-modal"
|
||||
id="button-close-slides-modal"
|
||||
class="button is-outlined"
|
||||
type="button"
|
||||
@click="$parent.close();">
|
||||
|
@ -29,10 +29,10 @@
|
|||
</template>
|
||||
|
||||
<style lang="scss">
|
||||
.modal.gallery-help-modal {
|
||||
.modal.slides-help-modal {
|
||||
z-index: 9999999999;
|
||||
|
||||
.gallery-help-modal-content {
|
||||
.slides-help-modal-content {
|
||||
font-size: 0.875em;
|
||||
|
||||
li {
|
|
@ -11,13 +11,13 @@
|
|||
show: 500,
|
||||
hide: 300,
|
||||
},
|
||||
content: $i18n.get('label_gallery_help'),
|
||||
content: $i18n.get('label_slides_help'),
|
||||
autoHide: false,
|
||||
placement: 'auto-start'
|
||||
}"
|
||||
id="gallery-help-button"
|
||||
id="slides-help-button"
|
||||
class="is-hidden-mobile"
|
||||
@click="openGalleryHelpModal">
|
||||
@click="openSlidesHelpModal">
|
||||
<span class="icon">
|
||||
<i class="tainacan-icon tainacan-icon-1-25em tainacan-icon-help"/>
|
||||
</span>
|
||||
|
@ -319,7 +319,7 @@ import axios from '../../admin/js/axios';
|
|||
import 'swiper/css/swiper.min.css';
|
||||
import Swiper from 'swiper';
|
||||
import CircularCounter from './circular-counter.vue';
|
||||
import GalleryHelpModal from './gallery-help-modal.vue'
|
||||
import SlidesHelpModal from './slides-help-modal.vue'
|
||||
import { viewModesMixin } from '../js/view-modes-mixin.js';
|
||||
|
||||
export default {
|
||||
|
@ -619,13 +619,13 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
openGalleryHelpModal() {
|
||||
openSlidesHelpModal() {
|
||||
this.$buefy.modal.open({
|
||||
component: GalleryHelpModal,
|
||||
component: SlidesHelpModal,
|
||||
width: 680,
|
||||
ariaRole: 'alertdialog',
|
||||
ariaModal: true,
|
||||
customClass: 'gallery-help-modal',
|
||||
customClass: 'slides-help-modal',
|
||||
onCancel: () => {
|
||||
setTimeout(() => document.documentElement.classList.add('is-clipped'), 500);
|
||||
}
|
||||
|
|
|
@ -366,7 +366,7 @@
|
|||
class="search-control-item">
|
||||
<button
|
||||
class="button is-white"
|
||||
:aria-label="$i18n.get('label_slideshow')"
|
||||
:aria-label="$i18n.get('label_slides')"
|
||||
@click="onChangeViewMode(viewModeOption)"
|
||||
v-for="(viewModeOption, index) of enabledViewModes"
|
||||
:key="index"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#close-fullscren-button,
|
||||
#item-page-button,
|
||||
#metedata-panel-button,
|
||||
#gallery-help-button {
|
||||
#slides-help-button {
|
||||
border-radius: 50px;
|
||||
color: var(--tainacan-white) !important;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
@ -24,7 +24,7 @@
|
|||
#metedata-panel-button {
|
||||
right: 7rem;
|
||||
}
|
||||
#gallery-help-button {
|
||||
#slides-help-button {
|
||||
right: 10.5rem;
|
||||
}
|
||||
.metadata-menu.tainacan-form {
|
||||
|
|
Loading…
Reference in New Issue