Commit cea4a207 authored by Nicolas Widart's avatar Nicolas Widart

Using the new translatable trait

parent 277b65fc
<?php namespace Modules\Menu\Entities; <?php namespace Modules\Menu\Entities;
use Baum\Node; use Baum\Node;
use Dimsav\Translatable\Translatable; use Modules\Core\Internationalisation\Translatable;
class Menuitem extends Node class Menuitem extends Node
{ {
......
...@@ -15,7 +15,7 @@ class EloquentMenuItemRepository extends EloquentBaseRepository implements MenuI ...@@ -15,7 +15,7 @@ class EloquentMenuItemRepository extends EloquentBaseRepository implements MenuI
$menuItem->target = $data['target']; $menuItem->target = $data['target'];
$menuItem->module_name = $data['module']; $menuItem->module_name = $data['module'];
unset($data['menu_id'], $data['page_id'], $data['target'], $data['module_name']); unset($data['menu_id'], $data['page_id'], $data['target'], $data['module']);
$translatableData = Helper::separateLanguages($data); $translatableData = Helper::separateLanguages($data);
Helper::updateTranslated($menuItem, $translatableData); Helper::updateTranslated($menuItem, $translatableData);
......
...@@ -27,20 +27,22 @@ ...@@ -27,20 +27,22 @@
</a> </a>
</div> </div>
</div> </div>
<div class="box box-info" style="overflow: hidden;"> <?php if (!$menuItems->isEmpty()): ?>
<div class="box-body"> <div class="box box-info" style="overflow: hidden;">
<div class="dd"> <div class="box-body">
<ol class="dd-list"> <div class="dd">
<?php foreach($menuItems as $menuItem): ?> <ol class="dd-list">
<li class="dd-item" data-id="{{ $menuItem->id }}"> <?php foreach($menuItems as $menuItem): ?>
<a href="" class="btn btn-sm btn-info" style="float: left; margin-right: 15px">Edit</a> <li class="dd-item" data-id="{{ $menuItem->id }}">
<div class="dd-handle" style="margin-left: 50px;">{{ $menuItem->title }}</div> <a href="" class="btn btn-sm btn-info" style="float: left; margin-right: 15px">Edit</a>
</li> <div class="dd-handle" style="margin-left: 50px;">{{ $menuItem->title }}</div>
<?php endforeach; ?> </li>
</ol> <?php endforeach; ?>
</ol>
</div>
</div> </div>
</div> </div>
</div> <?php endif; ?>
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<div class="box box-info"> <div class="box box-info">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment