mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-23 18:52:25 +08:00
Started the migration of the setting views
This commit is contained in:
parent
20988962fe
commit
880d4f35da
1
resources/assets/icons/check.svg
Normal file
1
resources/assets/icons/check.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.86 4.118l-9.733 9.609-3.951-3.995-2.98 2.966 6.93 7.184L21.805 7.217z"/></svg>
|
After Width: | Height: | Size: 151 B |
|
@ -3,15 +3,15 @@ class ToggleSwitch {
|
|||
|
||||
constructor(elem) {
|
||||
this.elem = elem;
|
||||
this.input = elem.querySelector('input');
|
||||
this.input = elem.querySelector('input[type=hidden]');
|
||||
this.checkbox = elem.querySelector('input[type=checkbox]');
|
||||
|
||||
this.elem.onclick = this.onClick.bind(this);
|
||||
this.checkbox.addEventListener('change', this.onClick.bind(this));
|
||||
}
|
||||
|
||||
onClick(event) {
|
||||
let checked = this.input.value !== 'true';
|
||||
let checked = this.checkbox.checked;
|
||||
this.input.value = checked ? 'true' : 'false';
|
||||
checked ? this.elem.classList.add('active') : this.elem.classList.remove('active');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -31,7 +31,8 @@ $button-border-radius: 2px;
|
|||
font-size: $fs-m;
|
||||
line-height: 1.4em;
|
||||
padding: $-xs*1.3 $-m;
|
||||
margin: $-xs $-xs $-xs 0;
|
||||
margin-top: $-xs;
|
||||
margin-bottom: $-xs;
|
||||
display: inline-block;
|
||||
border: none;
|
||||
font-weight: 400;
|
||||
|
@ -62,6 +63,10 @@ $button-border-radius: 2px;
|
|||
}
|
||||
}
|
||||
|
||||
.button + .button {
|
||||
margin-left: $-s;
|
||||
}
|
||||
|
||||
.button.outline {
|
||||
background-color: transparent;
|
||||
color: #888;
|
||||
|
|
|
@ -139,64 +139,68 @@ input[type=date] {
|
|||
}
|
||||
|
||||
.toggle-switch {
|
||||
display: inline-block;
|
||||
background-color: #BBB;
|
||||
width: 36px;
|
||||
height: 14px;
|
||||
border-radius: 7px;
|
||||
position: relative;
|
||||
transition: all ease-in-out 120ms;
|
||||
cursor: pointer;
|
||||
user-select: none;
|
||||
&:after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: relative;
|
||||
left: 0;
|
||||
margin-top: -3px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 50%;
|
||||
background-color: #fafafa;
|
||||
border: 1px solid #CCC;
|
||||
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);
|
||||
transition: all ease-in-out 120ms;
|
||||
}
|
||||
&.active {
|
||||
background-color: rgba($positive, 0.4);
|
||||
&:after {
|
||||
left: 16px;
|
||||
background-color: $positive;
|
||||
border: darken($positive, 20%);
|
||||
display: inline-grid;
|
||||
grid-template-columns: (16px + $-s) 1fr;
|
||||
align-items: center;
|
||||
margin: $-m 0;
|
||||
.custom-checkbox {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 2px;
|
||||
display: inline-block;
|
||||
border: 2px solid #999;
|
||||
overflow: hidden;
|
||||
fill: #888;
|
||||
.svg-icon {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
bottom: auto;
|
||||
top: -1.5px;
|
||||
left: 0;
|
||||
transition: transform ease-in-out 120ms;
|
||||
transform: scale(0);
|
||||
transform-origin: center center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.toggle-switch-checkbox {
|
||||
display: none;
|
||||
}
|
||||
input:checked + .toggle-switch {
|
||||
background-color: rgba($positive, 0.4);
|
||||
&:after {
|
||||
left: 16px;
|
||||
background-color: $positive;
|
||||
border: darken($positive, 20%);
|
||||
input[type=checkbox] {
|
||||
display: none;
|
||||
}
|
||||
input[type=checkbox]:checked + .custom-checkbox .svg-icon {
|
||||
transform: scale(1);
|
||||
}
|
||||
.custom-checkbox:hover {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
}
|
||||
|
||||
.form-group {
|
||||
margin-bottom: $-s;
|
||||
textarea {
|
||||
display: block;
|
||||
width: 100%;
|
||||
min-height: 64px;
|
||||
}
|
||||
|
||||
.setting-list > div {
|
||||
border-bottom: 1px solid #DDD;
|
||||
padding: $-xl 0;
|
||||
&:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
.setting-list-label {
|
||||
color: #444;
|
||||
font-size: 1rem;
|
||||
}
|
||||
.setting-list-label + p.small {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.simple-code-input {
|
||||
background-color: #F8F8F8;
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
min-height: 100px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.form-group {
|
||||
|
|
|
@ -60,6 +60,9 @@ body.flexbox {
|
|||
&.auto-height {
|
||||
min-height: 0;
|
||||
}
|
||||
&.fill-width {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.tri-layout-container {
|
||||
|
@ -211,7 +214,6 @@ div[class^="col-"] img {
|
|||
&.large-gap {
|
||||
grid-column-gap: $-xl;
|
||||
grid-row-gap: $-xl;
|
||||
justify-items: start;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -272,6 +274,12 @@ div[class^="col-"] img {
|
|||
.grid.left-focus, .grid.right-focus {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.grid.right-focus.reverse-collapse > *:nth-child(2) {
|
||||
order: 0;
|
||||
}
|
||||
.grid.right-focus.reverse-collapse > *:nth-child(1) {
|
||||
order: 1;
|
||||
}
|
||||
}
|
||||
|
||||
@include smaller-than($s) {
|
||||
|
|
|
@ -396,3 +396,18 @@ ul.pagination {
|
|||
padding: $-m 0;
|
||||
}
|
||||
|
||||
.active-link-list {
|
||||
a {
|
||||
display: inline-block;
|
||||
padding: $-s;
|
||||
}
|
||||
a:not(.active) {
|
||||
color: #444;
|
||||
fill: #444;
|
||||
}
|
||||
a:hover {
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 3px;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
|
@ -19,13 +19,13 @@ table {
|
|||
|
||||
table.table {
|
||||
width: 100%;
|
||||
tr {
|
||||
border-bottom: 1px solid #DDD;
|
||||
tr td, tr th {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
||||
}
|
||||
th, td {
|
||||
text-align: left;
|
||||
border: none;
|
||||
padding: $-xs $-xs;
|
||||
padding: $-s $-s;
|
||||
vertical-align: middle;
|
||||
margin: 0;
|
||||
}
|
||||
|
@ -44,6 +44,9 @@ table.table {
|
|||
td.actions {
|
||||
overflow: visible;
|
||||
}
|
||||
a {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
table.no-style {
|
||||
|
|
|
@ -83,6 +83,10 @@ h5, h6 {
|
|||
font-size: 2rem;
|
||||
}
|
||||
|
||||
h2.list-heading {
|
||||
font-size: 1.333rem;
|
||||
}
|
||||
|
||||
/*
|
||||
* Link styling
|
||||
*/
|
||||
|
|
|
@ -14,8 +14,8 @@ return [
|
|||
// App Settings
|
||||
'app_settings' => 'App Settings',
|
||||
'app_name' => 'Application name',
|
||||
'app_name_desc' => 'This name is shown in the header and any emails.',
|
||||
'app_name_header' => 'Show Application name in header?',
|
||||
'app_name_desc' => 'This name is shown in the header and in any system-sent emails.',
|
||||
'app_name_header' => 'Show name in header',
|
||||
'app_public_viewing' => 'Allow public viewing?',
|
||||
'app_secure_images' => 'Enable higher security image uploads?',
|
||||
'app_secure_images_desc' => 'For performance reasons, all images are public. This option adds a random, hard-to-guess string in front of image urls. Ensure directory indexes are not enabled to prevent easy access.',
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
<div toggle-switch="{{$name}}" class="toggle-switch @if($value) active @endif">
|
||||
<label toggle-switch="{{$name}}" class="toggle-switch">
|
||||
<input type="hidden" name="{{$name}}" value="{{$value?'true':'false'}}"/>
|
||||
<div class="switch-handle"></div>
|
||||
</div>
|
||||
<input type="checkbox" @if($value) checked="checked" @endif>
|
||||
<span class="custom-checkbox ">@icon('check')</span>
|
||||
<span class="label">{{ $label ?? '' }}</span> {{-- TODO - remove default operataor backup --}}
|
||||
</label>
|
|
@ -8,6 +8,8 @@
|
|||
@include('form/checkbox', ['name' => 'restricted', 'label' => trans('entities.permissions_enable')])
|
||||
</div>
|
||||
|
||||
{{--TODO - Add global and role "Select All" options--}}
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{ trans('common.role') }}</th>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
{{--TODO - Make custom--}}
|
||||
<label>
|
||||
<input value="true" id="{{$name}}[{{$role->id}}][{{$action}}]" type="checkbox" name="{{$name}}[{{$role->id}}][{{$action}}]"
|
||||
@if(isset($model) && $model->hasRestriction($role->id, $action)) checked="checked" @endif>
|
||||
|
|
|
@ -1,85 +1,138 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'settings'])
|
||||
@stop
|
||||
{{--TODO - Reorder--}}
|
||||
|
||||
@section('body')
|
||||
<div class="container small">
|
||||
<div class="container small">
|
||||
|
||||
<div class="text-right text-muted container">
|
||||
<br>
|
||||
BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<h3>@icon('settings') {{ trans('settings.app_settings') }}</h3>
|
||||
<div class="body">
|
||||
<div class="grid left-focus v-center">
|
||||
<div class="py-m">
|
||||
@include('settings/navbar', ['selected' => 'settings'])
|
||||
</div>
|
||||
<div class="text-right mb-l px-m">
|
||||
<br>
|
||||
BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap">
|
||||
<h2 class="list-heading">{{ trans('settings.app_settings') }}</h2>
|
||||
<form action="{{ baseUrl("/settings") }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<div class="row">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="setting-app-name">{{ trans('settings.app_name') }}</label>
|
||||
<div class="setting-list">
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label for="setting-app-name" class="setting-list-label">{{ trans('settings.app_name') }}</label>
|
||||
<p class="small">{{ trans('settings.app_name_desc') }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
|
||||
@include('components.toggle-switch', [
|
||||
'name' => 'setting-app-name-header',
|
||||
'value' => setting('app-name-header'),
|
||||
'label' => trans('settings.app_name_header'),
|
||||
])
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{ trans('settings.app_name_header') }}</label>
|
||||
@include('components.toggle-switch', ['name' => 'setting-app-name-header', 'value' => setting('app-name-header')])
|
||||
</div>
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label for="setting-app-public" class="setting-list-label">{{ trans('settings.app_public_viewing') }}</label>
|
||||
{{--<p class="small">{{ trans('settings.app_name_desc') }}</p>--}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="setting-app-public">{{ trans('settings.app_public_viewing') }}</label>
|
||||
@include('components.toggle-switch', ['name' => 'setting-app-public', 'value' => setting('app-public')])
|
||||
<div>
|
||||
@include('components.toggle-switch', [
|
||||
'name' => 'setting-app-public',
|
||||
'value' => setting('app-public'),
|
||||
'label' => trans('settings.app_public_viewing'),
|
||||
])
|
||||
{{--TODO - Text --}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{ trans('settings.app_secure_images') }}</label>
|
||||
</div>
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.app_secure_images') }}</label>
|
||||
<p class="small">{{ trans('settings.app_secure_images_desc') }}</p>
|
||||
@include('components.toggle-switch', ['name' => 'setting-app-secure-images', 'value' => setting('app-secure-images')])
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>{{ trans('settings.app_disable_comments') }}</label>
|
||||
<div>
|
||||
@include('components.toggle-switch', [
|
||||
'name' => 'setting-app-secure-images',
|
||||
'value' => setting('app-secure-images'),
|
||||
'label' => trans('settings.app_secure_images'),
|
||||
])
|
||||
{{--TODO - Text --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.app_disable_comments') }}</label>
|
||||
<p class="small">{{ trans('settings.app_disable_comments_desc') }}</p>
|
||||
@include('components.toggle-switch', ['name' => 'setting-app-disable-comments', 'value' => setting('app-disable-comments')])
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="setting-app-editor">{{ trans('settings.app_editor') }}</label>
|
||||
<div>
|
||||
@include('components.toggle-switch', [
|
||||
'name' => 'setting-app-disable-comments',
|
||||
'value' => setting('app-disable-comments'),
|
||||
'label' => trans('settings.app_disable_comments'),
|
||||
])
|
||||
{{--TODO - Text --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.app_editor') }}</label>
|
||||
<p class="small">{{ trans('settings.app_editor_desc') }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<select name="setting-app-editor" id="setting-app-editor">
|
||||
<option @if(setting('app-editor') === 'wysiwyg') selected @endif value="wysiwyg">WYSIWYG</option>
|
||||
<option @if(setting('app-editor') === 'markdown') selected @endif value="markdown">Markdown</option>
|
||||
</select>
|
||||
{{--TODO - Text --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group" id="logo-control">
|
||||
<label for="setting-app-logo">{{ trans('settings.app_logo') }}</label>
|
||||
<p class="small">{!! trans('settings.app_logo_desc') !!}</p>
|
||||
|
||||
@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
|
||||
])
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.app_logo') }}</label>
|
||||
<p class="small">{{ trans('settings.app_logo_desc') }}</p>
|
||||
</div>
|
||||
<div class="form-group" id="color-control">
|
||||
<label for="setting-app-color">{{ trans('settings.app_primary_color') }}</label>
|
||||
<div>
|
||||
@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
|
||||
])
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.app_primary_color') }}</label>
|
||||
<p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" value="{{ setting('app-color') }}" name="setting-app-color" id="setting-app-color" placeholder="#0288D1">
|
||||
<input type="hidden" value="{{ setting('app-color-light') }}" name="setting-app-color-light" id="setting-app-color-light">
|
||||
</div>
|
||||
<div homepage-control class="form-group" id="homepage-control">
|
||||
<label for="setting-app-homepage">{{ trans('settings.app_homepage') }}</label>
|
||||
<p class="small">{{ trans('settings.app_homepage_desc') }}</p>
|
||||
</div>
|
||||
|
||||
<div homepage-control id="homepage-control" class="grid half large-gap">
|
||||
<div>
|
||||
<label for="setting-app-homepage" class="setting-list-label">{{ trans('settings.app_homepage') }}</label>
|
||||
<p class="small">{{ trans('settings.app_homepage_desc') }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<select name="setting-app-homepage-type" id="setting-app-homepage-type">
|
||||
<option @if(setting('app-homepage-type') === 'default') selected @endif value="default">{{ trans('common.default') }}</option>
|
||||
<option @if(setting('app-homepage-type') === 'books') selected @endif value="books">{{ trans('entities.books') }}</option>
|
||||
|
@ -87,45 +140,56 @@
|
|||
<option @if(setting('app-homepage-type') === 'page') selected @endif value="page">{{ trans('entities.pages_specific') }}</option>
|
||||
</select>
|
||||
|
||||
<br><br>
|
||||
|
||||
<div page-picker-container style="display: none;">
|
||||
<div page-picker-container style="display: none;" class="mt-m">
|
||||
@include('components.page-picker', ['name' => 'setting-app-homepage', 'placeholder' => trans('settings.app_homepage_select'), 'value' => setting('app-homepage')])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="setting-app-custom-head">{{ trans('settings.app_custom_html') }}</label>
|
||||
<p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
|
||||
<textarea class="simple-code-input" name="setting-app-custom-head" id="setting-app-custom-head">{{ setting('app-custom-head', '') }}</textarea>
|
||||
<div>
|
||||
<label for="setting-app-custom-head" class="setting-list-label">{{ trans('settings.app_custom_html') }}</label>
|
||||
<p class="small">{{ trans('settings.app_custom_html_desc') }}</p>
|
||||
<textarea name="setting-app-custom-head" id="setting-app-custom-head" class="simple-code-input mt-m">{{ setting('app-custom-head', '') }}</textarea>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="button pos">{{ trans('settings.settings_save') }}</button>
|
||||
<button type="submit" class="button primary">{{ trans('settings.settings_save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<div class="card">
|
||||
<h3>@icon('users-add') {{ trans('settings.reg_settings') }}</h3>
|
||||
<div class="body">
|
||||
<div class="card content-wrap">
|
||||
<h2 class="list-heading">{{ trans('settings.reg_settings') }}</h2>
|
||||
<form action="{{ baseUrl("/settings") }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="setting-registration-enabled">{{ trans('settings.reg_allow') }}</label>
|
||||
@include('components.toggle-switch', ['name' => 'setting-registration-enabled', 'value' => setting('registration-enabled')])
|
||||
<div class="setting-list">
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.reg_allow') }}</label>
|
||||
{{--<p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>--}}{{-- TODO--}}
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
|
||||
<div>
|
||||
@include('components.toggle-switch', [
|
||||
'name' => 'setting-registration-enabled',
|
||||
'value' => setting('registration-enabled'),
|
||||
'label' => trans('settings.reg_allow')
|
||||
])
|
||||
{{--TODO - label --}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label for="setting-registration-role" class="setting-list-label">{{ trans('settings.reg_default_role') }}</label>
|
||||
{{--<p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>--}}{{-- TODO--}}
|
||||
</div>
|
||||
<div>
|
||||
<select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
|
||||
@foreach(\BookStack\Auth\Role::all() as $role)
|
||||
<option value="{{$role->id}}" data-role-name="{{ $role->name }}"
|
||||
|
@ -136,37 +200,48 @@
|
|||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="setting-registration-confirmation">{{ trans('settings.reg_confirm_email') }}</label>
|
||||
</div>
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.reg_confirm_email') }}</label>
|
||||
<p class="small">{{ trans('settings.reg_confirm_email_desc') }}</p>
|
||||
@include('components.toggle-switch', ['name' => 'setting-registration-confirmation', 'value' => setting('registration-confirmation')])
|
||||
</div>
|
||||
<div>
|
||||
@include('components.toggle-switch', [
|
||||
'name' => 'setting-registration-confirmation',
|
||||
'value' => setting('registration-confirmation'),
|
||||
'label' => trans('settings.reg_confirm_email')
|
||||
])
|
||||
{{--TODO - label --}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<label for="setting-registration-restrict">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
|
||||
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<label for="setting-registration-restrict" class="setting-list-label">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
|
||||
<p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
|
||||
</div>
|
||||
<div>
|
||||
<input type="text" id="setting-registration-restrict" name="setting-registration-restrict" placeholder="{{ trans('settings.reg_confirm_restrict_domain_placeholder') }}" value="{{ setting('registration-restrict', '') }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right">
|
||||
<button type="submit" class="button pos">{{ trans('settings.settings_save') }}</button>
|
||||
<button type="submit" class="button primary">{{ trans('settings.settings_save') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
@include('components.image-manager', ['imageType' => 'system'])
|
||||
@include('components.entity-selector-popup', ['entityTypes' => 'page'])
|
||||
|
||||
@include('components.image-manager', ['imageType' => 'system'])
|
||||
@include('components.entity-selector-popup', ['entityTypes' => 'page'])
|
||||
@stop
|
||||
|
||||
@section('scripts')
|
||||
{{--TODO - Merge into JS--}}
|
||||
<script src="{{ baseUrl("/libs/jq-color-picker/tiny-color-picker.min.js?version=1.0.0") }}"></script>
|
||||
<script type="text/javascript">
|
||||
$('#setting-app-color').colorPicker({
|
||||
|
|
|
@ -1,46 +1,45 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'maintenance'])
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
<div class="container small">
|
||||
|
||||
<div class="text-right text-muted container">
|
||||
<br>
|
||||
BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
|
||||
<div class="grid left-focus v-center">
|
||||
<div class="py-m">
|
||||
@include('settings/navbar', ['selected' => 'maintenance'])
|
||||
</div>
|
||||
<div class="text-right mb-l px-m">
|
||||
<br>
|
||||
BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="card" id="image-cleanup">
|
||||
<h3>@icon('images') {{ trans('settings.maint_image_cleanup') }}</h3>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<p class="small muted">{{ trans('settings.maint_image_cleanup_desc') }}</p>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<form method="POST" action="{{ baseUrl('/settings/maintenance/cleanup-images') }}">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<div>
|
||||
@if(session()->has('cleanup-images-warning'))
|
||||
<p class="text neg">
|
||||
{{ session()->get('cleanup-images-warning') }}
|
||||
</p>
|
||||
<input type="hidden" name="ignore_revisions" value="{{ session()->getOldInput('ignore_revisions', 'false') }}">
|
||||
<input type="hidden" name="confirm" value="true">
|
||||
@else
|
||||
<label>
|
||||
<input type="checkbox" name="ignore_revisions" value="true">
|
||||
{{ trans('settings.maint_image_cleanup_ignore_revisions') }}
|
||||
</label>
|
||||
@endif
|
||||
</div>
|
||||
<button class="button outline">{{ trans('settings.maint_image_cleanup_run') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
<div id="image-cleanup" class="card content-wrap auto-height">
|
||||
<h2 class="list-heading">{{ trans('settings.maint_image_cleanup') }}</h2>
|
||||
<div class="grid half large-gap">
|
||||
<div>
|
||||
<p class="small muted">{{ trans('settings.maint_image_cleanup_desc') }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<form method="POST" action="{{ baseUrl('/settings/maintenance/cleanup-images') }}">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<div>
|
||||
@if(session()->has('cleanup-images-warning'))
|
||||
<p class="text neg">
|
||||
{{ session()->get('cleanup-images-warning') }}
|
||||
</p>
|
||||
<input type="hidden" name="ignore_revisions" value="{{ session()->getOldInput('ignore_revisions', 'false') }}">
|
||||
<input type="hidden" name="confirm" value="true">
|
||||
@else
|
||||
<label>
|
||||
<input type="checkbox" name="ignore_revisions" value="true">
|
||||
{{ trans('settings.maint_image_cleanup_ignore_revisions') }}
|
||||
</label>
|
||||
@endif
|
||||
</div>
|
||||
<button class="button outline">{{ trans('settings.maint_image_cleanup_run') }}</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
|
||||
<div class="col-md-12 setting-nav nav-tabs">
|
||||
<div class="active-link-list">
|
||||
@if($currentUser->can('settings-manage'))
|
||||
<a href="{{ baseUrl('/settings') }}" @if($selected == 'settings') class="selected text-button" @endif>@icon('settings'){{ trans('settings.settings') }}</a>
|
||||
<a href="{{ baseUrl('/settings/maintenance') }}" @if($selected == 'maintenance') class="selected text-button" @endif>@icon('spanner'){{ trans('settings.maint') }}</a>
|
||||
<a href="{{ baseUrl('/settings') }}" @if($selected == 'settings') class="active" @endif>@icon('settings'){{ trans('settings.settings') }}</a>
|
||||
<a href="{{ baseUrl('/settings/maintenance') }}" @if($selected == 'maintenance') class="active" @endif>@icon('spanner'){{ trans('settings.maint') }}</a>
|
||||
@endif
|
||||
@if($currentUser->can('users-manage'))
|
||||
<a href="{{ baseUrl('/settings/users') }}" @if($selected == 'users') class="selected text-button" @endif>@icon('users'){{ trans('settings.users') }}</a>
|
||||
<a href="{{ baseUrl('/settings/users') }}" @if($selected == 'users') class="active" @endif>@icon('users'){{ trans('settings.users') }}</a>
|
||||
@endif
|
||||
@if($currentUser->can('user-roles-manage'))
|
||||
<a href="{{ baseUrl('/settings/roles') }}" @if($selected == 'roles') class="selected text-button" @endif>@icon('lock-open'){{ trans('settings.roles') }}</a>
|
||||
<a href="{{ baseUrl('/settings/roles') }}" @if($selected == 'roles') class="active" @endif>@icon('lock-open'){{ trans('settings.roles') }}</a>
|
||||
@endif
|
||||
</div>
|
|
@ -1,17 +1,16 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'roles'])
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
|
||||
<form action="{{ baseUrl("/settings/roles/new") }}" method="POST">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@include('settings/roles/form', ['title' => trans('settings.role_create'), 'icon' => 'plus'])
|
||||
</div>
|
||||
<div class="container">
|
||||
|
||||
<div class="py-m">
|
||||
@include('settings.navbar', ['selected' => 'roles'])
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form action="{{ baseUrl("/settings/roles/new") }}" method="POST">
|
||||
@include('settings.roles.form', ['title' => trans('settings.role_create')])
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -1,35 +1,39 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'roles'])
|
||||
@stop
|
||||
{{--TODO - Looks strange--}}
|
||||
|
||||
@section('body')
|
||||
<div class="container small">
|
||||
<p> </p>
|
||||
<div class="card">
|
||||
<h3>@icon('delete') {{ trans('settings.role_delete') }}</h3>
|
||||
<div class="body">
|
||||
<p>{{ trans('settings.role_delete_confirm', ['roleName' => $role->display_name]) }}</p>
|
||||
|
||||
<form action="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
<div class="py-m">
|
||||
@include('settings.navbar', ['selected' => 'roles'])
|
||||
</div>
|
||||
|
||||
@if($role->users->count() > 0)
|
||||
<div class="form-group">
|
||||
<p>{{ trans('settings.role_delete_users_assigned', ['userCount' => $role->users->count()]) }}</p>
|
||||
@include('form/role-select', ['options' => $roles, 'name' => 'migration_role_id'])
|
||||
</div>
|
||||
@endif
|
||||
<div class="card content-wrap auto-height">
|
||||
<h1 class="list-heading"> {{ trans('settings.role_delete') }}</h1>
|
||||
|
||||
<p class="text-neg">{{ trans('settings.role_delete_sure') }}</p>
|
||||
<p>{{ trans('settings.role_delete_confirm', ['roleName' => $role->display_name]) }}</p>
|
||||
|
||||
<form action="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" method="POST">
|
||||
{!! csrf_field() !!}
|
||||
<input type="hidden" name="_method" value="DELETE">
|
||||
|
||||
@if($role->users->count() > 0)
|
||||
<div class="form-group">
|
||||
<a href="{{ baseUrl("/settings/roles/{$role->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
||||
<button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
|
||||
<p>{{ trans('settings.role_delete_users_assigned', ['userCount' => $role->users->count()]) }}</p>
|
||||
@include('form/role-select', ['options' => $roles, 'name' => 'migration_role_id'])
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<p class="text-neg">
|
||||
<strong>{{ trans('settings.role_delete_sure') }}</strong>
|
||||
</p>
|
||||
|
||||
<div class="form-group text-right">
|
||||
<a href="{{ baseUrl("/settings/roles/{$role->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
||||
<button type="submit" class="button primary">{{ trans('common.confirm') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'roles'])
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
|
||||
<form action="{{ baseUrl("/settings/roles/{$role->id}") }}" method="POST">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
@include('settings/roles/form', ['model' => $role, 'title' => trans('settings.role_edit'), 'icon' => 'edit'])
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="py-m">
|
||||
@include('settings.navbar', ['selected' => 'roles'])
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form action="{{ baseUrl("/settings/roles/{$role->id}") }}" method="POST">
|
||||
<input type="hidden" name="_method" value="PUT">
|
||||
@include('settings/roles/form', ['model' => $role, 'title' => trans('settings.role_edit'), 'icon' => 'edit'])
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@stop
|
||||
|
|
|
@ -1,12 +1,19 @@
|
|||
{!! csrf_field() !!}
|
||||
|
||||
<div class="col-md-9">
|
||||
<div class="card">
|
||||
<h3>@icon($icon) {{$title}}</h3>
|
||||
<div class="body">
|
||||
<div class="row">
|
||||
<div class="col-md-5">
|
||||
<h5>{{ trans('settings.role_details') }}</h5>
|
||||
{{--TODO - Add select-all shortcuts--}}
|
||||
|
||||
<div class="grid left-focus large-gap">
|
||||
|
||||
<div class="card content-wrap fill-width">
|
||||
<h1 class="list-heading">{{ $title }}</h1>
|
||||
|
||||
<div class="setting-list">
|
||||
|
||||
<div class="grid half">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.role_details') }}</label>
|
||||
</div>
|
||||
<div>
|
||||
<div class="form-group">
|
||||
<label for="name">{{ trans('settings.role_name') }}</label>
|
||||
@include('form/text', ['name' => 'display_name'])
|
||||
|
@ -22,162 +29,168 @@
|
|||
@include('form/text', ['name' => 'external_auth_id'])
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h5>{{ trans('settings.role_system') }}</h5>
|
||||
<div class="grid half">
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.role_system') }}</label>
|
||||
</div>
|
||||
<div>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'users-manage']) {{ trans('settings.role_manage_users') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'user-roles-manage']) {{ trans('settings.role_manage_roles') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'restrictions-manage-all']) {{ trans('settings.role_manage_entity_permissions') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'restrictions-manage-own']) {{ trans('settings.role_manage_own_entity_permissions') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'settings-manage']) {{ trans('settings.role_manage_settings') }}</label>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
<h5>{{ trans('settings.role_asset') }}</h5>
|
||||
<p>{{ trans('settings.role_asset_desc') }}</p>
|
||||
|
||||
@if (isset($role) && $role->system_name === 'admin')
|
||||
<p>{{ trans('settings.role_asset_admins') }}</p>
|
||||
@endif
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th width="20%"></th>
|
||||
<th width="20%">{{ trans('common.create') }}</th>
|
||||
<th width="20%">{{ trans('common.view') }}</th>
|
||||
<th width="20%">{{ trans('common.edit') }}</th>
|
||||
<th width="20%">{{ trans('common.delete') }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.shelves_long') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.books') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.chapters') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-create-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.pages') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-create-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.images') }}</td>
|
||||
<td>@include('settings/roles/checkbox', ['permission' => 'image-create-all'])</td>
|
||||
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.attachments') }}</td>
|
||||
<td>@include('settings/roles/checkbox', ['permission' => 'attachment-create-all'])</td>
|
||||
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'attachment-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'attachment-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'attachment-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'attachment-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.comments') }}</td>
|
||||
<td>@include('settings/roles/checkbox', ['permission' => 'comment-create-all'])</td>
|
||||
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'comment-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'comment-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'comment-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'comment-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group text-right">
|
||||
<a href="{{ baseUrl("/settings/roles") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
||||
@if (isset($role) && $role->id)
|
||||
<a href="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" class="button neg">{{ trans('settings.role_delete') }}</a>
|
||||
|
||||
<div>
|
||||
<label class="setting-list-label">{{ trans('settings.role_asset') }}</label>
|
||||
<p>{{ trans('settings.role_asset_desc') }}</p>
|
||||
|
||||
@if (isset($role) && $role->system_name === 'admin')
|
||||
<p>{{ trans('settings.role_asset_admins') }}</p>
|
||||
@endif
|
||||
<button type="submit" class="button pos">{{ trans('settings.role_save') }}</button>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th width="20%"></th>
|
||||
<th width="20%">{{ trans('common.create') }}</th>
|
||||
<th width="20%">{{ trans('common.view') }}</th>
|
||||
<th width="20%">{{ trans('common.edit') }}</th>
|
||||
<th width="20%">{{ trans('common.delete') }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.shelves_long') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'bookshelf-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.books') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'book-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.chapters') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-create-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'chapter-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.pages') }}</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-create-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-create-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-view-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-view-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'page-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.images') }}</td>
|
||||
<td>@include('settings/roles/checkbox', ['permission' => 'image-create-all'])</td>
|
||||
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'image-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.attachments') }}</td>
|
||||
<td>@include('settings/roles/checkbox', ['permission' => 'attachment-create-all'])</td>
|
||||
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'attachment-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'attachment-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'attachment-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'attachment-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('entities.comments') }}</td>
|
||||
<td>@include('settings/roles/checkbox', ['permission' => 'comment-create-all'])</td>
|
||||
<td style="line-height:1.2;"><small class="faded">{{ trans('settings.role_controlled_by_asset') }}</small></td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'comment-update-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'comment-update-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
<td>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'comment-delete-own']) {{ trans('settings.role_own') }}</label>
|
||||
<label>@include('settings/roles/checkbox', ['permission' => 'comment-delete-all']) {{ trans('settings.role_all') }}</label>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-right">
|
||||
<a href="{{ baseUrl("/settings/roles") }}" class="button outline">{{ trans('common.cancel') }}</a>
|
||||
@if (isset($role) && $role->id)
|
||||
<a href="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" class="button outline">{{ trans('settings.role_delete') }}</a>
|
||||
@endif
|
||||
<button type="submit" class="button primary">{{ trans('settings.role_save') }}</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="card">
|
||||
<h3>@icon('users') {{ trans('settings.role_users') }}</h3>
|
||||
<div class="body">
|
||||
|
||||
<div>
|
||||
<div class="auto-height fill-width px-l">
|
||||
<h2 class="list-heading">{{ trans('settings.role_users') }}</h2>
|
||||
@if(isset($role) && count($role->users) > 0)
|
||||
<table class="list-table">
|
||||
@foreach($role->users as $user)
|
||||
|
|
|
@ -1,35 +1,39 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'roles'])
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="container small">
|
||||
<p> </p>
|
||||
<div class="card">
|
||||
<h3>@icon('lock-open') {{ trans('settings.role_user_roles') }}</h3>
|
||||
<div class="body">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{ trans('settings.role_name') }}</th>
|
||||
<th></th>
|
||||
<th class="text-center">{{ trans('settings.users') }}</th>
|
||||
</tr>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
|
||||
<td>{{ $role->description }}</td>
|
||||
<td class="text-center">{{ $role->users->count() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<div class="form-group">
|
||||
<a href="{{ baseUrl("/settings/roles/new") }}" class="button pos">{{ trans('settings.role_create') }}</a>
|
||||
<div class="py-m">
|
||||
@include('settings/navbar', ['selected' => 'roles'])
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap auto-height">
|
||||
|
||||
<div class="grid half v-center">
|
||||
<h1 class="list-heading">{{ trans('settings.role_user_roles') }}</h1>
|
||||
|
||||
<div class="text-right">
|
||||
<a href="{{ baseUrl("/settings/roles/new") }}" class="button outline">{{ trans('settings.role_create') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th>{{ trans('settings.role_name') }}</th>
|
||||
<th></th>
|
||||
<th class="text-center">{{ trans('settings.users') }}</th>
|
||||
</tr>
|
||||
@foreach($roles as $role)
|
||||
<tr>
|
||||
<td><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{ $role->display_name }}</a></td>
|
||||
<td>{{ $role->description }}</td>
|
||||
<td class="text-center">{{ $role->users->count() }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
{{--TODO--}}
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'users'])
|
||||
@stop
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
{{--TODO--}}
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'users'])
|
||||
@stop
|
||||
|
|
|
@ -1,74 +1,66 @@
|
|||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
@include('settings/navbar', ['selected' => 'users'])
|
||||
@stop
|
||||
|
||||
@section('body')
|
||||
<div class="container small">
|
||||
<p> </p>
|
||||
<div class="card">
|
||||
<h3>@icon('users') {{ trans('settings.users') }}</h3>
|
||||
<div class="body">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<form method="get" action="{{ baseUrl("/settings/users") }}">
|
||||
@foreach(collect($listDetails)->except('search') as $name => $val)
|
||||
<input type="hidden" name="{{ $name }}" value="{{ $val }}">
|
||||
@endforeach
|
||||
<input type="text" name="search" placeholder="{{ trans('settings.users_search') }}" @if($listDetails['search']) value="{{$listDetails['search']}}" @endif>
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-sm-8 text-right">
|
||||
@if(userCan('users-manage'))
|
||||
<a href="{{ baseUrl("/settings/users/create") }}" style="margin-top: 0;" class="pos button">{{ trans('settings.users_add_new') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="py-m">
|
||||
@include('settings/navbar', ['selected' => 'users'])
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap">
|
||||
|
||||
<div class="grid right-focus v-center">
|
||||
<h1 class="list-heading">{{ trans('settings.users') }}</h1>
|
||||
|
||||
<div class="text-right">
|
||||
<div class="block inline mr-s">
|
||||
<form method="get" action="{{ baseUrl("/settings/users") }}">
|
||||
@foreach(collect($listDetails)->except('search') as $name => $val)
|
||||
<input type="hidden" name="{{ $name }}" value="{{ $val }}">
|
||||
@endforeach
|
||||
<input type="text" name="search" placeholder="{{ trans('settings.users_search') }}" @if($listDetails['search']) value="{{$listDetails['search']}}" @endif>
|
||||
</form>
|
||||
</div>
|
||||
@if(userCan('users-manage'))
|
||||
<a href="{{ baseUrl("/settings/users/create") }}" style="margin-top: 0;" class="outline button">{{ trans('settings.users_add_new') }}</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="table">
|
||||
{{--TODO - Add last login--}}
|
||||
<table class="table">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>
|
||||
<a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'name']) }}">{{ trans('auth.name') }}</a>
|
||||
/
|
||||
<a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'email']) }}">{{ trans('auth.email') }}</a>
|
||||
</th>
|
||||
<th>{{ trans('settings.role_user_roles') }}</th>
|
||||
</tr>
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'name']) }}">{{ trans('auth.name') }}</a></th>
|
||||
<th><a href="{{ sortUrl('/settings/users', $listDetails, ['sort' => 'email']) }}">{{ trans('auth.email') }}</a></th>
|
||||
<th>{{ trans('settings.role_user_roles') }}</th>
|
||||
<td class="text-center" style="line-height: 0;"><img class="avatar med" src="{{ $user->getAvatar(40)}}" alt="{{ $user->name }}"></td>
|
||||
<td>
|
||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
|
||||
@endif
|
||||
{{ $user->name }} <br> <span class="text-muted">{{ $user->email }}</span>
|
||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@foreach($user->roles as $index => $role)
|
||||
<small><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@foreach($users as $user)
|
||||
<tr>
|
||||
<td style="line-height: 0;"><img class="avatar med" src="{{ $user->getAvatar(40)}}" alt="{{ $user->name }}"></td>
|
||||
<td>
|
||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
|
||||
@endif
|
||||
{{ $user->name }}
|
||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
|
||||
@endif
|
||||
{{ $user->email }}
|
||||
@if(userCan('users-manage') || $currentUser->id == $user->id)
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@foreach($user->roles as $index => $role)
|
||||
<small><a href="{{ baseUrl("/settings/roles/{$role->id}") }}">{{$role->display_name}}</a>@if($index !== count($user->roles) -1),@endif</small>
|
||||
@endforeach
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<div>
|
||||
{{ $users->links() }}
|
||||
</div>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
<div>
|
||||
{{ $users->links() }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -1,84 +1,88 @@
|
|||
@extends('sidebar-layout')
|
||||
@extends('simple-layout')
|
||||
|
||||
@section('toolbar')
|
||||
<div class="col-sm-6 col-xs-1 faded">
|
||||
<div class="breadcrumbs">
|
||||
<a href="{{ $user->getProfileUrl() }}" class="text-button">@icon('user'){{ $user->name }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@stop
|
||||
|
||||
@section('sidebar')
|
||||
<div class="card" id="recent-activity">
|
||||
<h3>@icon('time') {{ trans('entities.recent_activity') }}</h3>
|
||||
@include('partials/activity-list', ['activity' => $activity])
|
||||
</div>
|
||||
@stop
|
||||
{{--TODO - Include links to search based on this user being the creator for each entity type--}}
|
||||
{{--Linking either the "Created content" items or as "View All" links next to headers--}}
|
||||
{{--TODO - Add shelves?--}}
|
||||
|
||||
@section('body')
|
||||
|
||||
<div class="container small">
|
||||
<div class="container pt-xl">
|
||||
|
||||
<div class="padded-top large"></div>
|
||||
<div class="grid right-focus reverse-collapse">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-7">
|
||||
<div class="clearfix">
|
||||
<div class="padded-right float left">
|
||||
<img class="avatar square huge" src="{{ $user->getAvatar(120) }}" alt="{{ $user->name }}">
|
||||
</div>
|
||||
<div>
|
||||
<h3 style="margin-top: 0;">{{ $user->name }}</h3>
|
||||
<p class="text-muted">
|
||||
{{ trans('entities.profile_user_for_x', ['time' => $user->created_at->diffForHumans(null, true)]) }}
|
||||
</p>
|
||||
</div>
|
||||
<div>
|
||||
<div id="recent-user-activity" class="mb-xl">
|
||||
<h5>{{ trans('entities.recent_activity') }}</h5>
|
||||
@include('partials/activity-list', ['activity' => $activity])
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-5 text-bigger" id="content-counts">
|
||||
<div class="text-muted">{{ trans('entities.profile_created_content') }}</div>
|
||||
<a href="#recent-books">
|
||||
<div class="text-book">
|
||||
@icon('book') {{ trans_choice('entities.x_books', $assetCounts['books']) }}
|
||||
|
||||
<div>
|
||||
<div class="card content-wrap auto-height">
|
||||
<div class="grid left-focus v-center">
|
||||
<div>
|
||||
<div class="mr-m float left">
|
||||
<img class="avatar square huge" src="{{ $user->getAvatar(120) }}" alt="{{ $user->name }}">
|
||||
</div>
|
||||
<div>
|
||||
<h4 class="mt-md">{{ $user->name }}</h4>
|
||||
<p class="text-muted">
|
||||
{{ trans('entities.profile_user_for_x', ['time' => $user->created_at->diffForHumans(null, true)]) }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content-counts">
|
||||
<div class="text-muted">{{ trans('entities.profile_created_content') }}</div>
|
||||
<div class="icon-list">
|
||||
<a href="#recent-books" class="text-book icon-list-item">
|
||||
<span class="icon">@icon('book')</span>
|
||||
<span>{{ trans_choice('entities.x_books', $assetCounts['books']) }}</span>
|
||||
</a>
|
||||
<a href="#recent-chapters" class="text-chapter icon-list-item">
|
||||
<span class="icon">@icon('chapter')</span>
|
||||
<span>{{ trans_choice('entities.x_chapters', $assetCounts['chapters']) }}</span>
|
||||
</a>
|
||||
<a href="#recent-pages" class="text-page icon-list-item">
|
||||
<span class="icon">@icon('page')</span>
|
||||
<span>{{ trans_choice('entities.x_pages', $assetCounts['pages']) }}</span>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<a href="#recent-chapters">
|
||||
<div class="text-chapter">
|
||||
@icon('chapter') {{ trans_choice('entities.x_chapters', $assetCounts['chapters']) }}
|
||||
</div>
|
||||
</a>
|
||||
<a href="#recent-pages">
|
||||
<div class="text-page">
|
||||
@icon('page') {{ trans_choice('entities.x_pages', $assetCounts['pages']) }}
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap auto-height book-contents">
|
||||
<h2 id="recent-pages" class="list-heading">{{ trans('entities.recently_created_pages') }}</h2>
|
||||
@if (count($recentlyCreated['pages']) > 0)
|
||||
@include('partials/entity-list', ['entities' => $recentlyCreated['pages']])
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.profile_not_created_pages', ['userName' => $user->name]) }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap auto-height book-contents">
|
||||
<h2 id="recent-chapters" class="list-heading">{{ trans('entities.recently_created_chapters') }}</h2>
|
||||
@if (count($recentlyCreated['chapters']) > 0)
|
||||
@include('partials/entity-list', ['entities' => $recentlyCreated['chapters']])
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.profile_not_created_chapters', ['userName' => $user->name]) }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="card content-wrap auto-height book-contents">
|
||||
<h2 id="recent-books" class="list-heading">{{ trans('entities.recently_created_books') }}</h2>
|
||||
@if (count($recentlyCreated['books']) > 0)
|
||||
@include('partials/entity-list', ['entities' => $recentlyCreated['books']])
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.profile_not_created_books', ['userName' => $user->name]) }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<hr class="even">
|
||||
<h3 id="recent-pages">{{ trans('entities.recently_created_pages') }}</h3>
|
||||
@if (count($recentlyCreated['pages']) > 0)
|
||||
@include('partials/entity-list', ['entities' => $recentlyCreated['pages']])
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.profile_not_created_pages', ['userName' => $user->name]) }}</p>
|
||||
@endif
|
||||
|
||||
<hr class="even">
|
||||
<h3 id="recent-chapters">{{ trans('entities.recently_created_chapters') }}</h3>
|
||||
@if (count($recentlyCreated['chapters']) > 0)
|
||||
@include('partials/entity-list', ['entities' => $recentlyCreated['chapters']])
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.profile_not_created_chapters', ['userName' => $user->name]) }}</p>
|
||||
@endif
|
||||
|
||||
<hr class="even">
|
||||
<h3 id="recent-books">{{ trans('entities.recently_created_books') }}</h3>
|
||||
@if (count($recentlyCreated['books']) > 0)
|
||||
@include('partials/entity-list', ['entities' => $recentlyCreated['books']])
|
||||
@else
|
||||
<p class="text-muted">{{ trans('entities.profile_not_created_books', ['userName' => $user->name]) }}</p>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user