From 3bc7a592ebd966cbb74d30655aea32602f4f39a8 Mon Sep 17 00:00:00 2001 From: Stojan Kukrika Date: Wed, 18 Feb 2015 06:44:51 +0100 Subject: [PATCH] Fixes #39, Fixes #48, Fixes #49, Fixes #50 --- app/Http/Controllers/HomeController.php | 8 ++--- readme.md | 3 +- .../views/admin/video/create_edit.blade.php | 35 +++++++++++-------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 324b279b..f6879e24 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -45,13 +45,13 @@ public function index() $photoalbums = PhotoAlbum::select(array('photo_album.id', 'photo_album.name', 'photo_album.description', 'photo_album.folderid', - DB::raw('(select filename from photo WHERE album_cover=1 and photo.photo_album_id=photo_album.id) AS album_image'), - DB::raw('(select filename from photo WHERE photo.photo_album_id=photo_album.id ORDER BY position ASC, id ASC LIMIT 1) AS album_image_first')))->limit(8)->get(); + DB::raw('(select ${tbpfx}filename from photo WHERE album_cover=1 and ${tbpfx}photo.photo_album_id=${tbpfx}photo_album.id) AS album_image'), + DB::raw('(select ${tbpfx}filename from photo WHERE ${tbpfx}photo.photo_album_id=${tbpfx}photo_album.id ORDER BY position ASC, id ASC LIMIT 1) AS album_image_first')))->limit(8)->get(); $videoalbums = VideoAlbum::select(array('video_album.id', 'video_album.name', 'video_album.description', 'video_album.folderid', - DB::raw('(select youtube from video as v WHERE album_cover=1 and v.video_album_id=video_album.id) AS album_image'), - DB::raw('(select youtube from video WHERE video.video_album_id=video_album.id ORDER BY position ASC, id ASC LIMIT 1) AS album_image_first')))->limit(8)->get(); + DB::raw('(select ${tbpfx}youtube from video as v WHERE album_cover=1 and v.video_album_id=${tbpfx}video_album.id) AS album_image'), + DB::raw('(select ${tbpfx}youtube from video WHERE ${tbpfx}video.video_album_id=${tbpfx}video_album.id ORDER BY position ASC, id ASC LIMIT 1) AS album_image_first')))->limit(8)->get(); return view('site.home.index',compact('news','sliders','videoalbums','photoalbums')); } diff --git a/readme.md b/readme.md index 78faa23a..b3977c3e 100644 --- a/readme.md +++ b/readme.md @@ -31,14 +31,13 @@ Demo is here http://l5start.mrakodol.info/ * View Video,Photos,News * soon will be more... * Packages included: - * JeffreyWay Laravel 4 Generators * Datatables Bundle ----- ##Requirements - PHP >= 5.4.0 (Entrust requires 5.4, this is an increase over Laravel's 5.3.7 requirement) + PHP >= 5.4.0 MCrypt PHP Extension Enable creating triger in database SQL server(for example MySQL) diff --git a/resources/views/admin/video/create_edit.blade.php b/resources/views/admin/video/create_edit.blade.php index 0823d61c..d76f7d64 100644 --- a/resources/views/admin/video/create_edit.blade.php +++ b/resources/views/admin/video/create_edit.blade.php @@ -6,7 +6,8 @@
@@ -22,7 +23,9 @@ class="form-control"> @foreach($languages as $item) + selected="selected" + @endif + @endif >{{$item->name}} @endforeach
@@ -43,11 +46,14 @@ class="form-group {{{ $errors->has('photo_album_id') ? 'has-error' : '' }}}"> @@ -56,16 +62,16 @@ class="form-control"> @foreach($videoalbums as $item) class="form-group {{{ $errors->has('album_cover') ? 'has-error' : '' }}}">
+ + + 'class'=>'radio')) !!} + {{{ Lang::get('admin/admin.no') }}}
@@ -76,8 +82,7 @@ class="form-group {{{ $errors->has('content') ? 'has-error' : '' }}}"> Lang::get("admin/photo.description") }} - {!! $errors->first('description', '') - !!} + {!! $errors->first('description', '')!!}