mirror of
https://github.com/CachetHQ/Cachet.git
synced 2025-04-22 00:11:59 +02:00
Custom headers and footers! Closes #1594
This commit is contained in:
parent
83991c132a
commit
5fa698f5b7
@ -39,6 +39,8 @@ class AppComposer
|
||||
$view->withAppLocale(Config::get('setting.app_locale'));
|
||||
$view->withAppStylesheet(Config::get('setting.stylesheet'));
|
||||
$view->withAppUrl(Config::get('app.url'));
|
||||
$view->withAppHeader(Config::get('setting.header'));
|
||||
$view->withAppFooter(Config::get('setting.footer'));
|
||||
|
||||
$view->withAppName($name = Config::get('setting.app_name'));
|
||||
$view->withShowSupport($support = Config::get('setting.show_support'));
|
||||
|
@ -56,6 +56,12 @@ class SettingsController extends Controller
|
||||
'icon' => 'ion-paintbucket',
|
||||
'active' => false,
|
||||
],
|
||||
'customization' => [
|
||||
'title' => trans('dashboard.settings.customization.customization'),
|
||||
'url' => route('dashboard.settings.customization'),
|
||||
'icon' => 'ion-wand',
|
||||
'active' => false,
|
||||
],
|
||||
'localization' => [
|
||||
'title' => trans('dashboard.settings.localization.localization'),
|
||||
'url' => route('dashboard.settings.localization'),
|
||||
@ -137,6 +143,22 @@ class SettingsController extends Controller
|
||||
->withSubMenu($this->subMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the settings customization view.
|
||||
*
|
||||
* @return \Illuminate\View\View
|
||||
*/
|
||||
public function showCustomizationView()
|
||||
{
|
||||
$this->subMenu['customization']['active'] = true;
|
||||
|
||||
Session::flash('redirect_to', $this->subMenu['customization']['url']);
|
||||
|
||||
return View::make('dashboard.settings.customization')
|
||||
->withPageTitle(trans('dashboard.settings.customization.customization').' - '.trans('dashboard.dashboard'))
|
||||
->withSubMenu($this->subMenu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the settings theme view.
|
||||
*
|
||||
|
@ -207,6 +207,10 @@ class DashboardRoutes
|
||||
'as' => 'stylesheet',
|
||||
'uses' => 'SettingsController@showStylesheetView',
|
||||
]);
|
||||
$router->get('customization', [
|
||||
'as' => 'customization',
|
||||
'uses' => 'SettingsController@showCustomizationView',
|
||||
]);
|
||||
$router->post('/', 'SettingsController@postSettings');
|
||||
});
|
||||
|
||||
|
@ -199,6 +199,11 @@ return [
|
||||
'localization' => [
|
||||
'localization' => 'Localization',
|
||||
],
|
||||
'customization' => [
|
||||
'customization' => 'Customization',
|
||||
'header' => 'Custom Header HTML',
|
||||
'footer' => 'Custom Footer HTML',
|
||||
],
|
||||
'security' => [
|
||||
'security' => 'Security',
|
||||
'two-factor' => 'Users without two-factor authentication',
|
||||
|
51
resources/views/dashboard/settings/customization.blade.php
Normal file
51
resources/views/dashboard/settings/customization.blade.php
Normal file
@ -0,0 +1,51 @@
|
||||
@extends('layout.dashboard')
|
||||
|
||||
@section('content')
|
||||
<div class="content-panel">
|
||||
@if(isset($sub_menu))
|
||||
@include('dashboard.partials.sub-sidebar')
|
||||
@endif
|
||||
<div class="content-wrapper">
|
||||
<div class="header sub-header" id="application-setup">
|
||||
<span class="uppercase">
|
||||
{{ trans('dashboard.settings.customization.customization') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<form id="settings-form" name="SettingsForm" class="form-vertical" role="form" action="/dashboard/settings" method="POST" enctype="multipart/form-data">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}">
|
||||
@include('dashboard.partials.errors')
|
||||
<fieldset>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('dashboard.settings.customization.header') }}</label>
|
||||
<textarea name="header" class="form-control" rows="10">{{ Config::get('setting.header') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<label>{{ trans('dashboard.settings.customization.footer') }}</label>
|
||||
<textarea name="footer" class="form-control" rows="10">{{ Config::get('setting.footer') }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-success">{{ trans('forms.save') }}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
@ -1,3 +1,6 @@
|
||||
@if($app_header)
|
||||
{!! $app_header !!}
|
||||
@else
|
||||
@if($app_banner)
|
||||
<div @if($app_banner_style_full_width)class="app-banner"@endif>
|
||||
<div class="container">
|
||||
@ -13,3 +16,4 @@
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
@ -1,3 +1,6 @@
|
||||
@if($app_footer)
|
||||
{!! $app_footer !!}
|
||||
@else
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@ -34,5 +37,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
@endif
|
||||
|
||||
@include("partials.analytics")
|
||||
|
Loading…
x
Reference in New Issue
Block a user