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
8ec0f7e0
Commit
8ec0f7e0
authored
Oct 19, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Translating the setting index
parent
fee71990
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
8 deletions
+30
-8
SettingController.php
Http/Controllers/Admin/SettingController.php
+5
-0
routes.php
Http/routes.php
+2
-1
settings.php
Resources/lang/en/settings.php
+8
-0
settings.php
Resources/lang/fr/settings.php
+8
-0
settings.blade.php
Resources/views/admin/settings.blade.php
+7
-7
No files found.
Http/Controllers/Admin/SettingController.php
View file @
8ec0f7e0
...
@@ -43,4 +43,9 @@ class SettingController extends AdminBaseController
...
@@ -43,4 +43,9 @@ class SettingController extends AdminBaseController
Flash
::
success
(
'Settings saved!'
);
Flash
::
success
(
'Settings saved!'
);
return
Redirect
::
route
(
'dashboard.setting.index'
);
return
Redirect
::
route
(
'dashboard.setting.index'
);
}
}
public
function
moduleSettings
(
$module
)
{
dd
(
$module
.
' settings'
);
}
}
}
Http/routes.php
View file @
8ec0f7e0
...
@@ -3,7 +3,8 @@
...
@@ -3,7 +3,8 @@
$router
->
group
([
'prefix'
=>
LaravelLocalization
::
setLocale
(),
'before'
=>
'LaravelLocalizationRedirectFilter|auth.admin'
],
function
(
$router
)
{
$router
->
group
([
'prefix'
=>
LaravelLocalization
::
setLocale
(),
'before'
=>
'LaravelLocalizationRedirectFilter|auth.admin'
],
function
(
$router
)
{
$router
->
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\Setting\Http\Controllers'
],
function
(
$router
)
$router
->
group
([
'prefix'
=>
Config
::
get
(
'core::core.admin-prefix'
),
'namespace'
=>
'Modules\Setting\Http\Controllers'
],
function
(
$router
)
{
{
$router
->
resource
(
'settings'
,
'Admin\SettingController'
,
[
'except'
=>
[
'show'
,
'edit'
,
'update'
,
'destroy'
],
'names'
=>
[
$router
->
get
(
'settings/{module}'
,
[
'as'
=>
'dashboard.module.settings'
,
'uses'
=>
'Admin\SettingController@moduleSettings'
]);
$router
->
resource
(
'settings'
,
'Admin\SettingController'
,
[
'except'
=>
[
'show'
,
'edit'
,
'update'
,
'destroy'
,
'create'
],
'names'
=>
[
'index'
=>
'dashboard.setting.index'
,
'index'
=>
'dashboard.setting.index'
,
'store'
=>
'dashboard.setting.store'
'store'
=>
'dashboard.setting.store'
]]);
]]);
...
...
Resources/lang/en/settings.php
0 → 100644
View file @
8ec0f7e0
<?php
return
[
'title'
=>
[
'general settings'
=>
'General settings'
,
'module settings'
=>
'Module settings'
,
]
];
Resources/lang/fr/settings.php
0 → 100644
View file @
8ec0f7e0
<?php
return
[
'title'
=>
[
'general settings'
=>
'Configuration générale'
,
'module settings'
=>
'Configuration des modules'
,
]
];
Resources/views/admin/settings.blade.php
View file @
8ec0f7e0
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<div
class=
"col-md-8"
>
<div
class=
"col-md-8"
>
<div
class=
"box box-info"
>
<div
class=
"box box-info"
>
<div
class=
"box-header"
>
<div
class=
"box-header"
>
<h3
class=
"box-title"
>
General settings
</h3>
<h3
class=
"box-title"
>
{{ trans('setting::settings.title.general settings') }}
</h3>
</div>
</div>
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<div
class=
"nav-tabs-custom"
>
<div
class=
"nav-tabs-custom"
>
...
@@ -25,28 +25,28 @@
...
@@ -25,28 +25,28 @@
<li
class=
"{{ App::getLocale() == 'fr' ? 'active' : '' }}"
><a
href=
"#tab_2-2"
data-toggle=
"tab"
>
{{ trans('core::core.tab.french') }}
</a></li>
<li
class=
"{{ App::getLocale() == 'fr' ? 'active' : '' }}"
><a
href=
"#tab_2-2"
data-toggle=
"tab"
>
{{ trans('core::core.tab.french') }}
</a></li>
</ul>
</ul>
<div
class=
"tab-content"
>
<div
class=
"tab-content"
>
<div
class=
"tab-pane
active
"
id=
"tab_1-1"
>
<div
class=
"tab-pane
{{ App::getLocale() == 'en' ? 'active' : '' }}
"
id=
"tab_1-1"
>
@include('setting::admin.partials.fields', ['lang' => 'en'])
@include('setting::admin.partials.fields', ['lang' => 'en'])
</div>
</div>
<div
class=
"tab-pane"
id=
"tab_2-2"
>
<div
class=
"tab-pane
{{ App::getLocale() == 'fr' ? 'active' : '' }}
"
id=
"tab_2-2"
>
@include('setting::admin.partials.fields', ['lang' => 'fr'])
@include('setting::admin.partials.fields', ['lang' => 'fr'])
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"box-footer"
>
<div
class=
"box-footer"
>
<button
type=
"submit"
class=
"btn btn-primary btn-flat"
>
{{ trans('
user::
button.create') }}
</button>
<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.user.index')}}"
><i
class=
"fa fa-times"
></i>
{{ trans('
user::
button.cancel') }}
</a>
<a
class=
"btn btn-danger pull-right btn-flat"
href=
"{{ URL::route('dashboard.user.index')}}"
><i
class=
"fa fa-times"
></i>
{{ trans('
core::core.
button.cancel') }}
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
<div
class=
"box box-info"
>
<div
class=
"box box-info"
>
<div
class=
"box-header"
><h3
class=
"box-title"
>
Module Settings
</h3></div>
<div
class=
"box-header"
><h3
class=
"box-title"
>
{{ trans('setting::settings.title.module settings') }}
</h3></div>
<div
class=
"box-body"
>
<div
class=
"box-body"
>
<ul>
<ul>
<?php
foreach
(
$modulesWithSettings
as
$module
=>
$settings
)
:
?>
<?php
foreach
(
$modulesWithSettings
as
$module
=>
$settings
)
:
?>
<li><a
href=
""
>
{{ $module }}
</a></li>
<li><a
href=
"
{{ URL::route('dashboard.module.settings', [$module]) }}
"
>
{{ $module }}
</a></li>
<?php
endforeach
;
?>
<?php
endforeach
;
?>
</ul>
</ul>
</div>
</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