diff --git a/app/Helpers/helpers.php b/app/Helpers/helpers.php index 53b2f85a..e7beef58 100644 --- a/app/Helpers/helpers.php +++ b/app/Helpers/helpers.php @@ -34,7 +34,7 @@ if(!function_exists('category_menu')){ */ function category_menu(){ - return \App\Models\Category::main()->select('id','title_tm','title_ru')->get(); + return \App\Models\Category::main()->select('id','title_tk','title_ru')->get(); // $categories = main_categories(); // if(count($categories)>6){ // //todo implement top category menu @@ -62,30 +62,3 @@ if(!function_exists('organisers')){ return \Illuminate\Support\Facades\Auth::user()->account->organisers; } } -if ( ! function_exists('sanitise')) { - /** - * @param string $input - * @return string - */ - function sanitise($input) - { - $clear = clean($input); // Package to remove code "mews/purifier" - $clear = strip_tags($clear); - $clear = html_entity_decode($clear); - $clear = urldecode($clear); - $clear = preg_replace('~[\r\n\t]+~', ' ', trim($clear)); - $clear = preg_replace('/ +/', ' ', $clear); - return $clear; - } - - /** - * @param string $input - * @return string - */ - function clean_whitespace($input) - { - $clear = preg_replace('~[\r\n\t]+~', ' ', trim($input)); - $clear = preg_replace('/ +/', ' ', $clear); - return $clear; - } -} \ No newline at end of file diff --git a/app/Http/Controllers/API/PublicController.php b/app/Http/Controllers/API/PublicController.php index a68ed9aa..e087f7f8 100644 --- a/app/Http/Controllers/API/PublicController.php +++ b/app/Http/Controllers/API/PublicController.php @@ -10,7 +10,7 @@ use App\Http\Controllers\Controller; class PublicController extends Controller { public function getCategories($parent_id = false){ - $categories = Category::select('title_tm','title_ru','id','parent_id'); + $categories = Category::select('title_tk','title_ru','id','parent_id'); if($parent_id) $categories->children($parent_id); diff --git a/app/Http/Controllers/Admin/CategoryCrudController.php b/app/Http/Controllers/Admin/CategoryCrudController.php index 3178bdb8..6bbd0e9a 100644 --- a/app/Http/Controllers/Admin/CategoryCrudController.php +++ b/app/Http/Controllers/Admin/CategoryCrudController.php @@ -36,19 +36,19 @@ class CategoryCrudController extends CrudController // $this->crud->setFromDb(); $this->crud->addColumns([ ['name'=>'id','type'=>'text','label'=>'Id'], - ['name'=>'title_tm','type'=>'text','label'=>'Title tm'], + ['name'=>'title_tk','type'=>'text','label'=>'Title tm'], ['name'=>'title_ru','type'=>'text','label'=>'Title ru'], ['name'=>'view_type','type'=>'text','label'=>'View Type'], ['name'=>'events_limit','type'=>'text','label'=>'Event limit'], ['name'=>'parent_id','type'=>'text','label'=>'Parent'], ]); $this->crud->addFields([ - ['name'=>'title_tm','type'=>'text','label'=>'Title tm'], + ['name'=>'title_tk','type'=>'text','label'=>'Title tm'], ['name'=>'title_ru','type'=>'text','label'=>'Title ru'], ['name'=>'view_type','type' =>'enum', 'label'=>'View Type'], ['name'=>'events_limit','type'=>'number','label'=>'Event limit'], ]); - $this->crud->enableReorder('title_tm', 2); + $this->crud->enableReorder('title_tk', 2); $this->crud->allowAccess('reorder'); // add asterisk for fields that are required in CategoryRequest $this->crud->setRequiredFields(StoreRequest::class, 'create'); diff --git a/app/Http/Controllers/PublicController.php b/app/Http/Controllers/PublicController.php index 6ff9a7d8..b39b5fca 100644 --- a/app/Http/Controllers/PublicController.php +++ b/app/Http/Controllers/PublicController.php @@ -49,7 +49,7 @@ class PublicController extends Controller //$cat_id = $request->get('cat_id'); $e_query = Event::onLive(); - $nav_query = Category::select('id','title_tm','title_ru','parent_id') + $nav_query = Category::select('id','title_tk','title_ru','parent_id') ->orderBy('lft','asc'); $category = null; if(!empty($cat_id)){ @@ -85,13 +85,16 @@ class PublicController extends Controller public function showCategoryEvents($cat_id, Request $request){ $date = $request->get('date'); $popular = $request->get('popular'); - - $category = Category::select('id','title_tm','title_ru','view_type','events_limit','parent_id') +// setlocale(LC_TIME, 'tk'); +// Carbon::setLocale('tk'); +// dd(Carbon::parse('2019-01-01',config('app.timezone')) ->formatLocalized('%d %B')); +// Carbon:: + $category = Category::select('id','title_tk','title_ru','view_type','events_limit','parent_id') ->findOrFail($cat_id); - if($category->parent_id>0){ + if($category->parent_id >0 || $category->view_type === 'concert'){ $events = $category->cat_events() - ->onLive() + ->onLive($date) ->orderBy($popular ? 'start_date' : 'views') ->get(); return view("Bilettm.EventsList.subCategoryList")->with([ @@ -102,11 +105,11 @@ class PublicController extends Controller else{ $subCats = $category->children() ->withLiveEvents($date,$category->events_limit,$popular) - ->get(); - -// $events = $e_query->with('images')->paginate(5); -// dd($subCats->first()->cat_events); - return view("Bilettm.EventsList.".$category->view_type)->with([ + ->whereHas('cat_events',function ($query) use($date){ + $query->onLive($date); + })->get(); +//dd($subCats); + return view("Bilettm.Layouts.EventsPage")->with([ 'sub_cats' => $subCats, 'category' => $category, ]); diff --git a/app/Http/Requests/CategoryRequest.php b/app/Http/Requests/CategoryRequest.php index 56c0d98a..53bcad7e 100644 --- a/app/Http/Requests/CategoryRequest.php +++ b/app/Http/Requests/CategoryRequest.php @@ -26,7 +26,7 @@ class CategoryRequest extends FormRequest public function rules() { return [ -// 'title_tm' => 'required|min:5|max:255', +// 'title_tk' => 'required|min:5|max:255', // 'title_ru' => 'required|min:5|max:255' ]; } diff --git a/app/Http/routes.php b/app/Http/routes.php index 177a67e9..d2ab4037 100644 --- a/app/Http/routes.php +++ b/app/Http/routes.php @@ -118,10 +118,14 @@ Route::group( 'as' => 'showCategoryEventsPage', 'uses' => 'PublicController@showCategoryEvents', ]); + Route::get('/sub/{cat_id}/{cat_slug?}', [ + 'as' => 'showSubCategoryEventsPage', + 'uses' => 'PublicController@showEvents', + ]); Route::post('/{cat_id}/{cat_slug?}', [ 'as' => 'postEventsPage', - 'uses' => 'PublicController@showEvents', + 'uses' => 'PublicController@showCategoryEvents', ]); }); Route::group(['prefix' => 'e'], function () { diff --git a/app/Models/Category.php b/app/Models/Category.php index 8abae7d2..a39ae5d9 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -34,7 +34,7 @@ class Category extends \Illuminate\Database\Eloquent\Model{ * @var bool $softDelete */ protected $softDelete = false; - protected $fillable = ['title_tm','title_ru','view_type','lft','rgt','parent_id','depth']; + protected $fillable = ['title_tk','title_ru','view_type','lft','rgt','parent_id','depth']; /** * Get the url of the event. @@ -43,7 +43,14 @@ class Category extends \Illuminate\Database\Eloquent\Model{ */ public function getUrlAttribute() { - return route("showCategoryEventsPage", ["cat_id"=>$this->id, "cat_slug"=>Str::slug($this->title)]); +// switch ($this->view_type){ +// case 'concert' : $rout_name = "showSubCategoryEventsPage"; +// break; +// default : $rout_name = "showCategoryEventsPage"; +// break; +// } + $rout_name = "showCategoryEventsPage"; + return route($rout_name, ["cat_id"=>$this->id, "cat_slug"=>Str::slug($this->title)]); //return URL::to('/') . '/e/' . $this->id . '/' . Str::slug($this->title); } @@ -69,7 +76,7 @@ class Category extends \Illuminate\Database\Eloquent\Model{ public function scopeCategoryLiveEvents($query,$limit){ // dd($this->view_type); - return $query->select('id','title_tm','title_ru','lft') + return $query->select('id','title_tk','title_ru','lft') ->orderBy('lft') ->with(['events' => function($q) use($limit){ $q->select('id','title','description','category_id','sub_category_id','start_date') @@ -88,7 +95,7 @@ class Category extends \Illuminate\Database\Eloquent\Model{ public function children(){ return $this->hasMany(Category::class,'parent_id') - ->select('id','title_ru','title_tm','parent_id','lft') + ->select('id','title_ru','title_tk','parent_id','lft') ->orderBy('lft'); } public function scopeMain($query){ @@ -111,9 +118,8 @@ class Category extends \Illuminate\Database\Eloquent\Model{ ->with('starting_ticket') ->withCount(['stats as views' => function($q){ $q->select(DB::raw("SUM(views) as v"));}]) - ->onLive();//event scope onLive get only live events - if($date) - $query->whereDate('end_date','>=',Carbon::parse($date)); + ->onLive($date);//event scope onLive get only live events + if($popular) $query->orderBy('views','desc'); diff --git a/app/Models/Event.php b/app/Models/Event.php index 7e34d987..299aa882 100644 --- a/app/Models/Event.php +++ b/app/Models/Event.php @@ -476,14 +476,17 @@ ICSTemplate; return (is_null($this->access_codes()->where('id', $accessCodeId)->first()) === false); } - public function scopeOnLive($query){ - return$query->whereDate('end_date','>=',Carbon::now(\config('app.timezone'))) + public function scopeOnLive($query, $date = null){ + //if date is null carbon creates now date instance + return $query->whereDate('end_date','>=',Carbon::parse($date,config('app.timezone'))) ->where('is_live',1) ->withCount(['images as image_url' => function($q){ $q->select(DB::raw("image_path as imgurl")) ->orderBy('created_at','desc') ->limit(1); }] ); + + } } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 78815cb4..7d3175f1 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,6 +2,7 @@ namespace App\Providers; +use Illuminate\Support\Carbon; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider @@ -14,6 +15,7 @@ class AppServiceProvider extends ServiceProvider public function boot() { //require app_path('Attendize/constants.php'); + setlocale(LC_TIME, config('app.locale')); } /** diff --git a/app/Providers/HelpersServiceProvider.php b/app/Providers/HelpersServiceProvider.php index 17cc1faf..711c283e 100644 --- a/app/Providers/HelpersServiceProvider.php +++ b/app/Providers/HelpersServiceProvider.php @@ -15,6 +15,7 @@ class HelpersServiceProvider extends ServiceProvider { require app_path('Helpers/helpers.php'); require app_path('Helpers/macros.php'); + require app_path('Helpers/strings.php'); } /** diff --git a/config/app.php b/config/app.php index 9d495990..bc7680c9 100644 --- a/config/app.php +++ b/config/app.php @@ -65,7 +65,7 @@ return [ | */ - 'locale' => 'ru', + 'locale' => 'tk', /* |-------------------------------------------------------------------------- diff --git a/config/attendize.php b/config/attendize.php index 74c84076..839f08b5 100644 --- a/config/attendize.php +++ b/config/attendize.php @@ -64,7 +64,7 @@ return [ 'default_currency' => 2, #Euro 'default_date_picker_format' => env('DEFAULT_DATEPICKER_FORMAT', 'yyyy-MM-dd HH:mm'), 'default_date_picker_seperator' => env('DEFAULT_DATEPICKER_SEPERATOR', '-'), - 'default_datetime_format' => env('DEFAULT_DATETIME_FORMAT', 'Y-m-d H:i'), + 'default_datetime_format' => env('DEFAULT_DATETIME_FORMAT', 'd-m-Y H:i'), 'default_query_cache' => 120, #Minutes 'default_locale' => 'en', 'default_payment_gateway' => 1, #Stripe=1 Paypal=2 BitPay=3 MIGS=4 diff --git a/config/laravellocalization.php b/config/laravellocalization.php index 6056bdd9..4d330f8b 100644 --- a/config/laravellocalization.php +++ b/config/laravellocalization.php @@ -46,7 +46,7 @@ return [ //'en-AU' => ['name' => 'Australian English', 'script' => 'Latn', 'native' => 'Australian English', 'regional' => 'en_AU'], //'en-GB' => ['name' => 'British English', 'script' => 'Latn', 'native' => 'British English', 'regional' => 'en_GB'], //'en-US' => ['name' => 'U.S. English', 'script' => 'Latn', 'native' => 'U.S. English', 'regional' => 'en_US'], - //'es' => ['name' => 'Spanish', 'script' => 'Latn', 'native' => 'español', 'regional' => 'es_ES'], + 'es' => ['name' => 'Spanish', 'script' => 'Latn', 'native' => 'español', 'regional' => 'es_ES'], //'eo' => ['name' => 'Esperanto', 'script' => 'Latn', 'native' => 'esperanto', 'regional' => ''], //'eu' => ['name' => 'Basque', 'script' => 'Latn', 'native' => 'euskara', 'regional' => 'eu_ES'], //'ewo' => ['name' => 'Ewondo', 'script' => 'Latn', 'native' => 'ewondo', 'regional' => ''], @@ -312,6 +312,6 @@ return [ // If you want to display the locales in particular order in the language selector you should write the order here. //CAUTION: Please consider using the appropriate locale code otherwise it will not work //Example: 'localesOrder' => ['es','en'], - 'localesOrder' => ["en", "es", "pl", "fr"], + 'localesOrder' => [ "ru", "tk","en","es"], ]; diff --git a/database/migrations/2018_12_09_171803_create_category_table.php b/database/migrations/2018_12_09_171803_create_category_table.php index d396f334..16e7e26d 100644 --- a/database/migrations/2018_12_09_171803_create_category_table.php +++ b/database/migrations/2018_12_09_171803_create_category_table.php @@ -16,7 +16,7 @@ class CreateCategoryTable extends Migration Schema::create('categories', function (Blueprint $table) { $table->increments('id'); $table->string('title_ru'); - $table->string('title_tm'); + $table->string('title_tk'); $table->timestamps(); }); } diff --git a/database/seeds/CategoriesSeeder.php b/database/seeds/CategoriesSeeder.php index ce8fd130..e0c1b5d5 100644 --- a/database/seeds/CategoriesSeeder.php +++ b/database/seeds/CategoriesSeeder.php @@ -16,13 +16,13 @@ class CategoriesSeeder extends Seeder Schema::enableForeignKeyConstraints(); $categories = [ - ['id'=>1,'title_ru'=>'РАЗВЛЕЧЕНИЯ','title_tm'=>'ŞAGALAŇ'], - ['id'=>2,'title_ru'=>'КИНОТЕАТР','title_tm'=>'KINOTEATR'], - ['id'=>3,'title_ru'=>'ДЛЯ ДЕТЕЙ','title_tm'=>'ÇAGALAR ÜÇIN'], - ['id'=>4,'title_ru'=>'ТЕАТР','title_tm'=>'TEATR'], - ['id'=>5,'title_ru'=>'КОНЦЕРТ','title_tm'=>'AÝDYM SAZ'], - ['id'=>6,'title_ru'=>'СПОРТ','title_tm'=>'SPORT'], - ['id'=>7,'title_ru'=>'ДРУГИЕ','title_tm'=>'BEÝLEKILER'], + ['id'=>1,'title_ru'=>'КИНОТЕАТР','title_tk'=>'KINOTEATR'], + ['id'=>2,'title_ru'=>'ТЕАТР','title_tk'=>'TEATR'], + ['id'=>3,'title_ru'=>'КОНЦЕРТ','title_tk'=>'AÝDYM SAZ'], + ['id'=>4,'title_ru'=>'РАЗВЛЕЧЕНИЯ','title_tk'=>'ŞAGALAŇ'], + ['id'=>5,'title_ru'=>'ДЛЯ ДЕТЕЙ','title_tk'=>'ÇAGALAR ÜÇIN'], + ['id'=>6,'title_ru'=>'СПОРТ','title_tk'=>'SPORT'], + ['id'=>7,'title_ru'=>'ДРУГИЕ','title_tk'=>'BEÝLEKILER'], ]; DB::table('categories')->insert($categories); } diff --git a/resources/views/Bilettm/EventsList/cinema.blade.php b/resources/views/Bilettm/EventsList/cinema.blade.php index 985d8c4a..6f07feb9 100644 --- a/resources/views/Bilettm/EventsList/cinema.blade.php +++ b/resources/views/Bilettm/EventsList/cinema.blade.php @@ -1,905 +1,33 @@ -@extends('Bilettm.Layouts.EventsPage') - -@push('inner_content') - -{{--@foreach($sub_cats as $cat)--}} - {{--
--}} - {{--
--}} - {{--

{{$cat->title}}

--}} - {{--
--}} - {{--Весь репертуар--}} - {{--
--}} - {{--
--}} - - {{----}} - {{--
--}} - {{--
--}} - {{--
--}} - {{--@foreach($cat->cat_events as $event)--}} - {{--
--}} - {{--@include('Bilettm.Partials.CinemaItem')--}} - {{--
--}} - {{--@endforeach--}} - {{--
--}} - {{--
--}} - {{--
--}} - {{----}} - {{--
--}} - {{--
--}} -{{--@endforeach--}} - -
-
-
-
-

