Commit 6a076448 by Bagus Pambudi

sub menu ke 3 dan tampilan menu sama dengan yang bahasa indonesia

parent 80b6e238
......@@ -46,7 +46,7 @@ class MenuController extends Controller
*/
public function index()
{
$parent = Menu::where('status', '1')->whereNull('url')->whereIn('level', [1, 2])->pluck('name', 'id');
$parent = Menu::where('status', '1')->whereNull('url')->whereIn('level', [1, 2, 3])->pluck('name', 'id');
$page = Pages::orderBy('title', 'asc')->pluck('title', 'id');
$data = Menu::with(['rEn', 'rDe', 'rSa', 'rZh'])->select('id', 'parent', 'name', 'url', 'level', 'urutan')->orderby('level', 'asc')->orderby('urutan', 'asc')->get();
......
......@@ -234,6 +234,48 @@
{{ Form::close() }}
</td>
</tr>
@if (!empty($val2['r_child']))
@foreach ($val2['r_child'] as $ckey3 => $val3)
<tr>
<td>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="{!! url((string)$val3['url']) !!}">{!! $val3['name'] !!}</a>
</td>
<td style="text-align:center; vertical-align: middle;">
@if(count($val2['r_child']) != 1)
@if($val3['urutan'] == 1)
<a href="{{ route('menu_down', ['data'=>Crypt::encrypt($val3['id'])]) }}" class="btn btn-warning btn-xs">
<i class="fa fa-arrow-down"></i>
</a>
@endif
@if($val3['urutan'] > 1)
@if($val3['urutan'] == count($val2['r_child']))
<a href="{{ route('menu_up', ['data'=>Crypt::encrypt($val3['id'])]) }}" class="btn btn-warning btn-xs">
<i class="fa fa-arrow-up"></i>
</a>
@else
<a href="{{ route('menu_up', ['data'=>Crypt::encrypt($val3['id'])]) }}" class="btn btn-warning btn-xs">
<i class="fa fa-arrow-up"></i>
</a>
@if($ckey3+1 < count($val2['r_child']))
<a href="{{ route('menu_down', ['data'=>Crypt::encrypt($val3['id'])]) }}" class="btn btn-warning btn-xs">
<i class="fa fa-arrow-down"></i>
</a>
@endif
@endif
@endif
@endif
</td>
<td style="text-align:center; vertical-align: middle;">
<a href="{{ route('menu.edit', ['data'=>Crypt::encrypt($val3['id'])]) }}" data-toggle="tooltip" data-original-title="@lang('label.edit')" class="edit btn btn-primary btn-xs"><i class="fa fa-edit"></i></a>
<button class="btn btn-danger btn-xs" id="btn_delete" data-file="{{$val3['id']}}" data-toggle="tooltip" data-original-title="@lang('label.delete')"><i class="fa fa-trash-o"></i></button>
{{ Form::open(['url'=>route('menu.destroy', ['data'=>Crypt::encrypt($val3['id'])]), 'method'=>'delete', 'id' => $val3['id'], 'style' => 'display: none;']) }}
{{ csrf_field() }}
{{ Form::close() }}
</td>
</tr>
@endforeach
@endif
@endforeach
@endif
@endforeach
......
......@@ -3,32 +3,60 @@
@if($value->url)
<li><a href="{!! url((string)$value->url) !!}">@if ($value->rSa) {!! $value->rSa->name !!} @endif</a></li>
@else
<li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">@if ($value->rSa) {!! $value->rSa->name !!} @endif<div class="arrow-up"></div></a>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">@if ($value->rSa) {!! $value->rSa->name !!} @endif <div class="arrow-up"></div></a>
<ul class="dropdown-menu" role="menu">
<div class="yamm-content">
<div class="row">
@foreach ($menu as $valuec)
@if($valuec->parent == $value->id)
<ul class="col-sm-4" style="text-transform: capitalize;">
@if($valuec->url)
@if ($valuec->rSa)
<li><a href="{!! url((string)$valuec->url) !!}">@if ($valuec->rSa) {!! $valuec->rSa->name !!}@endif</a></li>
<li><a href="{!! url((string)$valuec->url) !!}">{!! $valuec->rSa->name !!}</a></li>
@endif
@else
<li class="dropdown-submenu">
<!-- <li class="dropdown-submenu"> -->
@if ($valuec->rSa)
<a href="#">{!! $valuec->rSa->name !!}</a>
<h3>
<b> <a href="#">{!! $valuec->rSa->name !!}</a> </b>
</h3>
@endif
<ul class="dropdown-menu">
<!-- <ul class="dropdown-menu"> -->
@foreach ($menu as $valuec2)
@if($valuec2->parent == $valuec->id)
@if($valuec2->url)
@if ($valuec2->rSa)
<li><a href="{!! url((string)$valuec2->url) !!}">{!! $valuec2->rSa->name !!}</a></li>
@endif
@else
<li class="dropdown-submenu">
@if ($valuec2->rSa)
<li><a href="{!! url((string)$valuec2->url) !!}">@if ($valuec2->rSa) {!! $valuec2->rSa->name !!} @endif</a></li>
<b> <a href="#">{!! $valuec2->rSa->name !!}</a></b>
@endif
<ul class="dropdown-menu">
@foreach($menu as $valuec3)
@if($valuec3->parent == $valuec2->id)
@if ($valuec3->rSa)
<li><a href="{!! url((string)$valuec3->url) !!}" target="_blank">{!! $valuec3->rSa->name !!}</a></li>
@endif
@endif
@endforeach
</ul>
</li>
@endif
@endif
@endforeach
<!-- </ul>
</li> -->
@endif
</ul>
@endif
@endforeach
</div>
</div>
</ul>
</li>
@endif
......
......@@ -3,32 +3,60 @@
@if($value->url)
<li><a href="{!! url((string)$value->url) !!}">@if ($value->rDe) {!! $value->rDe->name !!} @endif</a></li>
@else
<li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">@if ($value->rDe) {!! $value->rDe->name !!} @endif<div class="arrow-up"></div></a>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">@if ($value->rDe) {!! $value->rDe->name !!} @endif <div class="arrow-up"></div></a>
<ul class="dropdown-menu" role="menu">
<div class="yamm-content">
<div class="row">
@foreach ($menu as $valuec)
@if($valuec->parent == $value->id)
<ul class="col-sm-4" style="text-transform: capitalize;">
@if($valuec->url)
@if ($valuec->rDe)
<li><a href="{!! url((string)$valuec->url) !!}">@if ($valuec->rDe) {!! $valuec->rDe->name !!}@endif</a></li>
<li><a href="{!! url((string)$valuec->url) !!}">{!! $valuec->rDe->name !!}</a></li>
@endif
@else
<li class="dropdown-submenu">
<!-- <li class="dropdown-submenu"> -->
@if ($valuec->rDe)
<a href="#">{!! $valuec->rDe->name !!}</a>
<h3>
<b> <a href="#">{!! $valuec->rDe->name !!}</a> </b>
</h3>
@endif
<ul class="dropdown-menu">
<!-- <ul class="dropdown-menu"> -->
@foreach ($menu as $valuec2)
@if($valuec2->parent == $valuec->id)
@if($valuec2->url)
@if ($valuec2->rDe)
<li><a href="{!! url((string)$valuec2->url) !!}">{!! $valuec2->rDe->name !!}</a></li>
@endif
@else
<li class="dropdown-submenu">
@if ($valuec2->rDe)
<li><a href="{!! url((string)$valuec2->url) !!}">@if ($valuec2->rDe) {!! $valuec2->rDe->name !!} @endif</a></li>
<b> <a href="#">{!! $valuec2->rDe->name !!}</a></b>
@endif
<ul class="dropdown-menu">
@foreach($menu as $valuec3)
@if($valuec3->parent == $valuec2->id)
@if ($valuec3->rDe)
<li><a href="{!! url((string)$valuec3->url) !!}" target="_blank">{!! $valuec3->rDe->name !!}</a></li>
@endif
@endif
@endforeach
</ul>
</li>
@endif
@endif
@endforeach
<!-- </ul>
</li> -->
@endif
</ul>
@endif
@endforeach
</div>
</div>
</ul>
</li>
@endif
......
......@@ -3,32 +3,60 @@
@if($value->url)
<li><a href="{!! url((string)$value->url) !!}">@if ($value->rEn) {!! $value->rEn->name !!} @endif</a></li>
@else
<li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">@if ($value->rEn) {!! $value->rEn->name !!} @endif <div class="arrow-up"></div></a>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">@if ($value->rEn) {!! $value->rEn->name !!} @endif <div class="arrow-up"></div></a>
<ul class="dropdown-menu" role="menu">
<div class="yamm-content">
<div class="row">
@foreach ($menu as $valuec)
@if($valuec->parent == $value->id)
<ul class="col-sm-4" style="text-transform: capitalize;">
@if($valuec->url)
@if ($valuec->rEn)
<li><a href="{!! url((string)$valuec->url) !!}">{!! $valuec->rEn->name !!}</a></li>
@endif
@else
<li class="dropdown-submenu">
<!-- <li class="dropdown-submenu"> -->
@if ($valuec->rEn)
<a href="#">{!! $valuec->rEn->name !!}</a>
<h3>
<b> <a href="#">{!! $valuec->rEn->name !!}</a> </b>
</h3>
@endif
<ul class="dropdown-menu">
<!-- <ul class="dropdown-menu"> -->
@foreach ($menu as $valuec2)
@if($valuec2->parent == $valuec->id)
@if($valuec2->url)
@if ($valuec2->rEn)
<li><a href="{!! url((string)$valuec2->url) !!}">{!! $valuec2->rEn->name !!}</a></li>
@endif
@else
<li class="dropdown-submenu">
@if ($valuec2->rEn)
<b> <a href="#">{!! $valuec2->rEn->name !!}</a></b>
@endif
<ul class="dropdown-menu">
@foreach($menu as $valuec3)
@if($valuec3->parent == $valuec2->id)
@if ($valuec3->rEn)
<li><a href="{!! url((string)$valuec3->url) !!}" target="_blank">{!! $valuec3->rEn->name !!}</a></li>
@endif
@endif
@endforeach
</ul>
</li>
@endif
@endif
@endforeach
<!-- </ul>
</li> -->
@endif
</ul>
@endif
@endforeach
</div>
</div>
</ul>
</li>
@endif
......
......@@ -20,21 +20,29 @@
<!-- <ul class="dropdown-menu"> -->
@foreach ($menu as $valuec2)
@if($valuec2->parent == $valuec->id)
@if($valuec2->url)
<li><a href="{!! url((string)$valuec2->url) !!}" target="_blank">{!! $valuec2->name !!}</a></li>
{{-- @else
@else
<li class="dropdown-submenu">
<b> <a href="#">{!! $valuec2->name !!}</a></b>
<ul class="dropdown-menu">
@foreach ($menu as $valuec3)
@foreach($menu as $valuec3)
@if($valuec3->parent == $valuec2->id)
<li><a href="{!! url((string)$valuec3->url) !!}" target="_blank">{!! $valuec3->name !!}</a></li>
<li><a href="{!! url((string)$valuec3->url) !!}" target="_blank">{!! $valuec3->name !!}</a></li>
@endif
@endforeach
</ul>
</li>--}}
</li>
@endif
@endif
@endforeach
......
......@@ -3,32 +3,60 @@
@if($value->url)
<li><a href="{!! url((string)$value->url) !!}">@if ($value->rZh) {!! $value->rZh->name !!} @endif</a></li>
@else
<li class="dropdown"><a href="#" data-toggle="dropdown" class="dropdown-toggle">@if ($value->rZh) {!! $value->rZh->name !!} @endif<div class="arrow-up"></div></a>
<li class="dropdown yamm-fw"><a href="#" data-toggle="dropdown" class="dropdown-toggle">@if ($value->rZh) {!! $value->rZh->name !!} @endif <div class="arrow-up"></div></a>
<ul class="dropdown-menu" role="menu">
<div class="yamm-content">
<div class="row">
@foreach ($menu as $valuec)
@if($valuec->parent == $value->id)
<ul class="col-sm-4" style="text-transform: capitalize;">
@if($valuec->url)
@if ($valuec->rZh)
<li><a href="{!! url((string)$valuec->url) !!}">@if ($valuec->rZh) {!! $valuec->rZh->name !!}@endif</a></li>
<li><a href="{!! url((string)$valuec->url) !!}">{!! $valuec->rZh->name !!}</a></li>
@endif
@else
<li class="dropdown-submenu">
<!-- <li class="dropdown-submenu"> -->
@if ($valuec->rZh)
<a href="#">{!! $valuec->rZh->name !!}</a>
<h3>
<b> <a href="#">{!! $valuec->rZh->name !!}</a> </b>
</h3>
@endif
<ul class="dropdown-menu">
<!-- <ul class="dropdown-menu"> -->
@foreach ($menu as $valuec2)
@if($valuec2->parent == $valuec->id)
@if($valuec2->url)
@if ($valuec2->rZh)
<li><a href="{!! url((string)$valuec2->url) !!}">{!! $valuec2->rZh->name !!}</a></li>
@endif
@else
<li class="dropdown-submenu">
@if ($valuec2->rZh)
<li><a href="{!! url((string)$valuec2->url) !!}">@if ($valuec2->rZh) {!! $valuec2->rZh->name !!} @endif</a></li>
<b> <a href="#">{!! $valuec2->rZh->name !!}</a></b>
@endif
<ul class="dropdown-menu">
@foreach($menu as $valuec3)
@if($valuec3->parent == $valuec2->id)
@if ($valuec3->rZh)
<li><a href="{!! url((string)$valuec3->url) !!}" target="_blank">{!! $valuec3->rZh->name !!}</a></li>
@endif
@endif
@endforeach
</ul>
</li>
@endif
@endif
@endforeach
<!-- </ul>
</li> -->
@endif
</ul>
@endif
@endforeach
</div>
</div>
</ul>
</li>
@endif
......
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