Skip to content

Commit

Permalink
fixed issue #133
Browse files Browse the repository at this point in the history
  • Loading branch information
stojankukrika committed Jul 16, 2015
1 parent 89418e3 commit 4fa56dc
Show file tree
Hide file tree
Showing 22 changed files with 93 additions and 93 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Admin/LanguageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ public function data()
'languages.icon as icon'));
// "<span class='flag flag-$lang_code' alt='flag'></span>"
return Datatables::of($language)
// ->edit_column('icon', '{!! ($icon!="")? "<img style=\"max-width: 30px; max-height: 30px;\" src=\"../images/language/$id/$icon\">":""; !!}')
->edit_column('icon', '{!! ($icon!="")? "<span class=\"flag $icon\" alt=\"flag\">&nbsp</span>":""; !!}')
// ->edit_column('icon', '{{ ($icon!="")? "<img style=\"max-width: 30px; max-height: 30px;\" src=\"../images/language/$id/$icon\">":""; }}')
->edit_column('icon', '{{ ($icon!="")? "<span class=\"flag $icon\" alt=\"flag\">&nbsp</span>":""; }}')

->add_column('actions', '<a href="{{{ URL::to(\'admin/language/\' . $id . \'/edit\' ) }}}" class="btn btn-success btn-sm iframe" ><span class="glyphicon glyphicon-pencil"></span> {{ trans("admin/modal.edit") }}</a>
<a href="{{{ URL::to(\'admin/language/\' . $id . \'/delete\' ) }}}" class="btn btn-sm btn-danger iframe"><span class="glyphicon glyphicon-trash"></span> {{ trans("admin/modal.delete") }}</a>
Expand Down
6 changes: 3 additions & 3 deletions resources/views/admin/language/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class="form-group {{{ $errors->has('name') ? 'has-error' : '' }}}">
trans("admin/modal.title") }}</label> <input
class="form-control" type="text" name="name" id="name"
value="{{{ Input::old('name', isset($language) ? $language->name : null) }}}" />
{!!$errors->first('name', '<label class="control-label" for="name">:message</label>')!!}
{{$errors->first('name', '<label class="control-label" for="name">:message</label>')}}
</div>
</div>
<div
Expand All @@ -30,8 +30,8 @@ class="form-group {{{ $errors->has('lang_code') ? 'has-error' : '' }}}">
trans("admin/language.code") }}</label> <input
class="form-control" type="text" name="lang_code" id="lang_code"
value="{{{ Input::old('lang_code', isset($language) ? $language->lang_code : null) }}}" />
{!!$errors->first('lang_code', '<label class="control-label"
for="name">:message</label>')!!}
{{$errors->first('lang_code', '<label class="control-label"
for="name">:message</label>')}}
</div>
</div>
<div class="form-group">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/admin/layouts/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
@section('styles')
@parent

<link href="{{ elixir('css/admin.css') }}" rel="stylesheet">
<link href="{{ asset('css/admin.css') }}" rel="stylesheet">

@endsection

Expand All @@ -22,7 +22,7 @@
@section('scripts')
@parent

<script src="{{ elixir('js/admin.js') }}"></script>
<script src="{{ asset('js/admin.js') }}"></script>

{{-- Not yet a part of Elixir workflow --}}
<script src="{{asset('assets/admin/js/bootstrap-dataTables-paging.js')}}"></script>
Expand Down
14 changes: 7 additions & 7 deletions resources/views/admin/news/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class="form-group {{{ $errors->has('title') ? 'has-error' : '' }}}">
trans("admin/modal.title") }}</label> <input
class="form-control" type="text" name="title" id="title"
value="{{{ Input::old('title', isset($news) ? $news->title : null) }}}" />
{!!$errors->first('title', '<label class="control-label">:message</label>')!!}
{{$errors->first('title', '<label class="control-label">:message</label>')}}
</div>
</div>
<div
Expand All @@ -66,8 +66,8 @@ class="form-group {{{ $errors->has('introduction') ? 'has-error' : '' }}}">
trans("admin/news.introduction") }}</label>
<textarea class="form-control full-width wysihtml5"
name="introduction" value="introduction" rows="10">{{{ Input::old('introduction', isset($news) ? $news->introduction : null) }}}</textarea>
{!! $errors->first('introduction', '<label class="control-label">:message</label>')
!!}
{{ $errors->first('introduction', '<label class="control-label">:message</label>')
}}
</div>
</div>
<div
Expand All @@ -77,8 +77,8 @@ class="form-group {{{ $errors->has('content') ? 'has-error' : '' }}}">
trans("admin/news.content") }}</label>
<textarea class="form-control full-width wysihtml5" name="content"
value="content" rows="10">{{{ Input::old('content', isset($news) ? $news->content : null) }}}</textarea>
{!! $errors->first('content', '<label class="control-label">:message</label>')
!!}
{{ $errors->first('content', '<label class="control-label">:message</label>')
}}
</div>
</div>
<div
Expand All @@ -88,8 +88,8 @@ class="form-group {{{ $errors->has('source') ? 'error' : '' }}}">
trans("admin/news.source") }}</label> <input
class="form-control" type="text" name="source" id="source"
value="{{{ Input::old('source', isset($news) ? $news->source : null) }}}" />
{!! $errors->first('source', '<label class="control-label">:message</label>')
!!}
{{ $errors->first('source', '<label class="control-label">:message</label>')
}}
</div>
</div>
<div
Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/newscategory/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class="form-control"> @foreach($languages as $item)
trans("admin/modal.title") }}</label> <input
class="form-control" type="text" name="title" id="title"
value="{{{ Input::old('title', isset($newscategory) ? $newscategory->title : null) }}}" />
{!!$errors->first('title', '<span class="help-block">:message </span>')!!}
{{$errors->first('title', '<span class="help-block">:message </span>')}}
</div>
</div>