Кинотеатр "Беркарар"

-
- Весь репертуар -
-
- -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
+
+
-
- -
-
-
-
-

Кинотеатр "Беркарар"

-
- Весь репертуар -
-
- -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
- -
-
-
-
- -
-
-
-
-

Кинотеатр "Беркарар"

-
- Весь репертуар -
-
- -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
-
- -
-
-
-
- -
-
-
- - - -
-
-
- -@endpush \ No newline at end of file + + diff --git a/resources/views/Bilettm/EventsList/concert.blade.php b/resources/views/Bilettm/EventsList/concert.blade.php index b62d1881..cd4393cf 100644 --- a/resources/views/Bilettm/EventsList/concert.blade.php +++ b/resources/views/Bilettm/EventsList/concert.blade.php @@ -1,569 +1,33 @@ -@extends('Bilettm.Layouts.EventsPage') - -@push('inner_content') - - {{--@foreach($sub_cats as $cat)--}} - {{--
--}} - {{--
--}} - {{--

{{$cat->title}}

--}} - {{--
--}} - {{--Весь репертуар--}} - {{--
--}} - {{--
--}} - - {{----}} - {{--
--}} - {{--
--}} - {{--
--}} - {{--@foreach($cat->cat_events as $event)--}} - {{--
--}} - {{--@include('Bilettm.Partials.CinemaItem')--}} - {{--
--}} - {{--@endforeach--}} - {{--
--}} - {{--
--}} - {{--
--}} - {{----}} - {{--
--}} - {{--
--}} - {{--@endforeach--}} - -
-
-
-
-

