X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/0775cd09a152c6e05c100139812f1fc35cb1ac6a..refs/pull/846/head:/resources/views/settings/index.blade.php diff --git a/resources/views/settings/index.blade.php b/resources/views/settings/index.blade.php index 8ad219507..51ca8ccb4 100644 --- a/resources/views/settings/index.blade.php +++ b/resources/views/settings/index.blade.php @@ -1,121 +1,156 @@ -@extends('base') - -@section('content') +@extends('simple-layout') +@section('toolbar') @include('settings/navbar', ['selected' => 'settings']) +@stop -
- -

{{ trans('settings.settings') }}

- -
- {!! csrf_field() !!} - -

{{ trans('settings.app_settings') }}

- -
+@section('body') +
+ +
+
+ BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }} +
+ +
+

@icon('settings') {{ trans('settings.app_settings') }}

+
+ + {!! csrf_field() !!} +
+ +
+
+ +

{{ trans('settings.app_name_desc') }}

+ +
+
+ + @include('components.toggle-switch', ['name' => 'setting-app-name-header', 'value' => setting('app-name-header')]) +
+
+ + @include('components.toggle-switch', ['name' => 'setting-app-public', 'value' => setting('app-public')]) +
+
+ +

{{ trans('settings.app_secure_images_desc') }}

+ @include('components.toggle-switch', ['name' => 'setting-app-secure-images', 'value' => setting('app-secure-images')]) +
+
+ +

{{ trans('settings.app_disable_comments_desc') }}

+ @include('components.toggle-switch', ['name' => 'setting-app-disable-comments', 'value' => setting('app-disable-comments')]) +
+
+ +

{{ trans('settings.app_editor_desc') }}

+ +
+
+ +
+
+ +

{!! trans('settings.app_logo_desc') !!}

+ + @include('components.image-picker', [ + 'resizeHeight' => '43', + 'resizeWidth' => '200', + 'showRemove' => true, + 'defaultImage' => baseUrl('/logo.png'), + 'currentImage' => setting('app-logo'), + 'name' => 'setting-app-logo', + 'imageClass' => 'logo-image', + 'currentId' => false + ]) + +
+
+ +

{!! trans('settings.app_primary_color_desc') !!}

+ + +
+
+ +

{{ trans('settings.app_homepage_desc') }}

+ @include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_default'), 'value' => setting('app-homepage')]) +
+
-
-
- -

{{ trans('settings.app_name_desc') }}

- -
-
- -
-
-
- -
-
-
- -

{{ trans('settings.app_secure_images_desc') }}

-
+
- -

{{ trans('settings.app_editor_desc') }}

- + +

{{ trans('settings.app_custom_html_desc') }}

+
-
-
-
- -

{!! trans('settings.app_logo_desc') !!}

- -
-
- -

{!! trans('settings.app_primary_color_desc') !!}

- - +
+
-
- -
- -
- -

{{ trans('settings.app_custom_html_desc') }}

- +
- -
- -

{{ trans('settings.reg_settings') }}

- -
-
-
- -
-
-
- - has('setting-registration-role')) class="neg" @endif> + @foreach(\BookStack\Role::all() as $role) + - @endforeach - -
-
- -

{{ trans('settings.reg_confirm_email_desc') }}

-
+ {{ $role->display_name }} + + @endforeach + +
+
+ +

{{ trans('settings.reg_confirm_email_desc') }}

+ @include('components.toggle-switch', ['name' => 'setting-registration-confirmation', 'value' => setting('registration-confirmation')]) +
+
+
+
+ +

{!! trans('settings.reg_confirm_restrict_domain_desc') !!}

+ +
+
-
-
-
- -

{!! trans('settings.reg_confirm_restrict_domain_desc') !!}

- + +
+
-
+
+
-
- -
- - BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }} - - -
-
-@include('partials/image-manager', ['imageType' => 'system']) +@include('components.image-manager', ['imageType' => 'system']) +@include('components.entity-selector-popup', ['entityTypes' => 'page']) @stop @@ -128,14 +163,21 @@ var hexVal = '#' + this.color.colors.HEX; var rgb = this.color.colors.RND.rgb; var rgbLightVal = 'rgba('+ [rgb.r, rgb.g, rgb.b, '0.15'].join(',') +')'; + // Set textbox color to hex color code. var isEmpty = $.trim($elm.val()).length === 0; if (!isEmpty) $elm.val(hexVal); $('#setting-app-color-light').val(isEmpty ? '' : rgbLightVal); - // Set page elements to provide preview - $('#header, .image-picker .button').attr('style', 'background-color:'+ hexVal+'!important;'); - $('.faded-small').css('background-color', rgbLightVal); - $('.setting-nav a.selected').css('border-bottom-color', hexVal + '!important'); + + var customStyles = document.getElementById('custom-styles'); + var oldColor = customStyles.getAttribute('data-color'); + var oldColorLight = customStyles.getAttribute('data-color-light'); + + customStyles.innerHTML = customStyles.innerHTML.split(oldColor).join(hexVal); + customStyles.innerHTML = customStyles.innerHTML.split(oldColorLight).join(rgbLightVal); + + customStyles.setAttribute('data-color', hexVal); + customStyles.setAttribute('data-color-light', rgbLightVal); } });