FEATURE #2048: another work done on permissions

This commit is contained in:
Michal Kváček
2017-08-11 02:24:44 +02:00
parent 335ec4a167
commit 7f43316602
13 changed files with 69 additions and 49 deletions
@@ -4,25 +4,30 @@
class="col-lg-4 col-lg-offset-4 col-md-6 col-md-offset-3 col-sm-12 title-photo text-center">
<input type="hidden" id="existingTitlePhoto" value="{{$page->titlePhoto}}" name="existingTitlePhoto">
<p><img src="@thumbnail($page->titlePhoto)" alt="" /></p>
<p>
<a href="javascript:void(0)" id="removeTitlePhoto" class="btn btn-warning" data-toggle="tooltip"
title="@lang('admin/contents.deleteTitlePhoto')"><i
class="fa fa-trash"></i></a>
</p>
@can('upload', \App\Models\FileManager\File::class)
<p>
<a href="javascript:void(0)" id="removeTitlePhoto" class="btn btn-warning" data-toggle="tooltip"
title="@lang('admin/contents.deleteTitlePhoto')"><i
class="fa fa-trash"></i></a>
</p>
@endcan
</div>
</div>
@endif
<div class="row">
<div class="col-lg-12">
<label class="control-label">
@lang('admin/contents.uploadTitleImage')
</label>
<input type="file" id="titlePhotoFile" accept=".jpg,.jpeg,.png" name="titlePhotoFile" class="form-control" />
@can('upload', \App\Models\FileManager\File::class)
<div class="row">
<div class="col-lg-12">
<label class="control-label">
@lang('admin/contents.uploadTitleImage')
</label>
<input type="file" id="titlePhotoFile" accept=".jpg,.jpeg,.png" name="titlePhotoFile"
class="form-control" />
@include('admin.snippets.hasError', ['field' => 'titlePhotoFile'])
@include('admin.snippets.hasError', ['field' => 'titlePhotoFile'])
</div>
</div>
</div>
@endcan
@if (count($templates))
<div class="row">
@@ -59,7 +59,7 @@
<img src="@thumbnail($page->titlePhoto)" class="placeholder"
alt="{{$page->title}}" />
@endif
@endcannot
@endcan
</div>
<div class="col-xs-10 col-md-3 col-lg-4">
@can('update', $page)
@@ -1,18 +1,20 @@
<script src="{{asset('/resources/assets/js/vendor/ckeditor/ckeditor.js')}}"></script>
<script type="application/javascript">
CKEDITOR.on('instanceCreated', function(e) {
e.editor.on('change', function(event) {
CKEDITOR.on ('instanceCreated', function (e) {
e.editor.on ('change', function (event) {
var textarea = event.editor.element.$;
$(textarea).val(event.editor.getData().trim());
$(textarea.form).trigger('checkform.areYouSure');
$ (textarea).val (event.editor.getData ().trim ());
$ (textarea.form).trigger ('checkform.areYouSure');
});
})
CKEDITOR.replace ('{{$textareaId}}', {
uiColor: "#F5F5F5",
filebrowserUploadUrl: '{{route('upload.postFile', ['_token' => csrf_token()])}}',
forcePasteAsPlainText: true,
@can('upload', \App\Models\FileManager\File::class)
filebrowserUploadUrl: '{{route('upload.postFile', ['_token' => csrf_token()])}}',
@endcan
forcePasteAsPlainText: true,
entities: false,
basicEntities: false,
entities_greek: false,