FEATURE: make templates not-editable

This commit is contained in:
Michal Kváček
2016-09-21 00:58:03 +02:00
parent f5e1e24df8
commit 7d051d1f6a
4 changed files with 26 additions and 19 deletions
@@ -8,13 +8,19 @@
{!! csrf_field() !!}
<div class="row">
<div class="col-lg-8">
@include('admin.snippets.aceEditor', [
'value' => old('templateContent', $templateContent),
'theme' => 'xcode',
'mode' => 'html',
'name' => 'templateContent',
'rows' => '20'
])
@if($template->editable)
@include('admin.snippets.aceEditor', [
'value' => old('templateContent', $templateContent),
'theme' => 'xcode',
'mode' => 'html',
'name' => 'templateContent',
'rows' => '20'
])
@else
<code>
<pre>{{$templateContent}}</pre>
</code>
@endif
</div>
<div class="col-lg-4">