Close button for advanced search component and fixes PHP Parse error: syntax error, unexpected '::' (T_PAAMAYIM_NEKUDOTAYIM)
This commit is contained in:
parent
8cae609ea7
commit
39ebf672b2
|
@ -274,10 +274,24 @@
|
|||
|
||||
|
||||
<!-- ADVANCED SEARCH -->
|
||||
<div
|
||||
v-if="openAdvancedSearch">
|
||||
<div class="columns tnc-advanced-search-close">
|
||||
<div class="column">
|
||||
<button
|
||||
@click="openAdvancedSearch = false"
|
||||
class="button is-white is-pulled-right">
|
||||
<b-icon
|
||||
size="is-small"
|
||||
icon="close"/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<advanced-search
|
||||
v-if="openAdvancedSearch"
|
||||
:is-repository-level="isRepositoryLevel"
|
||||
:metadata-list="fields" />
|
||||
</div>
|
||||
|
||||
|
||||
<!-- --------------- -->
|
||||
|
||||
|
@ -655,6 +669,16 @@
|
|||
|
||||
@import '../../scss/_variables.scss';
|
||||
|
||||
.tnc-advanced-search-close {
|
||||
padding-top: 47px;
|
||||
padding-right: $page-side-padding;
|
||||
padding-left: $page-side-padding;
|
||||
|
||||
.column {
|
||||
padding: 0 0.3rem 0.3rem !important;
|
||||
}
|
||||
}
|
||||
|
||||
.page-container {
|
||||
padding: 0px;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace Tainacan\Repositories;
|
|||
use Tainacan\Entities;
|
||||
use Tainacan\Entities\Entity;
|
||||
use Tainacan;
|
||||
use Tainacan\Repositories;
|
||||
use \Respect\Validation\Validator as v;
|
||||
|
||||
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
|
||||
|
@ -427,6 +428,7 @@ abstract class Repository {
|
|||
*/
|
||||
public static function get_entity_by_post_type( $post_type, $post = 0 ) {
|
||||
$prefix = substr( $post_type, 0, strlen( Entities\Collection::$db_identifier_prefix ) );
|
||||
$item_metadata_post_type = Repositories\Item_Metadata::get_instance()->entities_type::get_post_type();
|
||||
|
||||
// Is it a collection Item?
|
||||
if ( $prefix == Entities\Collection::$db_identifier_prefix ) {
|
||||
|
@ -436,15 +438,15 @@ abstract class Repository {
|
|||
} else {
|
||||
throw new \Exception( 'Collection object not found for this post' );
|
||||
}
|
||||
} elseif ( $post_type === \Tainacan\Repositories\Item_Metadata::get_instance()->entities_type::get_post_type() ) {
|
||||
} elseif ( $post_type === $item_metadata_post_type ) {
|
||||
return new Entities\Item_Metadata_Entity( null, null );
|
||||
} else {
|
||||
$Tainacan_Collections = \Tainacan\Repositories\Collections::get_instance();
|
||||
$Tainacan_Filters = \Tainacan\Repositories\Filters::get_instance();
|
||||
$Tainacan_Logs = \Tainacan\Repositories\Logs::get_instance();
|
||||
$Tainacan_Fields = \Tainacan\Repositories\Fields::get_instance();
|
||||
$Tainacan_Taxonomies = \Tainacan\Repositories\Taxonomies::get_instance();
|
||||
$Tainacan_Terms = \Tainacan\Repositories\Terms::get_instance();
|
||||
$Tainacan_Collections = Repositories\Collections::get_instance();
|
||||
$Tainacan_Filters = Repositories\Filters::get_instance();
|
||||
$Tainacan_Logs = Repositories\Logs::get_instance();
|
||||
$Tainacan_Fields = Repositories\Fields::get_instance();
|
||||
$Tainacan_Taxonomies = Repositories\Taxonomies::get_instance();
|
||||
$Tainacan_Terms = Repositories\Terms::get_instance();
|
||||
|
||||
$tnc_globals = [
|
||||
$Tainacan_Collections,
|
||||
|
|
Loading…
Reference in New Issue