Концерты

-
-
-
- - -
-
-
-
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
- -
-
-
-
+
+
- -
-
-
- - - -
-
-
- -@endpush \ No newline at end of file + + diff --git a/resources/views/Bilettm/EventsList/subCategoryList.blade.php b/resources/views/Bilettm/EventsList/subCategoryList.blade.php index 5c7d9535..52a8183a 100644 --- a/resources/views/Bilettm/EventsList/subCategoryList.blade.php +++ b/resources/views/Bilettm/EventsList/subCategoryList.blade.php @@ -1,49 +1,21 @@ -@extends('Bilettm.Layouts.EventsPage') -@push('inner_content') +@extends('Bilettm.Layouts.BilettmLayout') +@section('content') + {{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('category',$category)}} + @include("Bilettm.Partials.FilterMenu")

{{$category->title}}

- Весь репертуар
- - - -
@foreach($events as $event) -
- @include('Bilettm.Partials.CinemaItem') -
+ @include("Bilettm.EventsList.{$category->view_type}") @endforeach
@@ -53,4 +25,41 @@
-@endpush \ No newline at end of file +
+
+
+ + + +
+
+
+@endsection +@push('after_styles') + +@endpush +@section('after_scripts') + + + + +@endsection \ No newline at end of file diff --git a/resources/views/Bilettm/EventsList/theatre.blade.php b/resources/views/Bilettm/EventsList/theatre.blade.php index 78bb9a62..41273b27 100644 --- a/resources/views/Bilettm/EventsList/theatre.blade.php +++ b/resources/views/Bilettm/EventsList/theatre.blade.php @@ -1,244 +1,14 @@ -@extends('Bilettm.Layouts.EventsPage') -@push('inner_content') -
-
-
-
-