Expand Down
22 changes: 11 additions & 11 deletions resources/views/admin/photo/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class="form-group {{{ $errors->has('name') ? 'has-error' : '' }}}">
trans("admin/modal.title") }}</label> <input
class="form-control" type="text" name="name" id="name"
value="{{{ Input::old('name', isset($photo) ? $photo->name : null) }}}" />
{!!$errors->first('name', '<span class="help-block">:message </span>')!!}
{{$errors->first('name', '<span class="help-block">:message </span>')}}
</div>
</div>
<div
Expand All @@ -64,13 +64,13 @@ class="form-group {{{ $errors->has('slider') ? 'has-error' : '' }}}">
<div class="col-lg-12">
<label class="control-label" for="slider">{{{
trans('admin/photo.slider') }}}</label> <label class="radio">
{!! Form::radio('slider', 1, (Input::old('slider') == '1' ||
{{ Form::radio('slider', 1, (Input::old('slider') == '1' ||
(isset($photo) && $photo->slider == '1')) ? true : false,
array('id'=>'slider', 'class'=>'radio')) !!} {{{
array('id'=>'slider', 'class'=>'radio')) }} {{{
trans('admin/admin.yes') }}} </label> <label class="radio">
{!! Form::radio('slider', 0, (Input::old('slider') == '0' ||
{{ Form::radio('slider', 0, (Input::old('slider') == '0' ||
(isset($photo) && $photo->slider == '0') || !isset($photo)) ?
true : false, array('id'=>'slider', 'class'=>'radio')) !!} {{{
true : false, array('id'=>'slider', 'class'=>'radio')) }} {{{
trans('admin/admin.no') }}} </label>

</div>
Expand All @@ -80,15 +80,15 @@ class="form-group {{{ $errors->has('album_cover') ? 'has-error' : '' }}}">
<div class="col-lg-12">
<label class="control-label" for="album_cover">{{{
trans('admin/photo.album_cover') }}}</label> <label
class="radio"> {!! Form::radio('album_cover', 1,
class="radio"> {{ Form::radio('album_cover', 1,
(Input::old('album_cover') == '1' || (isset($photo) &&
$photo->album_cover == '1')) ? true : false,
array('id'=>'showtitle', 'class'=>'radio')) !!} {{{
array('id'=>'showtitle', 'class'=>'radio')) }} {{{
trans('admin/admin.yes') }}} </label> <label class="radio">
{!! Form::radio('album_cover', 0, (Input::old('album_cover') ==
{{ Form::radio('album_cover', 0, (Input::old('album_cover') ==
'0' || (isset($photo) && $photo->album_cover == '0') ||
!isset($photo)) ? true : false, array('id'=>'showtitle',
'class'=>'radio')) !!} {!! trans('admin/admin.no') !!} </label>
'class'=>'radio')) }} {{ trans('admin/admin.no') }} </label>

</div>
</div>
Expand All @@ -99,8 +99,8 @@ class="form-group {{{ $errors->has('content') ? 'has-error' : '' }}}">
trans("admin/photo.description") }}</label>
<textarea class="form-control full-width wysihtml5"
name="description" rows="10">{{{ Input::old('content', isset($photo) ? $photo->description : null) }}}</textarea>
{!! $errors->first('description', '<label class="control-label">:message</label>')
!!}
{{ $errors->first('description', '<label class="control-label">:message</label>')
}}
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/photoalbum/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class="form-group {{{ $errors->has('title') ? 'has-error' : '' }}}">
trans("admin/modal.title") }}</label> <input
class="form-control" type="text" name="name" id="name"
value="{{{ Input::old('name', isset($photoalbum) ? $photoalbum->name : null) }}}" />
{!!$errors->first('title', '<label class="control-label">:message</label>')!!}
{{$errors->first('title', '<label class="control-label">:message</label>')}}
</div>
</div>
<div class="form-group">
Expand Down
16 changes: 8 additions & 8 deletions resources/views/admin/users/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
placeholder="{{ trans('admin/users.username') }}" name="username"
id="username"
value="{{{ Input::old('username', isset($user) ? $user->username : null) }}}" />
{!! $errors->first('username', '<label class="control-label"
for="username">:message</label>')!!}
{{ $errors->first('username', '<label class="control-label"
for="username">:message</label>')}}
</div>
</div>
</div>
Expand All @@ -45,8 +45,8 @@
placeholder="{{ trans('admin/users.email') }}" name="email"
id="email"
value="{{{ Input::old('email', isset($user) ? $user->email : null) }}}" />
{!! $errors->first('email', '<label class="control-label"
for="email">:message</label>')!!}
{{ $errors->first('email', '<label class="control-label"
for="email">:message</label>')}}
</div>
</div>
</div>
Expand All @@ -59,8 +59,8 @@
<input class="form-control" tabindex="5"
placeholder="{{ trans('admin/users.password') }}"
type="password" name="password" id="password" value="" />
{!!$errors->first('password', '<label class="control-label"
for="password">:message</label>')!!}
{{$errors->first('password', '<label class="control-label"
for="password">:message</label>')}}
</div>
</div>
</div>
Expand All @@ -72,8 +72,8 @@
<input class="form-control" type="password" tabindex="6"
placeholder="{{ trans('admin/users.password_confirmation') }}"
name="password_confirmation" id="password_confirmation" value="" />
{!!$errors->first('password_confirmation', '<label
class="control-label" for="password_confirmation">:message</label>')!!}
{{$errors->first('password_confirmation', '<label
class="control-label" for="password_confirmation">:message</label>')}}
</div>
</div>
</div>
Expand Down
12 changes: 6 additions & 6 deletions resources/views/admin/video/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class="form-group {{{ $errors->has('name') ? 'has-error' : '' }}}">
trans("admin/modal.title") }}</label> <input
class="form-control" type="text" name="name" id="name"
value="{{{ Input::old('name', isset($video) ? $video->name : null) }}}" />
{!!$errors->first('name', '<span class="help-block">:message </span>')!!}
{{$errors->first('name', '<span class="help-block">:message </span>')}}
</div>
</div>
<div
Expand All @@ -63,14 +63,14 @@ class="form-group {{{ $errors->has('album_cover') ? 'has-error' : '' }}}">
<div class="col-lg-12">
<label class="control-label" for="album_cover">{{{
trans('admin/photo.album_cover') }}}</label>
<label class="radio"> {!! Form::radio('album_cover', 1, (Input::old('album_cover') == '1' || (isset($video) &&
<label class="radio"> {{ Form::radio('album_cover', 1, (Input::old('album_cover') == '1' || (isset($video) &&
$video->video_album_cover == '1')) ? true : false,
array('id'=>'showtitle', 'class'=>'radio')) !!}
array('id'=>'showtitle', 'class'=>'radio')) }}
{{{ trans('admin/admin.yes') }}} </label>
<label class="radio">
{!! Form::radio('album_cover', 0, (Input::old('album_cover') == '0' || (isset($video) && $video->video_album_cover == '0') ||
{{ Form::radio('album_cover', 0, (Input::old('album_cover') == '0' || (isset($video) && $video->video_album_cover == '0') ||
!isset($video)) ? true : false, array('id'=>'showtitle',
'class'=>'radio')) !!}
'class'=>'radio')) }}
{{{ trans('admin/admin.no') }}} </label>

</div>
Expand All @@ -82,7 +82,7 @@ class="form-group {{{ $errors->has('content') ? 'has-error' : '' }}}">
trans("admin/photo.description") }}</label>
<textarea class="form-control full-width wysihtml5"
name="description" rows="10">{{{ Input::old('content', isset($video) ? $video->description : null) }}}</textarea>
{!! $errors->first('description', '<label class="control-label">:message</label>')!!}
{{ $errors->first('description', '<label class="control-label">:message</label>')}}
</div>
</div>
<div class="form-group">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/admin/videoalbum/create_edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class="form-group {{{ $errors->has('title') ? 'has-error' : '' }}}">
trans("admin/modal.title") }}</label> <input
class="form-control" type="text" name="name" id="name"
value="{{{ Input::old('name', isset($videoalbum) ? $videoalbum->name : null) }}}" />
{!!$errors->first('title', '<label class="control-label">:message</label>')!!}
{{$errors->first('title', '<label class="control-label">:message</label>')}}
</div>
</div>
<div class="form-group">
Expand Down
22 changes: 11 additions & 11 deletions resources/views/articles/_form.blade.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<div class="form-group">
{!! Form::label('title', 'Title:') !!}
{!! Form::text('title', null, ['class'=>'form-control']) !!}
{{ Form::label('title', 'Title:') }}
{{ Form::text('title', null, ['class'=>'form-control']) }}
</div>

<div class="form-group">
{!! Form::label('excerpt', 'Excerpt:') !!}
{!! Form::textarea('excerpt', null, ['class'=>'form-control']) !!}
{{ Form::label('excerpt', 'Excerpt:') }}
{{ Form::textarea('excerpt', null, ['class'=>'form-control']) }}
</div>

<div class="form-group">
{!! Form::label('body', 'Body:') !!}
{!! Form::textarea('body', null, ['class'=>'form-control']) !!}
{{ Form::label('body', 'Body:') }}
{{ Form::textarea('body', null, ['class'=>'form-control']) }}
</div>

<div class="form-group">
{!! Form::label('published_at', 'Publish On:') !!}
{!! Form::input('date', 'published_at', date('Y-m-d'), ['class'=>'form-control']) !!}
{{ Form::label('published_at', 'Publish On:') }}
{{ Form::input('date', 'published_at', date('Y-m-d'), ['class'=>'form-control']) }}
</div>

<div class="form-group">
{!! Form::label('tags', 'Tags:') !!}
{!! Form::select('tags', $tags, null, ['class'=>'form-control', 'multiple']) !!}
{{ Form::label('tags', 'Tags:') }}
{{ Form::select('tags', $tags, null, ['class'=>'form-control', 'multiple']) }}
</div>

<div class="form-group">
{!! Form::submit($submitButtonText, ['class'=>'btn btn-primary form-control']) !!}
{{ Form::submit($submitButtonText, ['class'=>'btn btn-primary form-control']) }}
</div>
4 changes: 2 additions & 2 deletions resources/views/articles/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<h1>Write an Article</h1>
<hr>

{!! Form::open(['url' => 'articles']) !!}
{{ Form::open(['url' => 'articles']) }}
@include('articles._form', ['submitButtonText' => 'Add article'])
{!! Form::close() !!}
{{ Form::close() }}


@include('errors.list')
Expand Down
4 changes: 2 additions & 2 deletions resources/views/articles/edit.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<h1>Edit an Article</h1>
<hr>

{!! Form::model($article, ['method' => 'PATCH', 'action' => ['ArticlesController@update', $article->id]]) !!}
{{ Form::model($article, ['method' => 'PATCH', 'action' => ['ArticlesController@update', $article->id]]) }}
@include('articles._form', ['submitButtonText' => 'Update article'])
{!! Form::close() !!}
{{ Form::close() }}

@include('errors.list')

Expand Down
4 changes: 2 additions & 2 deletions resources/views/auth/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

@include('errors.list')

<form class="form-horizontal" role="form" method="POST" action="{!! URL::to('/auth/login') !!}">
<form class="form-horizontal" role="form" method="POST" action="{{ URL::to('/auth/login') }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">

<div class="form-group">
Expand Down Expand Up @@ -55,7 +55,7 @@
Login
</button>

<a href="{!! URL::to('/password/email') !!}">Forgot Your Password?</a>
<a href="{{ URL::to('/password/email') }}">Forgot Your Password?</a>
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/auth/password.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@include('errors.list')

<form class="form-horizontal" role="form" method="POST" action="{!! URL::to('/password/email') !!}">
<form class="form-horizontal" role="form" method="POST" action="{{ URL::to('/password/email') }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">

<div class="form-group">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/auth/register.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

@include('errors.list')

<form class="form-horizontal" role="form" method="POST" action="{!! URL::to('/auth/register') !!}">
<form class="form-horizontal" role="form" method="POST" action="{{ URL::to('/auth/register') }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">

<div class="form-group">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/auth/reset.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@include('errors.list')

<form class="form-horizontal" role="form" method="POST" action="{!! URL::to('/password/reset') !!}">
<form class="form-horizontal" role="form" method="POST" action="{{ URL::to('/password/reset') }}">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="hidden" name="token" value="{{ $token }}">

Expand Down
4 changes: 2 additions & 2 deletions resources/views/news/view_news.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta name="author" content="{{{ $news->author->username }}}" />
@stop {{-- Content --}} @section('content')
<h3>{{ $news->title }}</h3>
<p>{!! $news->introduction() !!}</p>
<p>{!! $news->content() !!}</p>
<p>{{ $news->introduction() }}</p>
<p>{{ $news->content() }}</p>
<div>
<span class="badge badge-info">Posted {{{ $news->created_at }}}</span>
</div>
Expand Down
Loading

0 comments on commit 4fa56dc

Please sign in to comment.