Updated remaining views to 2017 design update.

Also fixed issue with duplicate confirmation email.
This commit is contained in:
Dan Brown 2017-08-26 17:17:04 +01:00
parent 36f524a354
commit 4cb4c9e568
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
20 changed files with 835 additions and 832 deletions

View File

@ -231,7 +231,6 @@ class RegisterController extends Controller
return redirect('/register/confirm');
}
$this->emailConfirmationService->sendConfirmation($user);
session()->flash('success', trans('auth.email_confirm_resent'));
return redirect('/register/confirm');
}

View File

@ -92,7 +92,7 @@ class SearchService
return [
'total' => $total,
'count' => count($results),
'results' => $results->sortByDesc('score')
'results' => $results->sortByDesc('score')->values()
];
}

View File

@ -237,8 +237,8 @@ div[editor-type="markdown"] .title-input.page-title input[type="text"] {
padding: 0;
cursor: pointer;
position: absolute;
left: 7px;
top: 7px;
left: 8px;
top: 9.5px;
}
input {
display: block;

View File

@ -378,12 +378,6 @@ span.sep {
display: block;
}
.action-header {
h1 {
margin-top: $-m;
}
}
/**
* Icons
*/

View File

@ -9,9 +9,11 @@
@section('content')
<div class="text-center">
<div class="center-box">
<h2>{{ trans('auth.register_thanks') }}</h2>
<p>{{ trans('auth.register_confirm', ['appName' => setting('app-name')]) }}</p>
<div class="card center-box">
<h3><i class="zmdi zmdi-accounts"></i> {{ trans('auth.register_thanks') }}</h3>
<div class="body">
<p>{{ trans('auth.register_confirm', ['appName' => setting('app-name')]) }}</p>
</div>
</div>
</div>

View File

@ -2,29 +2,33 @@
@section('content')
<div class="row">
<div class="col-md-6 col-md-offset-3">
<h2>{{ trans('auth.email_not_confirmed') }}</h2>
<p class="text-muted">{{ trans('auth.email_not_confirmed_text') }}<br>
{{ trans('auth.email_not_confirmed_click_link') }} <br>
{{ trans('auth.email_not_confirmed_resend') }}
</p>
<hr>
<form action="{{ baseUrl("/register/confirm/resend") }}" method="POST">
{!! csrf_field() !!}
<div class="form-group">
<label for="email">{{ trans('auth.email') }}</label>
@if(auth()->check())
@include('form/text', ['name' => 'email', 'model' => auth()->user()])
@else
@include('form/text', ['name' => 'email'])
@endif
</div>
<div class="form-group">
<button type="submit" class="button pos">{{ trans('auth.email_not_confirmed_resend_button') }}</button>
</div>
</form>
<div class="container small">
<p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-accounts"></i> {{ trans('auth.email_not_confirmed') }}</h3>
<div class="body">
<p class="text-muted">{{ trans('auth.email_not_confirmed_text') }}<br>
{{ trans('auth.email_not_confirmed_click_link') }} <br>
{{ trans('auth.email_not_confirmed_resend') }}
</p>
<hr>
<form action="{{ baseUrl("/register/confirm/resend") }}" method="POST">
{!! csrf_field() !!}
<div class="form-group">
<label for="email">{{ trans('auth.email') }}</label>
@if(auth()->check())
@include('form/text', ['name' => 'email', 'model' => auth()->user()])
@else
@include('form/text', ['name' => 'email'])
@endif
</div>
<div class="form-group">
<button type="submit" class="button pos">{{ trans('auth.email_not_confirmed_resend_button') }}</button>
</div>
</form>
</div>
</div>
</div>
@stop

View File

@ -8,5 +8,5 @@
@endforeach
</div>
@else
<p class="text-muted">{{ trans('common.no_activity') }}</p>
<p class="text-muted empty-text">{{ trans('common.no_activity') }}</p>
@endif

View File

@ -1,213 +1,204 @@
@extends('base')
@extends('sidebar-layout')
@section('content')
@section('toolbar')
<div class="col-sm-12 faded">
<div class="breadcrumbs">
<a href="{{ baseUrl("/search?term=" . urlencode($searchTerm)) }}" class="text-button"><i class="zmdi zmdi-search"></i>{{ trans('entities.search_for_term', ['term' => $searchTerm]) }}</a>
</div>
</div>
@stop
<input type="hidden" name="searchTerm" value="{{$searchTerm}}">
@section('container-attrs')
id="search-system"
ng-non-bindable=""
@stop
<div id="search-system">
@section('sidebar')
<div class="card">
<h3>{{ trans('entities.search_filters') }}</h3>
<div class="faded-small toolbar">
<div class="container">
<div class="row">
<div class="col-sm-12 faded">
<div class="breadcrumbs">
<a href="{{ baseUrl("/search?term=" . urlencode($searchTerm)) }}" class="text-button"><i class="zmdi zmdi-search"></i>{{ trans('entities.search_for_term', ['term' => $searchTerm]) }}</a>
</div>
<div class="body">
<form v-on:submit="updateSearch" v-cloak class="v-cloak anim fadeIn">
<h6 class="text-muted">{{ trans('entities.search_content_type') }}</h6>
<div class="form-group">
<label class="inline checkbox text-page"><input type="checkbox" v-on:change="typeChange" v-model="search.type.page" value="page">{{ trans('entities.page') }}</label>
<label class="inline checkbox text-chapter"><input type="checkbox" v-on:change="typeChange" v-model="search.type.chapter" value="chapter">{{ trans('entities.chapter') }}</label>
<label class="inline checkbox text-book"><input type="checkbox" v-on:change="typeChange" v-model="search.type.book" value="book">{{ trans('entities.book') }}</label>
</div>
</div>
</div>
</div>
<div class="container" ng-non-bindable id="searchSystem">
<h6 class="text-muted">{{ trans('entities.search_exact_matches') }}</h6>
<table cellpadding="0" cellspacing="0" border="0" class="no-style">
<tr v-for="(term, i) in search.exactTerms">
<td style="padding: 0 12px 6px 0;">
<input class="exact-input outline" v-on:input="exactChange" type="text" v-model="search.exactTerms[i]"></td>
<td>
<button type="button" class="text-neg text-button" v-on:click="removeExact(i)">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td colspan="2">
<button type="button" class="text-button" v-on:click="addExact">
<i class="zmdi zmdi-plus-circle-o"></i>{{ trans('common.add') }}
</button>
</td>
</tr>
</table>
<div class="row">
<h6 class="text-muted">{{ trans('entities.search_tags') }}</h6>
<table cellpadding="0" cellspacing="0" border="0" class="no-style">
<tr v-for="(term, i) in search.tagTerms">
<td style="padding: 0 12px 6px 0;">
<input class="tag-input outline" v-on:input="tagChange" type="text" v-model="search.tagTerms[i]"></td>
<td>
<button type="button" class="text-neg text-button" v-on:click="removeTag(i)">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td colspan="2">
<button type="button" class="text-button" v-on:click="addTag">
<i class="zmdi zmdi-plus-circle-o"></i>{{ trans('common.add') }}
</button>
</td>
</tr>
</table>
<div class="col-md-6">
<h1>{{ trans('entities.search_results') }}</h1>
<h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6>
@include('partials/entity-list', ['entities' => $entities])
@if ($hasNextPage)
<a href="{{ $nextPageLink }}" class="button">{{ trans('entities.search_more') }}</a>
@endif
</div>
<h6 class="text-muted">Options</h6>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('viewed_by_me')"
v-model="search.option.viewed_by_me" value="page">
{{ trans('entities.search_viewed_by_me') }}
</label>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('not_viewed_by_me')"
v-model="search.option.not_viewed_by_me" value="page">
{{ trans('entities.search_not_viewed_by_me') }}
</label>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('is_restricted')"
v-model="search.option.is_restricted" value="page">
{{ trans('entities.search_permissions_set') }}
</label>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('created_by:me')"
v-model="search.option['created_by:me']" value="page">
{{ trans('entities.search_created_by_me') }}
</label>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('updated_by:me')"
v-model="search.option['updated_by:me']" value="page">
{{ trans('entities.search_updated_by_me') }}
</label>
<div class="col-md-5 col-md-offset-1">
<h3>{{ trans('entities.search_filters') }}</h3>
<h6 class="text-muted">Date Options</h6>
<table cellpadding="0" cellspacing="0" border="0" class="no-style form-table">
<tr>
<td width="200">{{ trans('entities.search_updated_after') }}</td>
<td width="80">
<button type="button" class="text-button" v-if="!search.dates.updated_after"
v-on:click="enableDate('updated_after')">{{ trans('entities.search_set_date') }}</button>
<form v-on:submit="updateSearch" v-cloak class="v-cloak anim fadeIn">
<h6 class="text-muted">{{ trans('entities.search_content_type') }}</h6>
<div class="form-group">
<label class="inline checkbox text-page"><input type="checkbox" v-on:change="typeChange" v-model="search.type.page" value="page">{{ trans('entities.page') }}</label>
<label class="inline checkbox text-chapter"><input type="checkbox" v-on:change="typeChange" v-model="search.type.chapter" value="chapter">{{ trans('entities.chapter') }}</label>
<label class="inline checkbox text-book"><input type="checkbox" v-on:change="typeChange" v-model="search.type.book" value="book">{{ trans('entities.book') }}</label>
</div>
</td>
</tr>
<tr v-if="search.dates.updated_after">
<td>
<input v-if="search.dates.updated_after" class="tag-input"
v-on:input="dateChange('updated_after')" type="date" v-model="search.dates.updated_after"
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
</td>
<td>
<button v-if="search.dates.updated_after" type="button" class="text-neg text-button"
v-on:click="dateRemove('updated_after')">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td>{{ trans('entities.search_updated_before') }}</td>
<td>
<button type="button" class="text-button" v-if="!search.dates.updated_before"
v-on:click="enableDate('updated_before')">{{ trans('entities.search_set_date') }}</button>
<h6 class="text-muted">{{ trans('entities.search_exact_matches') }}</h6>
<table cellpadding="0" cellspacing="0" border="0" class="no-style">
<tr v-for="(term, i) in search.exactTerms">
<td style="padding: 0 12px 6px 0;">
<input class="exact-input outline" v-on:input="exactChange" type="text" v-model="search.exactTerms[i]"></td>
<td>
<button type="button" class="text-neg text-button" v-on:click="removeExact(i)">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td colspan="2">
<button type="button" class="text-button" v-on:click="addExact">
<i class="zmdi zmdi-plus-circle-o"></i>{{ trans('common.add') }}
</button>
</td>
</tr>
</table>
</td>
</tr>
<tr v-if="search.dates.updated_before">
<td>
<input v-if="search.dates.updated_before" class="tag-input"
v-on:input="dateChange('updated_before')" type="date" v-model="search.dates.updated_before"
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
</td>
<td>
<button v-if="search.dates.updated_before" type="button" class="text-neg text-button"
v-on:click="dateRemove('updated_before')">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td>{{ trans('entities.search_created_after') }}</td>
<td>
<button type="button" class="text-button" v-if="!search.dates.created_after"
v-on:click="enableDate('created_after')">{{ trans('entities.search_set_date') }}</button>
<h6 class="text-muted">{{ trans('entities.search_tags') }}</h6>
<table cellpadding="0" cellspacing="0" border="0" class="no-style">
<tr v-for="(term, i) in search.tagTerms">
<td style="padding: 0 12px 6px 0;">
<input class="tag-input outline" v-on:input="tagChange" type="text" v-model="search.tagTerms[i]"></td>
<td>
<button type="button" class="text-neg text-button" v-on:click="removeTag(i)">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td colspan="2">
<button type="button" class="text-button" v-on:click="addTag">
<i class="zmdi zmdi-plus-circle-o"></i>{{ trans('common.add') }}
</button>
</td>
</tr>
</table>
</td>
</tr>
<tr v-if="search.dates.created_after">
<td>
<input v-if="search.dates.created_after" class="tag-input"
v-on:input="dateChange('created_after')" type="date" v-model="search.dates.created_after"
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
</td>
<td>
<button v-if="search.dates.created_after" type="button" class="text-neg text-button"
v-on:click="dateRemove('created_after')">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td>{{ trans('entities.search_created_before') }}</td>
<td>
<button type="button" class="text-button" v-if="!search.dates.created_before"
v-on:click="enableDate('created_before')">{{ trans('entities.search_set_date') }}</button>
<h6 class="text-muted">Options</h6>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('viewed_by_me')"
v-model="search.option.viewed_by_me" value="page">
{{ trans('entities.search_viewed_by_me') }}
</label>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('not_viewed_by_me')"
v-model="search.option.not_viewed_by_me" value="page">
{{ trans('entities.search_not_viewed_by_me') }}
</label>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('is_restricted')"
v-model="search.option.is_restricted" value="page">
{{ trans('entities.search_permissions_set') }}
</label>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('created_by:me')"
v-model="search.option['created_by:me']" value="page">
{{ trans('entities.search_created_by_me') }}
</label>
<label class="checkbox">
<input type="checkbox" v-on:change="optionChange('updated_by:me')"
v-model="search.option['updated_by:me']" value="page">
{{ trans('entities.search_updated_by_me') }}
</label>
<h6 class="text-muted">Date Options</h6>
<table cellpadding="0" cellspacing="0" border="0" class="no-style form-table">
<tr>
<td width="200">{{ trans('entities.search_updated_after') }}</td>
<td width="80">
<button type="button" class="text-button" v-if="!search.dates.updated_after"
v-on:click="enableDate('updated_after')">{{ trans('entities.search_set_date') }}</button>
</td>
</tr>
<tr v-if="search.dates.updated_after">
<td>
<input v-if="search.dates.updated_after" class="tag-input"
v-on:input="dateChange('updated_after')" type="date" v-model="search.dates.updated_after"
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
</td>
<td>
<button v-if="search.dates.updated_after" type="button" class="text-neg text-button"
v-on:click="dateRemove('updated_after')">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td>{{ trans('entities.search_updated_before') }}</td>
<td>
<button type="button" class="text-button" v-if="!search.dates.updated_before"
v-on:click="enableDate('updated_before')">{{ trans('entities.search_set_date') }}</button>
</td>
</tr>
<tr v-if="search.dates.updated_before">
<td>
<input v-if="search.dates.updated_before" class="tag-input"
v-on:input="dateChange('updated_before')" type="date" v-model="search.dates.updated_before"
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
</td>
<td>
<button v-if="search.dates.updated_before" type="button" class="text-neg text-button"
v-on:click="dateRemove('updated_before')">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td>{{ trans('entities.search_created_after') }}</td>
<td>
<button type="button" class="text-button" v-if="!search.dates.created_after"
v-on:click="enableDate('created_after')">{{ trans('entities.search_set_date') }}</button>
</td>
</tr>
<tr v-if="search.dates.created_after">
<td>
<input v-if="search.dates.created_after" class="tag-input"
v-on:input="dateChange('created_after')" type="date" v-model="search.dates.created_after"
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
</td>
<td>
<button v-if="search.dates.created_after" type="button" class="text-neg text-button"
v-on:click="dateRemove('created_after')">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
<tr>
<td>{{ trans('entities.search_created_before') }}</td>
<td>
<button type="button" class="text-button" v-if="!search.dates.created_before"
v-on:click="enableDate('created_before')">{{ trans('entities.search_set_date') }}</button>
</td>
</tr>
<tr v-if="search.dates.created_before">
<td>
<input v-if="search.dates.created_before" class="tag-input"
v-on:input="dateChange('created_before')" type="date" v-model="search.dates.created_before"
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
</td>
<td>
<button v-if="search.dates.created_before" type="button" class="text-neg text-button"
v-on:click="dateRemove('created_before')">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
</table>
</td>
</tr>
<tr v-if="search.dates.created_before">
<td>
<input v-if="search.dates.created_before" class="tag-input"
v-on:input="dateChange('created_before')" type="date" v-model="search.dates.created_before"
pattern="[0-9]{4}-[0-9]{2}-[0-9]{2}">
</td>
<td>
<button v-if="search.dates.created_before" type="button" class="text-neg text-button"
v-on:click="dateRemove('created_before')">
<i class="zmdi zmdi-close"></i>
</button>
</td>
</tr>
</table>
<button type="submit" class="button primary">{{ trans('entities.search_update') }}</button>
</form>
</div>
<button type="submit" class="button primary">{{ trans('entities.search_update') }}</button>
</form>
</div>
</div>
</div>
@stop
@section('body')
<div class="container small">
<input type="hidden" name="searchTerm" value="{{$searchTerm}}">
<h1>{{ trans('entities.search_results') }}</h1>
<h6 class="text-muted">{{ trans_choice('entities.search_total_results_found', $totalResults, ['count' => $totalResults]) }}</h6>
@include('partials/entity-list', ['entities' => $entities])
@if ($hasNextPage)
<a href="{{ $nextPageLink }}" class="button">{{ trans('entities.search_more') }}</a>
@endif
</div>
@stop

View File

@ -1,128 +1,141 @@
@extends('base')
@section('content')
@extends('simple-layout')
@section('toolbar')
@include('settings/navbar', ['selected' => 'settings'])
@stop
<div class="container small settings-container">
@section('body')
<div class="container small">
<h1>{{ trans('settings.settings') }}</h1>
<div class="text-right text-muted container">
<br>
BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
</div>
<form action="{{ baseUrl("/settings") }}" method="POST">
{!! csrf_field() !!}
<div class="card">
<h3><i class="zmdi zmdi-settings-square"></i> {{ trans('settings.app_settings') }}</h3>
<div class="body">
<form action="{{ baseUrl("/settings") }}" method="POST">
{!! csrf_field() !!}
<div class="row">
<h3>{{ trans('settings.app_settings') }}</h3>
<div class="col-md-6">
<div class="form-group">
<label for="setting-app-name">{{ trans('settings.app_name') }}</label>
<p class="small">{{ trans('settings.app_name_desc') }}</p>
<input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
</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="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>
<div class="form-group">
<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 for="setting-app-editor">{{ trans('settings.app_editor') }}</label>
<p class="small">{{ trans('settings.app_editor_desc') }}</p>
<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>
</div>
</div>
<div class="row">
<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>
<div class="form-group" id="color-control">
<label for="setting-app-color">{{ trans('settings.app_primary_color') }}</label>
<p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
<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" placeholder="rgba(21, 101, 192, 0.15)">
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="setting-app-name">{{ trans('settings.app_name') }}</label>
<p class="small">{{ trans('settings.app_name_desc') }}</p>
<input type="text" value="{{ setting('app-name', 'BookStack') }}" name="setting-app-name" id="setting-app-name">
<label for="setting-app-custom-head">{{ 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">{{ setting('app-custom-head', '') }}</textarea>
</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="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>
<div class="form-group">
<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 for="setting-app-editor">{{ trans('settings.app_editor') }}</label>
<p class="small">{{ trans('settings.app_editor_desc') }}</p>
<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>
</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="form-group text-right">
<button type="submit" class="button pos">{{ trans('settings.settings_save') }}</button>
</div>
<div class="form-group" id="color-control">
<label for="setting-app-color">{{ trans('settings.app_primary_color') }}</label>
<p class="small">{!! trans('settings.app_primary_color_desc') !!}</p>
<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" placeholder="rgba(21, 101, 192, 0.15)">
</div>
</div>
</form>
</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 name="setting-app-custom-head" id="setting-app-custom-head">{{ setting('app-custom-head', '') }}</textarea>
</div>
<p>&nbsp;</p>
<hr class="margin-top">
<div class="card">
<h3><i class="zmdi zmdi-accounts-add"></i> {{ trans('settings.reg_settings') }}</h3>
<div class="body">
<form action="{{ baseUrl("/settings") }}" method="POST">
{!! csrf_field() !!}
<h3>{{ trans('settings.reg_settings') }}</h3>
<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>
<div class="form-group">
<label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
<select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
@foreach(\BookStack\Role::all() as $role)
<option value="{{$role->id}}" data-role-name="{{ $role->name }}"
@if(setting('registration-role', \BookStack\Role::first()->id) == $role->id) selected @endif
<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>
<div class="form-group">
<label for="setting-registration-role">{{ trans('settings.reg_default_role') }}</label>
<select id="setting-registration-role" name="setting-registration-role" @if($errors->has('setting-registration-role')) class="neg" @endif>
@foreach(\BookStack\Role::all() as $role)
<option value="{{$role->id}}" data-role-name="{{ $role->name }}"
@if(setting('registration-role', \BookStack\Role::first()->id) == $role->id) selected @endif
>
{{ $role->display_name }}
</option>
@endforeach
</select>
{{ $role->display_name }}
</option>
@endforeach
</select>
</div>
<div class="form-group">
<label for="setting-registration-confirmation">{{ 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>
<div class="col-md-6">
<div class="form-group">
<label for="setting-registration-restrict">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
<p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
<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">
<label for="setting-registration-confirmation">{{ 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>
<div class="col-md-6">
<div class="form-group">
<label for="setting-registration-restrict">{{ trans('settings.reg_confirm_restrict_domain') }}</label>
<p class="small">{!! trans('settings.reg_confirm_restrict_domain_desc') !!}</p>
<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>
<hr class="margin-top">
<div class="form-group">
<span class="float right muted">
BookStack @if(strpos($version, 'v') !== 0) version @endif {{ $version }}
</span>
<button type="submit" class="button pos">{{ trans('settings.settings_save') }}</button>
<div class="form-group text-right">
<button type="submit" class="button pos">{{ trans('settings.settings_save') }}</button>
</div>
</form>
</div>
</form>
</div>
</div>

View File

@ -1,18 +1,12 @@
<div class="faded-small toolbar">
<div class="container">
<div class="row">
<div class="col-md-12 setting-nav nav-tabs">
@if($currentUser->can('settings-manage'))
<a href="{{ baseUrl('/settings') }}" @if($selected == 'settings') class="selected text-button" @endif><i class="zmdi zmdi-settings"></i>{{ trans('settings.settings') }}</a>
@endif
@if($currentUser->can('users-manage'))
<a href="{{ baseUrl('/settings/users') }}" @if($selected == 'users') class="selected text-button" @endif><i class="zmdi zmdi-accounts"></i>{{ trans('settings.users') }}</a>
@endif
@if($currentUser->can('user-roles-manage'))
<a href="{{ baseUrl('/settings/roles') }}" @if($selected == 'roles') class="selected text-button" @endif><i class="zmdi zmdi-lock-open"></i>{{ trans('settings.roles') }}</a>
@endif
</div>
</div>
</div>
<div class="col-md-12 setting-nav nav-tabs">
@if($currentUser->can('settings-manage'))
<a href="{{ baseUrl('/settings') }}" @if($selected == 'settings') class="selected text-button" @endif><i class="zmdi zmdi-settings"></i>{{ trans('settings.settings') }}</a>
@endif
@if($currentUser->can('users-manage'))
<a href="{{ baseUrl('/settings/users') }}" @if($selected == 'users') class="selected text-button" @endif><i class="zmdi zmdi-accounts"></i>{{ trans('settings.users') }}</a>
@endif
@if($currentUser->can('user-roles-manage'))
<a href="{{ baseUrl('/settings/roles') }}" @if($selected == 'roles') class="selected text-button" @endif><i class="zmdi zmdi-lock-open"></i>{{ trans('settings.roles') }}</a>
@endif
</div>

View File

@ -1,15 +1,17 @@
@extends('base')
@section('content')
@extends('simple-layout')
@section('toolbar')
@include('settings/navbar', ['selected' => 'roles'])
@stop
<div class="container">
<h1>{{ trans('settings.role_create') }}</h1>
@section('body')
<form action="{{ baseUrl("/settings/roles/new") }}" method="POST">
@include('settings/roles/form')
</form>
</div>
<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>
</form>
@stop

View File

@ -1,28 +1,36 @@
@extends('base')
@section('content')
@extends('simple-layout')
@section('toolbar')
@include('settings/navbar', ['selected' => 'roles'])
<div class="container small" ng-non-bindable>
<h1>{{ trans('settings.role_delete') }}</h1>
<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">
<p>{{ trans('settings.role_delete_users_assigned', ['userCount' => $role->users->count()]) }}</p>
@include('form/role-select', ['options' => $roles, 'name' => 'migration_role_id'])
</div>
@endif
<p class="text-neg">{{ trans('settings.role_delete_sure') }}</p>
<a href="{{ baseUrl("/settings/roles/{$role->id}") }}" class="button muted">{{ trans('common.cancel') }}</a>
<button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
</form>
</div>
@stop
@section('body')
<div class="container small" ng-non-bindable>
<p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-delete"></i> {{ 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">
@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
<p class="text-neg">{{ trans('settings.role_delete_sure') }}</p>
<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>
</div>
</form>
</div>
</div>
</div>
@stop

View File

@ -1,24 +1,17 @@
@extends('base')
@section('content')
@extends('simple-layout')
@section('toolbar')
@include('settings/navbar', ['selected' => 'roles'])
@stop
<div class="container">
<div class="row">
<div class="col-sm-6">
<h1>{{ trans('settings.role_edit') }}</h1>
</div>
<div class="col-sm-6">
<p></p>
<a href="{{ baseUrl("/settings/roles/delete/{$role->id}") }}" class="button neg float right">{{ trans('settings.role_delete') }}</a>
@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>
<form action="{{ baseUrl("/settings/roles/{$role->id}") }}" method="POST">
<input type="hidden" name="_method" value="PUT">
@include('settings/roles/form', ['model' => $role])
</form>
</div>
</form>
@stop

View File

@ -1,169 +1,175 @@
{!! csrf_field() !!}
<div class="row">
<div class="col-md-9">
<div class="card">
<h3><i class="zmdi zmdi-{{$icon}}"></i> {{$title}}</h3>
<div class="body">
<div class="row">
<div class="col-md-5">
<h5>{{ trans('settings.role_details') }}</h5>
<div class="form-group">
<label for="name">{{ trans('settings.role_name') }}</label>
@include('form/text', ['name' => 'display_name'])
</div>
<div class="form-group">
<label for="name">{{ trans('settings.role_desc') }}</label>
@include('form/text', ['name' => 'description'])
</div>
<h5>{{ trans('settings.role_system') }}</h5>
<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-9">
<div class="row">
<div class="col-md-5">
<h3>{{ trans('settings.role_details') }}</h3>
<div class="form-group">
<label for="name">{{ trans('settings.role_name') }}</label>
@include('form/text', ['name' => 'display_name'])
<div class="col-md-6">
<h5>{{ trans('settings.role_asset') }}</h5>
<p>{{ trans('settings.role_asset_desc') }}</p>
<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.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 class="form-group">
<label for="name">{{ trans('settings.role_desc') }}</label>
@include('form/text', ['name' => 'description'])
</div>
<h3>{{ trans('settings.role_system') }}</h3>
<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">
<h3>{{ trans('settings.role_asset') }}</h3>
<p>{{ trans('settings.role_asset_desc') }}</p>
<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.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 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>
@endif
<button type="submit" class="button pos">{{ trans('settings.role_save') }}</button>
</div>
</div>
<a href="{{ baseUrl("/settings/roles") }}" class="button muted">{{ trans('common.cancel') }}</a>
<button type="submit" class="button pos">{{ trans('settings.role_save') }}</button>
</div>
<div class="col-md-3">
<h3>{{ trans('settings.role_users') }}</h3>
@if(isset($role) && count($role->users) > 0)
<table class="list-table">
@foreach($role->users as $user)
<tr>
<td style="line-height: 0;"><img class="avatar small" 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 }}
</div>
<div class="col-md-3">
<div class="card">
<h3><i class="zmdi zmdi-accounts"></i> {{ trans('settings.role_users') }}</h3>
<div class="body">
@if(isset($role) && count($role->users) > 0)
<table class="list-table">
@foreach($role->users as $user)
<tr>
<td style="line-height: 0;"><img class="avatar small" src="{{ $user->getAvatar(40) }}" alt="{{ $user->name }}"></td>
<td>
@if(userCan('users-manage') || $currentUser->id == $user->id)
</a>
@endif
</td>
</tr>
@endforeach
</table>
@else
<p class="text-muted">
{{ trans('settings.role_users_none') }}
</p>
@endif
<a href="{{ baseUrl("/settings/users/{$user->id}") }}">
@endif
{{ $user->name }}
@if(userCan('users-manage') || $currentUser->id == $user->id)
</a>
@endif
</td>
</tr>
@endforeach
</table>
@else
<p class="text-muted">
{{ trans('settings.role_users_none') }}
</p>
@endif
</div>
</div>
</div>

View File

@ -1,35 +1,36 @@
@extends('base')
@section('content')
@extends('simple-layout')
@section('toolbar')
@include('settings/navbar', ['selected' => 'roles'])
@stop
@section('body')
<div class="container small">
<p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-lock-open"></i> {{ 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="row action-header">
<div class="col-sm-8">
<h1>{{ trans('settings.role_user_roles') }}</h1>
</div>
<div class="col-sm-4">
<p></p>
<a href="{{ baseUrl("/settings/roles/new") }}" class="button float right pos"><i class="zmdi zmdi-lock-open"></i>{{ trans('settings.role_create') }}</a>
<div class="form-group">
<a href="{{ baseUrl("/settings/roles/new") }}" class="button pos">{{ trans('settings.role_create') }}</a>
</div>
</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>
@stop

View File

@ -1,31 +1,26 @@
@extends('base')
@extends('simple-layout')
@section('toolbar')
@include('settings/navbar', ['selected' => 'users'])
@stop
@section('content')
@section('body')
<div class="faded-small toolbar">
<div class="container">
<div class="row">
<div class="col-sm-12 faded">
<div class="breadcrumbs">
<a href="{{ baseUrl('/settings/users') }}" class="text-button"><i class="zmdi zmdi-accounts"></i>{{ trans('settings.users') }}</a>
<div class="container small" ng-non-bindable>
<p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-accounts-add"></i> {{ trans('settings.users_add_new') }}</h3>
<div class="body">
<form action="{{ baseUrl("/settings/users/create") }}" method="post">
{!! csrf_field() !!}
@include('users/forms/' . $authMethod)
<div class="form-group text-right">
<a href="{{ baseUrl($currentUser->can('users-manage') ? "/settings/users" : "/") }}" class="button outline">{{ trans('common.cancel') }}</a>
<button class="button pos" type="submit">{{ trans('common.save') }}</button>
</div>
</div>
</form>
</div>
</div>
</div>
<div class="container small" ng-non-bindable>
<h1>{{ trans('settings.users_add_new') }}</h1>
<form action="{{ baseUrl("/settings/users/create") }}" method="post">
{!! csrf_field() !!}
@include('users/forms/' . $authMethod)
<div class="form-group">
<a href="{{ baseUrl($currentUser->can('users-manage') ? "/settings/users" : "/") }}" class="button muted">{{ trans('common.cancel') }}</a>
<button class="button pos" type="submit">{{ trans('common.save') }}</button>
</div>
</form>
</div>
@stop

View File

@ -1,32 +1,27 @@
@extends('base')
@extends('simple-layout')
@section('content')
@section('toolbar')
@include('settings/navbar', ['selected' => 'users'])
@stop
<div class="faded-small toolbar">
<div class="container">
<div class="row">
<div class="col-sm-12 faded">
<div class="breadcrumbs">
<a href="{{ baseUrl("/settings/users") }}" class="text-button"><i class="zmdi zmdi-accounts"></i>Users</a>
<span class="sep">&raquo;</span>
<a href="{{ baseUrl("/settings/users/{$user->id}") }}" class="text-button"><i class="zmdi zmdi-account"></i>{{ $user->name }}</a>
</div>
</div>
@section('body')
<div class="container small" ng-non-bindable>
<p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-delete"></i> {{ trans('settings.users_delete') }}</h3>
<div class="body">
<p>{{ trans('settings.users_delete_warning', ['userName' => $user->name]) }}</p>
<p class="text-neg">{{ trans('settings.users_delete_confirm') }}</p>
<form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
<a href="{{ baseUrl("/settings/users/{$user->id}") }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
</form>
</div>
</div>
</div>
<div class="container small" ng-non-bindable>
<h1>{{ trans('settings.users_delete') }}</h1>
<p>{{ trans('settings.users_delete_warning', ['userName' => $user->name]) }}</p>
<p class="text-neg">{{ trans('settings.users_delete_confirm') }}</p>
<form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
<a href="{{ baseUrl("/settings/users/{$user->id}") }}" class="button muted">{{ trans('common.cancel') }}</a>
<button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
</form>
</div>
@stop

View File

@ -1,80 +1,84 @@
@extends('base')
@section('content')
@extends('simple-layout')
@section('toolbar')
@include('settings/navbar', ['selected' => 'users'])
@stop
@section('body')
<div class="container small">
<form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="post">
<div class="row">
<div class="col-sm-8">
<h1>{{ $user->id === $currentUser->id ? trans('settings.users_edit_profile') : trans('settings.users_edit') }}</h1>
</div>
<div class="col-sm-4">
<p></p>
@if($authMethod !== 'system')
<a href="{{ baseUrl("/settings/users/{$user->id}/delete") }}" class="neg button float right">{{ trans('settings.users_delete') }}</a>
@endif
</div>
</div>
<div class="row">
<div class="col-sm-6" ng-non-bindable>
{!! csrf_field() !!}
<input type="hidden" name="_method" value="put">
@include('users.forms.' . $authMethod, ['model' => $user])
<p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi-edit zmdi"></i> {{ $user->id === $currentUser->id ? trans('settings.users_edit_profile') : trans('settings.users_edit') }}</h3>
<div class="body">
<form action="{{ baseUrl("/settings/users/{$user->id}") }}" method="post">
<div class="row">
<div class="col-sm-6" ng-non-bindable>
{!! csrf_field() !!}
<input type="hidden" name="_method" value="put">
@include('users.forms.' . $authMethod, ['model' => $user])
</div>
<div class="col-sm-6">
<div class="form-group" id="logo-control">
<label for="user-avatar">{{ trans('settings.users_avatar') }}</label>
<p class="small">{{ trans('settings.users_avatar_desc') }}</p>
</div>
<div class="col-sm-6">
<div class="form-group" id="logo-control">
<label for="user-avatar">{{ trans('settings.users_avatar') }}</label>
<p class="small">{{ trans('settings.users_avatar_desc') }}</p>
@include('components.image-picker', [
'resizeHeight' => '512',
'resizeWidth' => '512',
'showRemove' => false,
'defaultImage' => baseUrl('/user_avatar.png'),
'currentImage' => $user->getAvatar(80),
'currentId' => $user->image_id,
'name' => 'image_id',
'imageClass' => 'avatar large'
])
</div>
<div class="form-group">
<label for="user-language">{{ trans('settings.users_preferred_language') }}</label>
<select name="setting[language]" id="user-language">
@foreach(trans('settings.language_select') as $lang => $label)
<option @if(setting()->getUser($user, 'language') === $lang) selected @endif value="{{ $lang }}">{{ $label }}</option>
@endforeach
</select>
</div>
</div>
</div>
<div class="form-group">
<a href="{{ baseUrl($currentUser->can('users-manage') ? "/settings/users" : "/") }}" class="button muted">{{ trans('common.cancel') }}</a>
<button class="button pos" type="submit">{{ trans('common.save') }}</button>
</div>
</form>
<hr class="margin-top large">
@if($currentUser->id === $user->id && count($activeSocialDrivers) > 0)
<h3>{{ trans('settings.users_social_accounts') }}</h3>
<p class="text-muted">{{ trans('settings.users_social_accounts_info') }}</p>
<div class="row">
@foreach($activeSocialDrivers as $driver => $enabled)
<div class="col-sm-3 col-xs-6 text-center">
<div>@icon($driver, ['width' => 56])</div>
<div>
@if($user->hasSocialAccount($driver))
<a href="{{ baseUrl("/login/service/{$driver}/detach") }}" class="button neg">{{ trans('settings.users_social_disconnect') }}</a>
@else
<a href="{{ baseUrl("/login/service/{$driver}") }}" class="button pos">{{ trans('settings.users_social_connect') }}</a>
@endif
@include('components.image-picker', [
'resizeHeight' => '512',
'resizeWidth' => '512',
'showRemove' => false,
'defaultImage' => baseUrl('/user_avatar.png'),
'currentImage' => $user->getAvatar(80),
'currentId' => $user->image_id,
'name' => 'image_id',
'imageClass' => 'avatar large'
])
</div>
<div class="form-group">
<label for="user-language">{{ trans('settings.users_preferred_language') }}</label>
<select name="setting[language]" id="user-language">
@foreach(trans('settings.language_select') as $lang => $label)
<option @if(setting()->getUser($user, 'language') === $lang) selected @endif value="{{ $lang }}">{{ $label }}</option>
@endforeach
</select>
</div>
</div>
</div>
@endforeach
<div class="form-group text-right">
<a href="{{ baseUrl($currentUser->can('users-manage') ? "/settings/users" : "/") }}" class="button outline">{{ trans('common.cancel') }}</a>
@if($authMethod !== 'system')
<a href="{{ baseUrl("/settings/users/{$user->id}/delete") }}" class="neg button">{{ trans('settings.users_delete') }}</a>
@endif
<button class="button pos" type="submit">{{ trans('common.save') }}</button>
</div>
</form>
</div>
</div>
@if($currentUser->id === $user->id && count($activeSocialDrivers) > 0)
<div class="card">
<h3><i class="zmdi zmdi-sign-in"></i> {{ trans('settings.users_social_accounts') }}</h3>
<div class="body">
<p class="text-muted">{{ trans('settings.users_social_accounts_info') }}</p>
<div class="container">
<div class="row">
@foreach($activeSocialDrivers as $driver => $enabled)
<div class="col-sm-4 col-xs-6 text-center">
<div>@icon($driver, ['width' => 56])</div>
<div>
@if($user->hasSocialAccount($driver))
<a href="{{ baseUrl("/login/service/{$driver}/detach") }}" class="button neg">{{ trans('settings.users_social_disconnect') }}</a>
@else
<a href="{{ baseUrl("/login/service/{$driver}") }}" class="button pos">{{ trans('settings.users_social_connect') }}</a>
@endif
</div>
<div>&nbsp;</div>
</div>
@endforeach
</div>
</div>
</div>
</div>
@endif

View File

@ -1,80 +1,77 @@
@extends('base')
@section('content')
@extends('simple-layout')
@section('toolbar')
@include('settings/navbar', ['selected' => 'users'])
@stop
@section('body')
<div class="container small" ng-non-bindable>
<div class="row action-header">
<div class="col-sm-8">
<h1>{{ trans('settings.users') }}</h1>
</div>
<div class="col-sm-4">
<p></p>
@if(userCan('users-manage'))
<a href="{{ baseUrl("/settings/users/create") }}" class="pos button float right"><i class="zmdi zmdi-account-add"></i>{{ trans('settings.users_add_new') }}</a>
@endif
</div>
</div>
<p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-accounts"></i> {{ 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>
</div>
<div class="row">
<div class="col-sm-8">
<div class="compact">
<table class="table">
<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>
</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>
</div>
<div class="col-sm-4">
<form method="get" class="float right" 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>
<table class="table">
<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>
</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>
</div>
@stop

View File

@ -1,76 +1,81 @@
@extends('base')
@extends('sidebar-layout')
@section('content')
@section('toolbar')
<div class="col-sm-6 col-xs-1 faded">
<div class="breadcrumbs">
<a href="{{ $user->getProfileUrl() }}" class="text-button"><i class="zmdi zmdi-account"></i>{{ $user->name }}</a>
</div>
</div>
@stop
@section('sidebar')
<div class="card" id="recent-activity">
<h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3>
@include('partials/activity-list', ['activity' => $activity])
</div>
@stop
@section('body')
<div class="container small" ng-non-bindable>
<div class="padded-top large"></div>
<div class="container" ng-non-bindable>
<div class="row">
<div class="col-sm-7">
<div class="padded-top large"></div>
<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 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 class="col-md-5 text-bigger" id="content-counts">
<div class="text-muted">{{ trans('entities.profile_created_content') }}</div>
<div class="text-book">
<i class="zmdi zmdi-book zmdi-hc-fw"></i> {{ $assetCounts['books'] }} {{ str_plural(trans('entities.book'), $assetCounts['books']) }}
</div>
<div class="text-chapter">
<i class="zmdi zmdi-collection-bookmark zmdi-hc-fw"></i> {{ $assetCounts['chapters'] }} {{ str_plural(trans('entities.chapter'), $assetCounts['chapters']) }}
</div>
<div class="text-page">
<i class="zmdi zmdi-file-text zmdi-hc-fw"></i> {{ $assetCounts['pages'] }} {{ str_plural(trans('entities.page'), $assetCounts['pages']) }}
</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>
<hr class="even">
<h3>{{ 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>{{ 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>{{ 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>
<div class="col-sm-4 col-sm-offset-1" id="recent-activity">
<h3>{{ trans('entities.recent_activity') }}</h3>
@include('partials/activity-list', ['activity' => $activity])
<div class="col-md-5 text-bigger" id="content-counts">
<div class="text-muted">{{ trans('entities.profile_created_content') }}</div>
<div class="text-book">
<i class="zmdi zmdi-book zmdi-hc-fw"></i> {{ $assetCounts['books'] }} {{ str_plural(trans('entities.book'), $assetCounts['books']) }}
</div>
<div class="text-chapter">
<i class="zmdi zmdi-collection-bookmark zmdi-hc-fw"></i> {{ $assetCounts['chapters'] }} {{ str_plural(trans('entities.chapter'), $assetCounts['chapters']) }}
</div>
<div class="text-page">
<i class="zmdi zmdi-file-text zmdi-hc-fw"></i> {{ $assetCounts['pages'] }} {{ str_plural(trans('entities.page'), $assetCounts['pages']) }}
</div>
</div>
</div>
<hr class="even">
<h3>{{ 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>{{ 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>{{ 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>