removed tag
This commit is contained in:
parent
091b2e9881
commit
6d4eae516c
|
|
@ -224,48 +224,8 @@ class Post extends Model
|
|||
return $query;
|
||||
}
|
||||
|
||||
|
||||
// public function getActiveCategoriesOptions()
|
||||
// {
|
||||
// // $groupIds = $this->category_groups_all;
|
||||
// if (isset($this->category_groups_all)) {
|
||||
// dd($this->category_groups_all);
|
||||
// return $query;
|
||||
// }
|
||||
// // $query = Category::
|
||||
// // // where('status', 1)
|
||||
// // select('rainlab_blog_categories.id', 'rainlab_blog_categories.nest_left', 'rainlab_blog_categories.name')
|
||||
// // ->distinct()
|
||||
// // ->join('rainlab_blog_category_pivot', 'rainlab_blog_categories.id', '=', 'rainlab_blog_category_pivot.category_id')
|
||||
// // ->whereIn('rainlab_blog_category_pivot.category_group_id', $groupIds)
|
||||
// // ->get()
|
||||
// // ->lists('name', 'id');
|
||||
// // \Log::info($query);
|
||||
|
||||
// }
|
||||
|
||||
// public function getCategoryGroupOptions()
|
||||
// {
|
||||
// $groupIds = $this->category_groups_all;
|
||||
|
||||
// $query = Category::
|
||||
// select('rainlab_blog_categories.id', 'rainlab_blog_categories.nest_left', 'rainlab_blog_categories.name')
|
||||
// ->get()
|
||||
// ->lists('name', 'id');
|
||||
// // \Log::info($query);
|
||||
// return $query;
|
||||
// }
|
||||
|
||||
public function filterFields($fields, $context = null)
|
||||
{
|
||||
$fields->tags_ru->hidden = true;
|
||||
$fields->tags_tm->hidden = true;
|
||||
$fields->tags_en->hidden = true;
|
||||
// $fields->afisha_phone->value = $fields->category_groupsq->value;
|
||||
// $fields->category_groups->value = $fields->category_groupsq->value;
|
||||
|
||||
// \Log::info($fields->category_groups->value);
|
||||
// \Log::info($fields->category_groupsq->value);
|
||||
|
||||
if (isset($this->awtor)) {
|
||||
if ($this->awtor->type == 'other' && $context == "create") {
|
||||
|
|
@ -278,32 +238,6 @@ class Post extends Model
|
|||
$fields->author_name->readOnly = true;
|
||||
}
|
||||
}
|
||||
// dd($fields->category_groups);
|
||||
|
||||
// if (isset($this->category_groups_all)) {
|
||||
// // if($this->category_groups_all->type == 'other'){
|
||||
// // $fields->author_name->value = '';
|
||||
// // $fields->author_name->readOnly = false;
|
||||
// // }elseif(isset($fields->author_name)){
|
||||
// // $fields->author_name->value = $this->awtor->name;
|
||||
// // $fields->author_name->readOnly = true;
|
||||
// // }
|
||||
|
||||
// if ($this->category_groups_all->type == 'news') {
|
||||
// $fields->type_post->hidden = false;
|
||||
// } else {
|
||||
// $fields->type_post->hidden = true;
|
||||
// }
|
||||
|
||||
// if ($this->category_groups_all->type == 'afisha') {
|
||||
// $fields->afisha_phone->hidden = false;
|
||||
// $fields->afisha_address->hidden = false;
|
||||
// } else {
|
||||
// $fields->afisha_phone->hidden = true;
|
||||
// $fields->afisha_address->hidden = true;
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
if(isset($fields->category_groups)){
|
||||
|
||||
|
|
@ -333,34 +267,20 @@ class Post extends Model
|
|||
|
||||
if (isset($fields->locale)) {
|
||||
if ($this->locale == 'en') {
|
||||
$fields->tags_en->hidden = false;
|
||||
$fields->tags_ru->hidden = true;
|
||||
$fields->tags_tm->hidden = true;
|
||||
|
||||
$fields->id_en->disabled = true;
|
||||
$fields->id_ru->disabled = false;
|
||||
$fields->id_tm->disabled = false;
|
||||
} else if ($this->locale == 'ru') {
|
||||
$fields->tags_en->hidden = true;
|
||||
$fields->tags_ru->hidden = false;
|
||||
$fields->tags_tm->hidden = true;
|
||||
|
||||
$fields->id_en->disabled = false;
|
||||
$fields->id_ru->disabled = true;
|
||||
$fields->id_tm->disabled = false;
|
||||
} else if ($this->locale == 'tm') {
|
||||
$fields->tags_en->hidden = true;
|
||||
$fields->tags_ru->hidden = true;
|
||||
$fields->tags_tm->hidden = false;
|
||||
|
||||
$fields->id_en->disabled = false;
|
||||
$fields->id_ru->disabled = false;
|
||||
$fields->id_tm->disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!isset($fields->published, $fields->published_at)) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,28 +35,28 @@ secondaryTabs:
|
|||
span: left
|
||||
default: 'rainlab.blog::lang.ru'
|
||||
type: dropdown
|
||||
tab: 'Language and Tag'
|
||||
tab: 'Lang'
|
||||
id_en:
|
||||
label: 'Translated Post ID En'
|
||||
span: right
|
||||
dependsOn:
|
||||
- locale
|
||||
type: number
|
||||
tab: 'Language and Tag'
|
||||
tab: 'Lang'
|
||||
id_tm:
|
||||
label: 'Translated Post ID Tm'
|
||||
span: right
|
||||
dependsOn:
|
||||
- locale
|
||||
type: number
|
||||
tab: 'Language and Tag'
|
||||
tab: 'Lang'
|
||||
id_ru:
|
||||
label: 'Translated Post ID Ru'
|
||||
span: right
|
||||
dependsOn:
|
||||
- locale
|
||||
type: number
|
||||
tab: 'Language and Tag'
|
||||
tab: 'Lang'
|
||||
awtor:
|
||||
label: Authors
|
||||
nameFrom: name
|
||||
|
|
|
|||
|
|
@ -1,14 +0,0 @@
|
|||
<?php namespace SerenityNow\Cacheroute;
|
||||
|
||||
use System\Classes\PluginBase;
|
||||
|
||||
class Plugin extends PluginBase
|
||||
{
|
||||
public function boot()
|
||||
{
|
||||
//add RouteCacheMiddleware as a global middleware to intercept all routes
|
||||
$this->app['Illuminate\Contracts\Http\Kernel']
|
||||
->pushMiddleware('SerenityNow\CacheRoute\Classes\RouteCacheMiddleware');
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue