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;
use Modules\Core\Http\Controllers\Admin\AdminBaseController;
use Modules\Setting\Http\Requests\SettingRequest;
use Modules\Setting\Repositories\SettingRepository;
use Pingpong\Modules\Module;
class SettingController extends AdminBaseController
{
......@@ -19,12 +18,12 @@ class SettingController extends AdminBaseController
*/
private $module;
public function __construct(SettingRepository $setting, Module $module)
public function __construct(SettingRepository $setting)
{
parent::__construct();
$this->setting = $setting;
$this->module = $module;
$this->module = app('modules');
}
public function index()
......
......@@ -139,8 +139,8 @@ class EloquentSettingRepository extends EloquentBaseRepository implements Settin
$modulesWithSettings = [];
foreach ($modules as $module) {
if ($moduleSettings = Config::get(strtolower($module) . "::settings")) {
$modulesWithSettings[$module] = $moduleSettings;
if ($moduleSettings = Config::get(strtolower($module->getName()) . "::settings")) {
$modulesWithSettings[$module->getName()] = $moduleSettings;
}
}
......
......@@ -12,7 +12,7 @@
@stop
@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
@section('content')
......@@ -49,15 +49,7 @@
<?php if ($translatableSettings): ?>
<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>
@include('core::partials.form-tab-headers')
<div class="tab-content">
<?php $i = 0; ?>
<?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