function __construct()
 {
     AssetManager::addStyle('admin::default/plugins/bootstrap/css/bootstrap.min.css');
     AssetManager::addStyle('admin::default/plugins/font-awesome/css/font-awesome.min.css');
     AssetManager::addStyle('admin::default/plugins/ionicons/css/ionicons.min.css');
     AssetManager::addStyle('admin::default/css/base/admin-lte.min.css');
     AssetManager::addStyle('admin::default/css/base/skins/skin-' . \SoaUserSetting::get('theme.skin', config('admintheme.skin')) . '.min.css');
     AssetManager::addScript(route('admin.lang'));
     AssetManager::addScript('admin::default/plugins/jQuery/jQuery-2.1.4.min.js');
     AssetManager::addScript('admin::default/plugins/bootstrap/js/bootstrap.min.js');
     if (\SoaUserSetting::get('theme.fixed_layout', config('admintheme.fixed_layout'))) {
         AssetManager::addScript('admin::default/plugins/jquery-slimscroll/jquery.slimscroll.min.js');
     }
     AssetManager::addScript('admin::default/scripts/base/app.min.js');
     AssetManager::addScript('admin::default/scripts/base/admin.js');
 }
 public function getSettings()
 {
     $skins = ['blue' => 'Blue', 'blue-light' => 'Blue Light', 'black' => 'Black', 'black-light' => 'Black Light', 'purple' => 'Purple', 'purple-light' => 'Purple Light', 'green' => 'Green', 'green-light' => 'Green Light', 'red' => 'Red', 'red-light' => 'Red Light', 'yellow' => 'Yellow', 'yellow-light' => 'Yellow Light'];
     $items = [\FormItem::select('theme.skin', 'Theme Skin')->options($skins)->defaultValue(\SoaUserSetting::get('theme.skin', config('admintheme.skin'))), \FormItem::checkbox('theme.fixed_layout', 'Fixed Layout')->defaultValue(\SoaUserSetting::get('theme.fixed_layout', config('admintheme.fixed_layout')))->help_text('You can\'t use fixed and boxed layouts together.'), \FormItem::checkbox('theme.boxed_layout', 'Boxed Layout')->defaultValue(\SoaUserSetting::get('theme.boxed_layout', config('admintheme.boxed_layout')))->help_text('You can\'t use fixed and boxed layouts together.'), \FormItem::checkbox('theme.sidebar_mini', 'Minimize Sidebar')->defaultValue(\SoaUserSetting::get('theme.sidebar_mini', config('admintheme.sidebar_mini'))), \FormItem::checkbox('theme.toggle_sidebar', 'Toggle Sidebar')->defaultValue(\SoaUserSetting::get('theme.toggle_sidebar', config('admintheme.toggle_sidebar')))->help_text('Toggle the left sidebar\'s state (open or collapse)'), \FormItem::checkbox('theme.sidebar_on_hover', 'Sidebar on Hover')->defaultValue(\SoaUserSetting::get('theme.sidebar_on_hover', config('admintheme.sidebar_on_hover')))->help_text('Let the sidebar mini expand on hover')];
     return $this->render(trans('admin::lang.settings'), view(AdminTemplate::view('pages.admin_settings'), compact('items')));
 }
Beispiel #3
0
            \Request::merge(['theme_sidebar_mini' => false]);
        } else {
            \Request::merge(['theme_sidebar_mini' => true]);
        }
        \SoaUserSetting::set('theme.sidebar_mini', \Request::input('theme_sidebar_mini'), $instance->id);
        \SoaUserSetting::save();
    }), FormItem::custom()->display(function ($instance) {
        $field_params = ['name' => 'theme.toggle_sidebar', 'lang' => null, 'label_size' => null, 'field_size' => null, 'label' => 'Toggle Sidebar', 'required_field' => false, 'value' => \SoaUserSetting::get('theme.toggle_sidebar', config('admintheme.toggle_sidebar'), $instance->id), 'help_text' => 'Toggle the left sidebar\'s state (open or collapse)'];
        return view(AdminTemplate::view('formitem.checkbox'), $field_params)->render();
    })->callback(function ($instance) {
        if (!\Request::has('theme_toggle_sidebar')) {
            \Request::merge(['theme_toggle_sidebar' => false]);
        } else {
            \Request::merge(['theme_toggle_sidebar' => true]);
        }
        \SoaUserSetting::set('theme.toggle_sidebar', \Request::input('theme_toggle_sidebar'), $instance->id);
        \SoaUserSetting::save();
    }), FormItem::custom()->display(function ($instance) {
        $field_params = ['name' => 'theme.sidebar_on_hover', 'lang' => null, 'label_size' => null, 'field_size' => null, 'label' => 'Sidebar on Hover', 'required_field' => false, 'value' => \SoaUserSetting::get('theme.sidebar_on_hover', config('admintheme.sidebar_on_hover'), $instance->id), 'help_text' => 'Let the sidebar mini expand on hover'];
        return view(AdminTemplate::view('formitem.checkbox'), $field_params)->render();
    })->callback(function ($instance) {
        if (!\Request::has('theme_sidebar_on_hover')) {
            \Request::merge(['theme_sidebar_on_hover' => false]);
        } else {
            \Request::merge(['theme_sidebar_on_hover' => true]);
        }
        \Setting::set('theme.sidebar_on_hover', \Request::input('theme_sidebar_on_hover'), $instance->id);
        \SoaUserSetting::save();
    })]]);
    return $form;
});