FEATURE: make widget areas not deletable

This commit is contained in:
Michal Kváček
2016-09-20 14:16:33 +02:00
parent 5cbe19064b
commit 694724945d
6 changed files with 127 additions and 10 deletions
+2
View File
@@ -12,6 +12,8 @@ return [
"new" => "Nová plocha pro widgety",
"noEntries" => "Zatím nebyla definována žádná plocha pro widgety.",
"overview" => "Seznam všech ploch pro widgety",
"save" => "Uložit",
"successfullyCreated" => "Plocha pro widgety úspěšně vytvořena",
"successfullyDeleted" => "Úspěšně smazáno",
"uniqueCode" => "Unikátní kód",
];
+5 -1
View File
@@ -13,7 +13,11 @@ return [
'actions' => 'Actions',
'noEntries' => 'No widget areas defined yet. Try to create some first.',
'editButton' => 'Edit',
'save' => 'Save',
'save' => 'Save',
'edit' => 'Editing widget area :name',
'editTooltip' => 'Edit widget area',
'associateWidgets' => 'Associate widgets with this widget area',
'delete' => 'Delete widget area',
'notDeletableArea' => 'Cannot delete desired widget area. This area is essential part of installed template and therefore cannot be deleted.',
'editSuccessfull' => 'Successfully edited'
];
@@ -27,18 +27,24 @@
<div class="item-actions-block">
<ul class="item-actions-list">
<li>
<a class="edit" href="{{route('widgetareas.edit', ['id' => $area->id])}}"><i
<a class="edit" data-toggle="tooltip"
title="@lang('admin/widgetAreas.editTooltip')"
href="{{route('widgetareas.edit', ['id' => $area->id])}}"><i
class="fa fa-pencil"></i></a>
</li>
<li>
<a href="{{route('widgets.associate', ['widgetArea' => $area->id])}}"><i
class="fa fa-plus"></i></a>
</li>
<li>
<a class="confirm remove"
href="{{route('widgetareas.delete', ['id' => $area->id])}}"><i
class="fa fa-trash"></i></a>
<a href="{{route('widgets.associate', ['widgetArea' => $area->id])}}"
data-toggle="tooltip"
title="@lang('admin/widgetAreas.associateWidgets')">
<i class="fa fa-plus"></i></a>
</li>
@if($area->deletable)
<li>
<a class="confirm remove" data-toggle="tooltip" title="@lang('admin/widgetAreas.delete')"
href="{{route('widgetareas.delete', ['id' => $area->id])}}"><i
class="fa fa-trash"></i></a>
</li>
@endif
</ul>
</div>