Драматический театр имени А.С.Пушкина

-
- Весь репертуар -
-
- -
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
-
- -
+
+
+
+ +
+
+
+ {{$event->start_date->format('H:s d.m.Y')}} +

{{$event->title}}

+
{{$event->subCategory->title}}
-
- -
-
-
-
-

Музыкально-драматическмй театр имени Махтумкули

-
- Весь репертуар -
-
- -
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
- -
-
-
- 12:00, 29.06.2019 y -

«Lukman Aybolit»

-
A.S.Puskin adyndaky dowlet rus drama teatry
-
-
-
-
-
-
-
-
- -
-
-
-
- -
-
-
- - - -
-
-
-@endpush \ No newline at end of file + + \ No newline at end of file diff --git a/resources/views/Bilettm/Layouts/BilettmLayout.blade.php b/resources/views/Bilettm/Layouts/BilettmLayout.blade.php index e5201318..cd976dd1 100644 --- a/resources/views/Bilettm/Layouts/BilettmLayout.blade.php +++ b/resources/views/Bilettm/Layouts/BilettmLayout.blade.php @@ -16,7 +16,7 @@ @yield('after_styles') - @stack('after_styles') + @@ -24,6 +24,7 @@ + @stack('after_styles') @@ -39,6 +40,7 @@
@include('Bilettm.Partials.PublicHeader') @yield('content') + @stack('after_content') @include('Bilettm.Partials.PublicFooter')
diff --git a/resources/views/Bilettm/Layouts/EventsPage.blade.php b/resources/views/Bilettm/Layouts/EventsPage.blade.php index 6a8804f0..d4d1cacf 100644 --- a/resources/views/Bilettm/Layouts/EventsPage.blade.php +++ b/resources/views/Bilettm/Layouts/EventsPage.blade.php @@ -2,42 +2,67 @@ @section('after_styles') - @endsection +@endsection @section('content') {{\DaveJamesMiller\Breadcrumbs\Facades\Breadcrumbs::render('category',$category)}} -
-
- - - @stack('inner_content') - -
-
-@endsection +
+ +
+
+
+ @foreach($cat->cat_events as $event) + @include("Bilettm.EventsList.{$category->view_type}",['event'=>$event]) + @endforeach +
+
+
+ +
+ + + + + @endforeach +
+
+
+ + + +
+
+
+ +@endsection +@push('after_styles') + +@endpush @section('after_scripts') diff --git a/resources/views/Bilettm/Partials/CinemaItem.blade.php b/resources/views/Bilettm/Partials/CinemaItem.blade.php index 7c6affc3..04349e03 100644 --- a/resources/views/Bilettm/Partials/CinemaItem.blade.php +++ b/resources/views/Bilettm/Partials/CinemaItem.blade.php @@ -3,10 +3,12 @@
-
-

