Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
58aed91f
Commit
58aed91f
authored
Nov 04, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preparing for the menulink subresource
parent
f3cdb2ed
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
100 additions
and
2 deletions
+100
-2
MenuController.php
Http/Controllers/Admin/MenuController.php
+2
-2
MenuLinkController.php
Http/Controllers/Admin/MenuLinkController.php
+6
-0
routes.php
Http/routes.php
+9
-0
create.blade.php
Resources/views/admin/menuitems/create.blade.php
+0
-0
index.blade.php
Resources/views/admin/menuitems/index.blade.php
+0
-0
create.blade.php
Resources/views/admin/menus/create.blade.php
+22
-0
index.blade.php
Resources/views/admin/menus/index.blade.php
+61
-0
No files found.
Http/Controllers/Admin/MenuController.php
View file @
58aed91f
...
...
@@ -7,12 +7,12 @@ class MenuController extends AdminBaseController
{
public
function
index
()
{
return
View
::
make
(
'menu::admin.index'
);
return
View
::
make
(
'menu::admin.
menus.
index'
);
}
public
function
create
()
{
return
View
::
make
(
'menu::admin.create'
);
return
View
::
make
(
'menu::admin.
menus.
create'
);
}
public
function
store
()
...
...
Http/Controllers/Admin/MenuLinkController.php
0 → 100644
View file @
58aed91f
<?php
namespace
Modules\Menu\Http\Controllers\Admin
;
class
MenuLinkController
{
}
Http/routes.php
View file @
58aed91f
...
...
@@ -14,6 +14,15 @@ $router->group(['prefix' => LaravelLocalization::setLocale(), 'before' => 'Larav
'update'
=>
'dashboard.menu.update'
,
'destroy'
=>
'dashboard.menu.destroy'
,
]]);
$router
->
resource
(
'menus.menulinks'
,
'Admin\MenuLinkController'
,
[
'except'
=>
[
'show'
],
'names'
=>
[
'index'
=>
'dashboard.menulink.index'
,
'create'
=>
'dashboard.menulink.create'
,
'store'
=>
'dashboard.menulink.store'
,
'edit'
=>
'dashboard.menulink.edit'
,
'update'
=>
'dashboard.menulink.update'
,
'destroy'
=>
'dashboard.menulink.destroy'
,
]]);
});
});
...
...
Resources/views/admin/create.blade.php
→
Resources/views/admin/
menuitems/
create.blade.php
View file @
58aed91f
File moved
Resources/views/admin/index.blade.php
→
Resources/views/admin/
menuitems/
index.blade.php
View file @
58aed91f
File moved
Resources/views/admin/menus/create.blade.php
0 → 100644
View file @
58aed91f
@
extends
(
'core::layouts.master'
)
@
section
(
'content-header'
)
<
h1
>
{{
trans
(
'menu::menu.titles.create menu item'
)
}}
</
h1
>
<
ol
class
="
breadcrumb
">
<li><a href="
{{
URL
::
route
(
'dashboard.index'
)
}}
"><i class="
fa
fa
-
dashboard
"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li><a href="
{{
URL
::
route
(
'dashboard.menu.index'
)
}}
">{{ trans('menu::menu.breadcrumb.menu') }}</a></li>
<li>{{ trans('menu::menu.breadcrumb.create menu item') }}</li>
</ol>
@stop
@section('content')
{!! Form::open(['route' => ['dashboard.menu.store'], 'method' => 'post']) !!}
<div class="
row
">
<div class="
col
-
md
-
12
">
</div>
</div>
{!! Form::close() !!}
@stop
Resources/views/admin/menus/index.blade.php
0 → 100644
View file @
58aed91f
@
extends
(
'core::layouts.master'
)
@
section
(
'content-header'
)
<
h1
>
{{
trans
(
'menu::menu.titles.menu'
)
}}
</
h1
>
<
ol
class
="
breadcrumb
">
<li><a href="
{{
URL
::
route
(
'dashboard.index'
)
}}
"><i class="
fa
fa
-
dashboard
"></i> {{ trans('core::core.breadcrumb.home') }}</a></li>
<li class="
active
">{{ trans('menu::menu.breadcrumb.menu') }}</li>
</ol>
@stop
@section('styles')
<link href="
{
!!
Module
::
asset
(
'menu'
,
'css/nestable.css'
)
!!
}
" rel="
stylesheet
" type="
text
/
css
" />
@stop
@section('content')
<div class="
row
">
<div class="
col
-
md
-
6
">
<div class="
btn
-
group
pull
-
right
">
<a href="
{{
URL
::
route
(
'dashboard.menu.create'
)
}}
" class="
btn
btn
-
primary
btn
-
flat
">
<i class="
fa
fa
-
pencil
"></i> {{ trans('menu::menu.button.create menu item') }}
</a>
</div>
<div class="
dd
">
<ol class="
dd
-
list
">
<li class="
dd
-
item
" data-id="
1
">
<div class="
dd
-
handle
">Item 1</div>
</li>
<li class="
dd
-
item
" data-id="
2
">
<div class="
dd
-
handle
">Item 2</div>
</li>
<li class="
dd
-
item
" data-id="
3
">
<div class="
dd
-
handle
">Item 3</div>
<ol class="
dd
-
list
">
<li class="
dd
-
item
" data-id="
4
">
<div class="
dd
-
handle
">Item 4</div>
</li>
<li class="
dd
-
item
" data-id="
5
">
<div class="
dd
-
handle
">Item 5</div>
</li>
</ol>
</li>
</ol>
</div>
</div>
</div>
@stop
@section('scripts')
<script src="
{
!!
Module
::
asset
(
'menu'
,
'js/jquery.nestable.js'
)
!!
}
"></script>
<script>
$( document ).ready(function() {
$('.dd').nestable();
$('.dd').on('change', function() {
var data = $('.dd').nestable('serialize');
console.log(data);
});
});
</script>
@stop
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment