Commit 45c2c06b authored by Nicolas Widart's avatar Nicolas Widart

Squashed 'Modules/Setting/' changes from 8dd75b2..fb7cc0f

fb7cc0f Update to conform to the new pingpong/Modules package
f1ec5fb Removing the ul element
cc165ce Extract the tab headers

git-subtree-dir: Modules/Setting
git-subtree-split: fb7cc0fe572b813b7ee329c18d0f6f0e8e1fd8f5
parent 632c2d61
...@@ -6,7 +6,6 @@ use Laracasts\Flash\Flash; ...@@ -6,7 +6,6 @@ use Laracasts\Flash\Flash;
use Modules\Core\Http\Controllers\Admin\AdminBaseController; use Modules\Core\Http\Controllers\Admin\AdminBaseController;
use Modules\Setting\Http\Requests\SettingRequest; use Modules\Setting\Http\Requests\SettingRequest;
use Modules\Setting\Repositories\SettingRepository; use Modules\Setting\Repositories\SettingRepository;
use Pingpong\Modules\Module;
class SettingController extends AdminBaseController class SettingController extends AdminBaseController
{ {
...@@ -19,12 +18,12 @@ class SettingController extends AdminBaseController ...@@ -19,12 +18,12 @@ class SettingController extends AdminBaseController
*/ */
private $module; private $module;
public function __construct(SettingRepository $setting, Module $module) public function __construct(SettingRepository $setting)
{ {
parent::__construct(); parent::__construct();
$this->setting = $setting; $this->setting = $setting;
$this->module = $module; $this->module = app('modules');
} }
public function index() public function index()
......
...@@ -139,8 +139,8 @@ class EloquentSettingRepository extends EloquentBaseRepository implements Settin ...@@ -139,8 +139,8 @@ class EloquentSettingRepository extends EloquentBaseRepository implements Settin
$modulesWithSettings = []; $modulesWithSettings = [];
foreach ($modules as $module) { foreach ($modules as $module) {
if ($moduleSettings = Config::get(strtolower($module) . "::settings")) { if ($moduleSettings = Config::get(strtolower($module->getName()) . "::settings")) {
$modulesWithSettings[$module] = $moduleSettings; $modulesWithSettings[$module->getName()] = $moduleSettings;
} }
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
@stop @stop
@section('styles') @section('styles')
<link href="{!! Module::asset('core', 'css/vendor/iCheck/flat/blue.css') !!}" rel="stylesheet" type="text/css" /> <link href="{!! Module::asset('core:css/vendor/iCheck/flat/blue.css') !!}" rel="stylesheet" type="text/css" />
@stop @stop
@section('content') @section('content')
...@@ -49,15 +49,7 @@ ...@@ -49,15 +49,7 @@
<?php if ($translatableSettings): ?> <?php if ($translatableSettings): ?>
<div class="box-body"> <div class="box-body">
<div class="nav-tabs-custom"> <div class="nav-tabs-custom">
<ul class="nav nav-tabs"> @include('core::partials.form-tab-headers')
<?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"> <div class="tab-content">
<?php $i = 0; ?> <?php $i = 0; ?>
<?php foreach(LaravelLocalization::getSupportedLocales() as $locale => $language): ?> <?php foreach(LaravelLocalization::getSupportedLocales() as $locale => $language): ?>
......
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