internalization the names of the filters

This commit is contained in:
vnmedeiros 2019-10-16 13:46:42 -03:00
parent 032c42a7df
commit de7e874489
14 changed files with 15 additions and 16 deletions

View File

@ -481,9 +481,9 @@ export default {
// Removes element from filters list
this.activeFilterList.splice(this.newFilterIndex, 1);
},
handleChangeOnMetadata($event) {
handleChangeOnMetadata($event) {
if ($event.removed) {
this.oldMetadatumIndex = $event.removed.oldIndex;
this.oldMetadatumIndex = $event.removed.oldIndex;
}
},
updateFiltersOrder() {
@ -527,7 +527,7 @@ export default {
collectionId: this.collectionId,
metadatumId: this.choosenMetadatum.id,
name: this.choosenMetadatum.name,
filterType: this.selectedFilterType.name,
filterType: this.selectedFilterType.filter_type,
status: 'auto-draft',
isRepositoryLevel: this.isRepositoryLevel,
newIndex: this.newFilterIndex

View File

@ -59,7 +59,6 @@ class REST_Filter_Types_Controller extends REST_Controller {
$filter_type = new $name();
$filter_arr = $filter_type->_toArray();
$filter_arr['name'] = $item;
return $filter_arr;
}

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Autocomplete extends Filter_Type {
function __construct(){
$this->set_name('Autocomplete');
$this->set_name( __('Autocomplete', 'tainacan') );
$this->set_supported_types(['string','long_string','item']);
$this->set_component('tainacan-filter-autocomplete');
$this->set_use_max_options(false);

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Checkbox extends Filter_Type {
function __construct(){
$this->set_name('Checkbox List');
$this->set_name( __('Checkbox List', 'tainacan') );
$this->set_supported_types(['string','long_string','item']);
$this->set_component('tainacan-filter-checkbox');
$this->set_preview_template('

View File

@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Custom_Interval extends Filter_Type {
function __construct(){
$this->set_name('Custom Interval');
$this->set_name( __('Custom Interval', 'tainacan'));
$this->set_supported_types(['float','date']);
$this->set_component('tainacan-filter-custom-interval');
$this->set_use_max_options(false);

View File

@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Date_Interval extends Filter_Type {
function __construct(){
$this->set_name('Date Interval');
$this->set_name( __('Date Interval', 'tainacan') );
$this->set_supported_types(['date']);
$this->set_component('tainacan-filter-date-interval');
$this->set_use_max_options(false);

View File

@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Date extends Filter_Type {
function __construct(){
$this->set_name('Date');
$this->set_name( __('Date', 'tainacan') );
$this->set_supported_types(['date']);
$this->set_component('tainacan-filter-date');
// $this->set_form_component('tainacan-filter-form-date');

View File

@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Numeric_Interval extends Filter_Type {
function __construct(){
$this->set_name('Numeric Interval');
$this->set_name( __('Numeric Interval', 'tainacan') );
$this->set_supported_types(['float']);
$this->set_component('tainacan-filter-numeric-interval');
$this->set_form_component('tainacan-filter-form-numeric-interval');

View File

@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Numeric_List_Interval extends Filter_Type {
function __construct(){
$this->set_name('Numeric Interval List');
$this->set_name( __('Numeric Interval List', 'tainacan') );
$this->set_supported_types(['float']);
$this->set_component('tainacan-filter-numeric-list-interval');
$this->set_form_component('tainacan-filter-form-numeric-list-interval');

View File

@ -10,7 +10,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Numeric extends Filter_Type {
function __construct(){
$this->set_name('Numeric');
$this->set_name( __('Numeric', 'tainacan') );
$this->set_supported_types(['float']);
$this->set_component('tainacan-filter-numeric');
$this->set_form_component('tainacan-filter-form-numeric');

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Selectbox extends Filter_Type {
function __construct(){
$this->set_name('Select Box');
$this->set_name( __('Select Box', 'tainacan') );
$this->set_supported_types(['string', 'long_string']);
$this->set_component('tainacan-filter-selectbox');
$this->set_use_max_options(false);

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class Taginput extends Filter_Type {
function __construct(){
$this->set_name('Tag Input');
$this->set_name( __('Tag Input', 'tainacan') );
$this->set_supported_types(['string','long_string','item']);
$this->set_component('tainacan-filter-taginput');
$this->set_use_max_options(false);

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class TaxonomyCheckbox extends Filter_Type {
function __construct(){
$this->set_name('Taxonomy Checkbox List');
$this->set_name( __('Taxonomy Checkbox List', 'tainacan') );
$this->set_supported_types(['term']);
$this->set_component('tainacan-filter-taxonomy-checkbox');
$this->set_preview_template('

View File

@ -9,7 +9,7 @@ defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
class TaxonomyTaginput extends Filter_Type {
function __construct(){
$this->set_name('Taxonomy Tag Input');
$this->set_name( __('Taxonomy Tag Input', 'tainacan') );
$this->set_supported_types(['term']);
$this->set_component('tainacan-filter-taxonomy-taginput');
$this->set_use_max_options(false);