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
85778546
Commit
85778546
authored
Oct 11, 2017
by
Julien Tant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use blade in menu module
parent
94a979c5
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
46 deletions
+58
-46
create.blade.php
...les/Menu/Resources/views/admin/menuitems/create.blade.php
+7
-5
edit.blade.php
Modules/Menu/Resources/views/admin/menuitems/edit.blade.php
+7
-5
create-fields.blade.php
...es/views/admin/menuitems/partials/create-fields.blade.php
+6
-6
edit-fields.blade.php
...rces/views/admin/menuitems/partials/edit-fields.blade.php
+10
-10
create.blade.php
Modules/Menu/Resources/views/admin/menus/create.blade.php
+7
-5
edit.blade.php
Modules/Menu/Resources/views/admin/menus/edit.blade.php
+7
-5
index.blade.php
Modules/Menu/Resources/views/admin/menus/index.blade.php
+14
-10
No files found.
Modules/Menu/Resources/views/admin/menuitems/create.blade.php
View file @
85778546
...
...
@@ -23,21 +23,23 @@
<div class="
nav
-
tabs
-
custom
">
<ul class="
nav
nav
-
tabs
">
<?php
$i
= 0; ?>
<?php foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
): ?>
@foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
)
<?php
$i
++; ?>
<li class="
{{
App
::
getLocale
()
==
$locale
?
'active'
:
''
}}
">
<a href="
#tab_{{ $i }}" data-toggle="tab">{{ trans('core::core.tab.'. strtolower($language['name'])) }}</a>
<a href="
#tab_{{ $i }}" data-toggle="tab">
{{
trans
(
'core::core.tab.'
.
strtolower
(
$language
[
'name'
]))
}}
</
a
>
</
li
>
<?
php
endforeach
;
?>
@
endforeach
</
ul
>
<
div
class
="
tab
-
content
">
<?php
$i
= 0; ?>
<?php
foreach
(
LaravelLocalization
::
getSupportedLocales
()
as
$locale
=>
$language
)
:
?>
@
foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
): ?>
<?php
$i
++; ?>
<div class="
tab
-
pane
{{
App
::
getLocale
()
==
$locale
?
'active'
:
''
}}
" id="
tab_
{{
$i
}}
">
@include('menu::admin.menuitems.partials.create-trans-fields', ['lang' =>
$locale
])
</div>
<?php
endforeach
;
?>
@endforeach
</div>
</div>
</div>
...
...
Modules/Menu/Resources/views/admin/menuitems/edit.blade.php
View file @
85778546
...
...
@@ -23,21 +23,23 @@
<div class="
nav
-
tabs
-
custom
">
<ul class="
nav
nav
-
tabs
">
<?php
$i
= 0; ?>
<?php foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
): ?>
@foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
)
<?php
$i
++; ?>
<li class="
{{
App
::
getLocale
()
==
$locale
?
'active'
:
''
}}
">
<a href="
#tab_{{ $i }}" data-toggle="tab">{{ trans('core::core.tab.'. strtolower($language['name'])) }}</a>
<a href="
#tab_{{ $i }}" data-toggle="tab">
{{
trans
(
'core::core.tab.'
.
strtolower
(
$language
[
'name'
]))
}}
</
a
>
</
li
>
<?
php
endforeach
;
?>
@
endforeach
</
ul
>
<
div
class
="
tab
-
content
">
<?php
$i
= 0; ?>
<?php
foreach
(
LaravelLocalization
::
getSupportedLocales
()
as
$locale
=>
$language
)
:
?>
@foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
)
<?php
$i
++; ?>
<div class="
tab
-
pane
{{
App
::
getLocale
()
==
$locale
?
'active'
:
''
}}
" id="
tab_
{{
$i
}}
">
@include('menu::admin.menuitems.partials.edit-trans-fields', ['lang' =>
$locale
])
</div>
<?php
endforeach
;
?>
@endforeach
</div>
</div>
</div>
...
...
Modules/Menu/Resources/views/admin/menuitems/partials/create-fields.blade.php
View file @
85778546
...
...
@@ -12,18 +12,18 @@
<label
for=
"page"
>
{{ trans('menu::menu-items.form.page') }}
</label>
<select
class=
"form-control"
name=
"page_id"
id=
"page"
>
<option
value=
""
></option>
<?php
foreach
(
$pages
as
$page
)
:
?>
<option
value=
"{{ $page->id }}"
>
{{ $page->title }}
</option>
<?php
endforeach
;
?>
@foreach ($pages as $page)
<option
value=
"{{ $page->id }}"
>
{{ $page->title }}
</option>
@endforeach
</select>
</div>
<div
class=
"form-group"
>
<label
for=
"parent_id"
>
{{ trans('menu::menu-items.form.parent menu item') }}
</label>
<select
class=
"form-control"
name=
"parent_id"
id=
"parent_id"
>
<option
value=
""
></option>
<?php
foreach
(
$menuSelect
as
$parentMenuItemId
=>
$parentMenuItemName
)
:
?>
<option
value=
"{{ $parentMenuItemId }}"
>
{{ $parentMenuItemName }}
</option>
<?php
endforeach
;
?>
@foreach ($menuSelect as $parentMenuItemId => $parentMenuItemName)
<option
value=
"{{ $parentMenuItemId }}"
>
{{ $parentMenuItemName }}
</option>
@endforeach
</select>
</div>
...
...
Modules/Menu/Resources/views/admin/menuitems/partials/edit-fields.blade.php
View file @
85778546
...
...
@@ -13,22 +13,22 @@
<label
for=
"page"
>
{{ trans('menu::menu-items.form.page') }}
</label>
<select
class=
"form-control"
name=
"page_id"
id=
"page"
>
<option
value=
""
></option>
<?php
foreach
(
$pages
as
$page
)
:
?>
<option
value=
"{{ $page->id }}"
{{
$
menuItem-
>
page_id == $page->id ? 'selected' : '' }}>
{{ $page->title }}
</option>
<?php
endforeach
;
?>
@foreach ($pages as $page)
<option
value=
"{{ $page->id }}"
{{
$
menuItem-
>
page_id == $page->id ? 'selected' : '' }}>
{{ $page->title }}
</option>
@endforeach
</select>
</div>
<div
class=
"form-group"
>
<label
for=
"parent_id"
>
{{ trans('menu::menu-items.form.parent menu item') }}
</label>
<select
class=
"form-control"
name=
"parent_id"
id=
"parent_id"
>
<option
value=
""
></option>
<?php
foreach
(
$menuSelect
as
$parentMenuItemId
=>
$parentMenuItemName
)
:
?>
<?php
if
(
$menuItem
->
id
!=
$parentMenuItemId
)
:
?>
<option
value=
"{{ $parentMenuItemId }}"
{{
$
menuItem-
>
parent_id == $parentMenuItemId ? ' selected' : '' }}>{{ $parentMenuItemName }}
</option>
<?php
endif
;
?>
<?php
endforeach
;
?>
@foreach ($menuSelect as $parentMenuItemId => $parentMenuItemName)
@if ($menuItem->id != $parentMenuItemId)
<option
value=
"{{ $parentMenuItemId }}"
{{
$
menuItem-
>
parent_id == $parentMenuItemId ? ' selected' : '' }}>{{ $parentMenuItemName }}
</option>
@endif
@endforeach
</select>
</div>
<div
class=
"form-group"
>
...
...
Modules/Menu/Resources/views/admin/menus/create.blade.php
View file @
85778546
...
...
@@ -23,21 +23,23 @@
<div
class=
"nav-tabs-custom"
>
<ul
class=
"nav nav-tabs"
>
<?php
$i
=
0
;
?>
<?php
foreach
(
LaravelLocalization
::
getSupportedLocales
()
as
$locale
=>
$language
)
:
?>
@foreach (LaravelLocalization::getSupportedLocales() as $locale => $language)
<?php
$i
++
;
?>
<li
class=
"{{ App::getLocale() == $locale ? 'active' : '' }}"
>
<a
href=
"#tab_{{ $i }}"
data-toggle=
"tab"
>
{{ trans('core::core.tab.'. strtolower($language['name'])) }}
</a>
<a
href=
"#tab_{{ $i }}"
data-toggle=
"tab"
>
{{ trans('core::core.tab.'. strtolower($language['name'])) }}
</a>
</li>
<?php
endforeach
;
?>
@endforeach
</ul>
<div
class=
"tab-content"
>
<?php
$i
=
0
;
?>
<?php
foreach
(
LaravelLocalization
::
getSupportedLocales
()
as
$locale
=>
$language
)
:
?>
@foreach (LaravelLocalization::getSupportedLocales() as $locale => $language)
<?php
$i
++
;
?>
<div
class=
"tab-pane {{ App::getLocale() == $locale ? 'active' : '' }}"
id=
"tab_{{ $i }}"
>
@include('menu::admin.menus.partials.create-trans-fields', ['lang' => $locale])
</div>
<?php
endforeach
;
?>
@endforeach
</div>
</div>
</div>
...
...
Modules/Menu/Resources/views/admin/menus/edit.blade.php
View file @
85778546
...
...
@@ -41,21 +41,23 @@
<div class="
nav
-
tabs
-
custom
">
<ul class="
nav
nav
-
tabs
">
<?php
$i
= 0; ?>
<?php foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
): ?>
@foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
)
<?php
$i
++; ?>
<li class="
{{
App
::
getLocale
()
==
$locale
?
'active'
:
''
}}
">
<a href="
#tab_{{ $i }}" data-toggle="tab">{{ trans('core::core.tab.'. strtolower($language['name'])) }}</a>
<a href="
#tab_{{ $i }}" data-toggle="tab">
{{
trans
(
'core::core.tab.'
.
strtolower
(
$language
[
'name'
]))
}}
</
a
>
</
li
>
<?
php
endforeach
;
?>
@
endforeach
</
ul
>
<
div
class
="
tab
-
content
">
<?php
$i
= 0; ?>
<?php
foreach
(
LaravelLocalization
::
getSupportedLocales
()
as
$locale
=>
$language
)
:
?>
@foreach (LaravelLocalization::getSupportedLocales() as
$locale
=>
$language
)
<?php
$i
++; ?>
<div class="
tab
-
pane
{{
App
::
getLocale
()
==
$locale
?
'active'
:
''
}}
" id="
tab_
{{
$i
}}
">
@include('menu::admin.menus.partials.edit-trans-fields', ['lang' =>
$locale
])
</div>
<?php
endforeach
;
?>
@endforeach
</div>
</div>
</div>
...
...
Modules/Menu/Resources/views/admin/menus/index.blade.php
View file @
85778546
...
...
@@ -34,8 +34,8 @@
</tr>
</thead>
<tbody>
<?php
if
(
isset
(
$menus
))
:
?>
<?php
foreach
(
$menus
as
$menu
)
:
?>
@isset(
$menus
)
@foreach (
$menus
as
$menu
)
<tr>
<td>
<a href="
{{
route
(
'admin.menu.menu.edit'
,
[
$menu
->
id
])
}}
">
...
...
@@ -49,13 +49,17 @@
</td>
<td>
<div class="
btn
-
group
">
<a
href=
"{{ route('admin.menu.menu.edit', [$menu->id]) }}"
class=
"btn btn-default btn-flat"
><i
class=
"glyphicon glyphicon-pencil"
></i></a>
<button
class=
"btn btn-danger btn-flat"
data-toggle=
"modal"
data-target=
"#confirmation-{{ $menu->id }}"
><i
class=
"glyphicon glyphicon-trash"
></i></button>
<a href="
{{
route
(
'admin.menu.menu.edit'
,
[
$menu
->
id
])
}}
"
class="
btn
btn
-
default
btn
-
flat
"><i
class="
glyphicon
glyphicon
-
pencil
"></i></a>
<button class="
btn
btn
-
danger
btn
-
flat
" data-toggle="
modal
"
data-target="
#confirmation-{{ $menu->id }}"><i
class
="
glyphicon
glyphicon
-
trash
"></i></button>
</div>
</td>
</tr>
<?php
endforeach
;
?>
<?php
endif
;
?>
@endforeach
@endisset
</tbody>
<tfoot>
<tr>
...
...
@@ -71,8 +75,8 @@
</div>
</div>
</div>
<?php
if
(
isset
(
$menus
))
:
?>
<?php
foreach
(
$menus
as
$menu
)
:
?>
@isset(
$menus
)
@foreach (
$menus
as
$menu
)
<!-- Modal -->
<div class="
modal
fade
modal
-
danger
" id="
confirmation
-
{{
$menu
->
id
}}
" tabindex="
-
1
" role="
dialog
" aria-labelledby="
myModalLabel
" aria-hidden="
true
">
<div class="
modal
-
dialog
">
...
...
@@ -93,8 +97,8 @@
</div>
</div>
</div>
<?php
endforeach
;
?>
<?php
endif
;
?>
@endforeach
@endisset
@stop
@section('footer')
...
...
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