{{$event->title}}

-

В кино с {{$event->start_date->format('d M')}}

+
+

{{$event->title}}

+

В кино с {{$event->start_date->formatLocalized('%d %B')}}

+ @if(isset($size))

{!! Markdown::parse($event->description) !!}

+ @endif + \ No newline at end of file diff --git a/resources/views/Bilettm/Partials/HomeCinema.blade.php b/resources/views/Bilettm/Partials/HomeCinema.blade.php index 96e696bf..37ff7f8c 100644 --- a/resources/views/Bilettm/Partials/HomeCinema.blade.php +++ b/resources/views/Bilettm/Partials/HomeCinema.blade.php @@ -15,9 +15,9 @@
- @foreach($cinema->events->slice(1,4) as $cinemaEvent) + @foreach($cinema->events->slice(1,4) as $event)
- @include('Bilettm.Partials.CinemaItem',['event'=>$cinemaEvent]) + @include('Bilettm.Partials.CinemaItem',['event'=>$event])
@endforeach @@ -29,9 +29,9 @@ @if($cinema->count()>4)
- @foreach($cinema->events->slice(5) as $cinemaEvent) + @foreach($cinema->events->slice(5) as $event)
- @include('Bilettm.Partials.CinemaItem',['event'=>$cinemaEvent]) + @include('Bilettm.Partials.CinemaItem',['event'=>$event])
@endforeach
diff --git a/resources/views/Bilettm/Partials/HomeMusical.blade.php b/resources/views/Bilettm/Partials/HomeMusical.blade.php index 03886f34..4db05a29 100644 --- a/resources/views/Bilettm/Partials/HomeMusical.blade.php +++ b/resources/views/Bilettm/Partials/HomeMusical.blade.php @@ -10,17 +10,13 @@
diff --git a/resources/views/Bilettm/Partials/MusicalItem.blade.php b/resources/views/Bilettm/Partials/MusicalItem.blade.php index 5fbb40b3..c5ee7769 100644 --- a/resources/views/Bilettm/Partials/MusicalItem.blade.php +++ b/resources/views/Bilettm/Partials/MusicalItem.blade.php @@ -1,4 +1,3 @@ -
@@ -30,4 +29,3 @@
-
\ No newline at end of file