FEATURE: add support for categories into content save/edit

This commit is contained in:
Michal Kváček
2016-08-13 17:48:44 +02:00
parent 5aec27478a
commit 54e5927bb1
8 changed files with 108 additions and 7 deletions
+1
View File
@@ -3,6 +3,7 @@ return [
"alreadyHomepage" => "Domovská stránka",
"appearance" => "Vzhled",
"basicInfo" => "Základní informace",
"category" => "Kategorie",
"content" => "Obsah stránky",
"deletePage" => "Smazat",
"edit" => "Editace :name",
+1
View File
@@ -5,6 +5,7 @@ return [
'status_protected' => 'Protected',
'status_public' => 'Public',
'new' => 'Create new :name',
'category' => 'Category',
'edit' => 'Edit :name',
'editPlain' => 'Edit',
'content' => 'Page content',
+1
View File
@@ -12,6 +12,7 @@ return [
'columnIs_homepage' => 'Homepage',
'columnParentPage' => 'Parent page',
'columnTitlePhotoFilename' => 'Title photo',
'columnCategory' => 'Kategorie',
'emptyValue' => '<em>none</em>',
'changedFromTo' => 'Changed from <del>:from</del> to <ins>:to</ins>',
'numOfChanges' => 'One change|:count changes',
@@ -25,7 +25,9 @@
<label>
@lang('admin/contents.lockUrl')<br />
<input type="checkbox" value="1" id="lockUrl" @if(old('lockUrl') || ($page->id > 0 && \Illuminate\Support\Str::slug($page->title) != $page->url)) checked @endif name="lockUrl" />
<input type="checkbox" value="1" id="lockUrl"
@if(old('lockUrl') || ($page->id > 0 && \Illuminate\Support\Str::slug($page->title) != $page->url)) checked
@endif name="lockUrl" />
</label>
</div>
</div>
@@ -68,6 +70,25 @@
</div>
@endif
</div>
@if($module->support_categories && count($categories))
<div class="column large-12">
<label>
@lang('admin/contents.category')
<select name="category">
<option value=""> ---</option>
@foreach($categories as $category)
<option value="{{$category->id}}"
@if($category->id == old('category', $page->category_id)) selected @endif>
{{str_repeat(' - ', $category->real_depth)}} {{$category->name}}
</option>
@endforeach
</select>
</label>
</div>
@endif
</div>
<div class="row">