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
0416b513
Commit
0416b513
authored
Nov 04, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Preparing create inputs
parent
ed63ad94
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
1 deletion
+85
-1
menu.php
Resources/lang/en/menu.php
+5
-0
menu.php
Resources/lang/fr/menu.php
+5
-0
create.blade.php
Resources/views/admin/menus/create.blade.php
+54
-1
create-fields.blade.php
Resources/views/admin/menus/partials/create-fields.blade.php
+16
-0
create-trans-fields.blade.php
.../views/admin/menus/partials/create-trans-fields.blade.php
+5
-0
No files found.
Resources/lang/en/menu.php
View file @
0416b513
...
...
@@ -18,5 +18,10 @@ return [
'table'
=>
[
'name'
=>
'Name'
,
'title'
=>
'Title'
,
],
'form'
=>
[
'title'
=>
'Title'
,
'name'
=>
'Name'
,
'status'
=>
'Status'
,
]
];
Resources/lang/fr/menu.php
View file @
0416b513
...
...
@@ -18,5 +18,10 @@ return [
'table'
=>
[
'name'
=>
'Nom'
,
'title'
=>
'Titre'
,
],
'form'
=>
[
'title'
=>
'Titre'
,
'name'
=>
'Nom'
,
'status'
=>
'Status'
,
]
];
Resources/views/admin/menus/create.blade.php
View file @
0416b513
...
...
@@ -11,12 +11,65 @@
</ol>
@stop
@section('styles')
<link
href=
"{!! Module::asset('core', 'css/vendor/iCheck/flat/blue.css') !!}"
rel=
"stylesheet"
type=
"text/css"
/>
@stop
@section('content')
{!! Form::open(['route' => ['dashboard.menu.store'], 'method' => 'post']) !!}
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"box box-info"
>
<div
class=
"box-header"
>
<h3
class=
"box-title"
>
{{ trans('core::core.title.translatable fields') }}
</h3>
</div>
<div
class=
"box-body"
>
<div
class=
"nav-tabs-custom"
>
<ul
class=
"nav nav-tabs"
>
<?php
$i
=
0
;
?>
<?php
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>
</li>
<?php
endforeach
;
?>
</ul>
<div
class=
"tab-content"
>
<?php
$i
=
0
;
?>
<?php
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
;
?>
</div>
</div>
</div>
</div>
<div
class=
"box box-info"
>
<div
class=
"box-header"
>
<h3
class=
"box-title"
>
{{ trans('core::core.title.non translatable fields') }}
</h3>
</div>
<div
class=
"box-body"
>
@include('menu::admin.menus.partials.create-fields')
</div>
</div>
<div
class=
"box-footer"
>
<button
type=
"submit"
class=
"btn btn-primary btn-flat"
>
{{ trans('core::core.button.create') }}
</button>
<a
class=
"btn btn-danger pull-right btn-flat"
href=
"{{ URL::route('dashboard.setting.index')}}"
><i
class=
"fa fa-times"
></i>
{{ trans('core::core.button.cancel') }}
</a>
</div>
</div>
</div>
{!! Form::close() !!}
@stop
@section('scripts')
<script>
$
(
document
).
ready
(
function
()
{
$
(
'
input[type="checkbox"].flat-blue, input[type="radio"].flat-blue
'
).
iCheck
({
checkboxClass
:
'
icheckbox_flat-blue
'
,
radioClass
:
'
iradio_flat-blue
'
});
});
</script>
@stop
Resources/views/admin/menus/partials/create-fields.blade.php
0 → 100644
View file @
0416b513
<div
class=
'form-group{{ $errors->has('
name
')
?
'
has-error
'
:
''
}}'
>
{!! Form::label('name', trans('menu::menu.form.name')) !!}
{!! Form::text('name', Input::old('name'), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.name')]) !!}
{!! $errors->first('Name', '
<span
class=
"help-block"
>
:message
</span>
') !!}
</div>
<div
class=
"checkbox"
>
<label
for=
"status"
>
<input
id=
"status"
name=
"status"
type=
"checkbox"
class=
"flat-blue"
value=
"1"
/>
{{ trans('menu::menu.form.status') }}
</label>
</div>
Resources/views/admin/menus/partials/create-trans-fields.blade.php
0 → 100644
View file @
0416b513
<div
class=
'form-group{{ $errors->has("title[{$lang}]") ? '
has-error
'
:
''
}}'
>
{!! Form::label("title[{$lang}]", trans('menu::menu.form.title')) !!}
{!! Form::text("title[{$lang}]", Input::old("title[{$lang}]"), ['class' => 'form-control', 'placeholder' => trans('menu::menu.form.title')]) !!}
{!! $errors->first("title[{$lang}]", '
<span
class=
"help-block"
>
:message
</span>
') !!}
</div>
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