mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-02-07 22:02:31 +08:00
Refined design and text for entity permission changes
This commit is contained in:
parent
0fae807713
commit
25708542ff
|
@ -880,7 +880,8 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group {
|
||||||
gap: $-s;
|
gap: $-s;
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
.svg-icon {
|
.svg-icon {
|
||||||
height: 16px;
|
height: 26px;
|
||||||
|
width: 26px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.avatar {
|
.avatar {
|
||||||
|
@ -902,10 +903,11 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
.dropdown-search-toggle-select-caret {
|
.dropdown-search-toggle-select-caret {
|
||||||
font-size: 1.5rem;
|
|
||||||
line-height: 0;
|
line-height: 0;
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-top: -2px;
|
margin-top: -2px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-search-dropdown {
|
.dropdown-search-dropdown {
|
||||||
|
|
|
@ -207,8 +207,8 @@ select {
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23666666'><polygon points='0,0 100,0 50,50'/></svg>");
|
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='100' height='100' fill='%23666666'><polygon points='0,0 100,0 50,50'/></svg>");
|
||||||
background-size: 12px;
|
background-size: 10px 12px;
|
||||||
background-position: calc(100% - 20px) 70%;
|
background-position: calc(100% - 20px) 64%;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
|
||||||
@include rtl {
|
@include rtl {
|
||||||
|
|
|
@ -14,9 +14,8 @@
|
||||||
]])
|
]])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main class="card content-wrap">
|
<main class="card content-wrap auto-height">
|
||||||
<h1 class="list-heading">{{ trans('entities.books_permissions') }}</h1>
|
@include('form.entity-permissions', ['model' => $book, 'title' => trans('entities.books_permissions')])
|
||||||
@include('form.entity-permissions', ['model' => $book])
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -15,9 +15,8 @@
|
||||||
]])
|
]])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main class="card content-wrap">
|
<main class="card content-wrap auto-height">
|
||||||
<h1 class="list-heading">{{ trans('entities.chapters_permissions') }}</h1>
|
@include('form.entity-permissions', ['model' => $chapter, 'title' => trans('entities.chapters_permissions')])
|
||||||
@include('form.entity-permissions', ['model' => $chapter])
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -8,21 +8,39 @@
|
||||||
{!! csrf_field() !!}
|
{!! csrf_field() !!}
|
||||||
<input type="hidden" name="_method" value="PUT">
|
<input type="hidden" name="_method" value="PUT">
|
||||||
|
|
||||||
<div class="grid half left-focus v-center">
|
<div class="grid half left-focus v-end gap-m wrap">
|
||||||
<div>
|
<div>
|
||||||
<p class="mb-none mt-m">{{ trans('entities.permissions_intro') }}</p>
|
<h1 class="list-heading">{{ $title }}</h1>
|
||||||
|
{{-- <p class="mb-none mt-m">{{ trans('entities.permissions_intro') }}</p>--}}
|
||||||
|
<p class="text-muted mb-s">
|
||||||
|
Set permissions here to override the default permissions provided by user roles.
|
||||||
|
|
||||||
|
@if($model instanceof \BookStack\Entities\Models\Book)
|
||||||
|
<br>
|
||||||
|
Permissions set on books will automatically cascade to child chapters and pages, unless
|
||||||
|
they have their own permissions defined.
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if($model instanceof \BookStack\Entities\Models\Chapter)
|
||||||
|
<br>
|
||||||
|
Permissions set on chapters will automatically cascade to child pages, unless
|
||||||
|
they have their own permissions defined.
|
||||||
|
@endif
|
||||||
|
</p>
|
||||||
|
|
||||||
|
@if($model instanceof \BookStack\Entities\Models\Bookshelf)
|
||||||
|
<p class="text-warn">{{ trans('entities.shelves_permissions_cascade_warning') }}</p>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div class="flex-container-row justify-flex-end">
|
||||||
<div class="form-group">
|
<div class="form-group mb-m">
|
||||||
<label for="owner">{{ trans('entities.permissions_owner') }}</label>
|
<label for="owner">{{ trans('entities.permissions_owner') }}</label>
|
||||||
@include('form.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by'])
|
@include('form.user-select', ['user' => $model->ownedBy, 'name' => 'owned_by'])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@if($model instanceof \BookStack\Entities\Models\Bookshelf)
|
<hr>
|
||||||
<p class="text-warn">{{ trans('entities.shelves_permissions_cascade_warning') }}</p>
|
|
||||||
@endif
|
|
||||||
|
|
||||||
<div refs="entity-permissions@role-container" class="content-permissions mt-m mb-m">
|
<div refs="entity-permissions@role-container" class="content-permissions mt-m mb-m">
|
||||||
@foreach($data->permissionsWithRoles() as $permission)
|
@foreach($data->permissionsWithRoles() as $permission)
|
||||||
|
@ -36,8 +54,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flex-container-row justify-flex-end mb-xl">
|
<div class="flex-container-row justify-flex-end mb-xl">
|
||||||
<div>
|
<div class="flex-container-row items-center gap-m">
|
||||||
<label for="role_select">Override permissions for role</label>
|
<label for="role_select" class="m-none p-none"><span class="bold">Override permissions for role</span></label>
|
||||||
<select name="role_select" id="role_select" refs="entity-permissions@role-select">
|
<select name="role_select" id="role_select" refs="entity-permissions@role-select">
|
||||||
<option value="">{{ trans('common.select') }}</option>
|
<option value="">{{ trans('common.select') }}</option>
|
||||||
@foreach($data->rolesNotAssigned() as $role)
|
@foreach($data->rolesNotAssigned() as $role)
|
||||||
|
@ -56,6 +74,8 @@
|
||||||
])
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<hr class="mb-m">
|
||||||
|
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
|
<a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
|
||||||
<button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>
|
<button type="submit" class="button">{{ trans('entities.permissions_save') }}</button>
|
||||||
|
|
|
@ -16,9 +16,8 @@
|
||||||
]])
|
]])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<main class="card content-wrap">
|
<main class="card content-wrap auto-height">
|
||||||
<h1 class="list-heading">{{ trans('entities.pages_permissions') }}</h1>
|
@include('form.entity-permissions', ['model' => $page, 'title' => trans('entities.pages_permissions')])
|
||||||
@include('form.entity-permissions', ['model' => $page])
|
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
@section('body')
|
@section('body')
|
||||||
|
|
||||||
<div class="container small">
|
<div class="container">
|
||||||
|
|
||||||
<div class="my-s">
|
<div class="my-s">
|
||||||
@include('entities.breadcrumbs', ['crumbs' => [
|
@include('entities.breadcrumbs', ['crumbs' => [
|
||||||
|
@ -15,14 +15,15 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card content-wrap auto-height">
|
<div class="card content-wrap auto-height">
|
||||||
<h1 class="list-heading">{{ trans('entities.shelves_permissions') }}</h1>
|
@include('form.entity-permissions', ['model' => $shelf, 'title' => trans('entities.shelves_permissions')])
|
||||||
@include('form.entity-permissions', ['model' => $shelf])
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card content-wrap auto-height">
|
<div class="card content-wrap auto-height flex-container-row items-center gap-x-xl wrap">
|
||||||
<h2 class="list-heading">{{ trans('entities.shelves_copy_permissions_to_books') }}</h2>
|
<div class="flex">
|
||||||
<p>{{ trans('entities.shelves_copy_permissions_explain') }}</p>
|
<h2 class="list-heading">{{ trans('entities.shelves_copy_permissions_to_books') }}</h2>
|
||||||
<form action="{{ $shelf->getUrl('/copy-permissions') }}" method="post" class="text-right">
|
<p>{{ trans('entities.shelves_copy_permissions_explain') }}</p>
|
||||||
|
</div>
|
||||||
|
<form action="{{ $shelf->getUrl('/copy-permissions') }}" method="post" class="flex text-right">
|
||||||
{{ csrf_field() }}
|
{{ csrf_field() }}
|
||||||
<button class="button">{{ trans('entities.shelves_copy_permissions') }}</button>
|
<button class="button">{{ trans('entities.shelves_copy_permissions') }}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
@ -139,12 +139,12 @@ Route::middleware('auth')->group(function () {
|
||||||
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/copy', [ChapterController::class, 'copy']);
|
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/copy', [ChapterController::class, 'copy']);
|
||||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/edit', [ChapterController::class, 'edit']);
|
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/edit', [ChapterController::class, 'edit']);
|
||||||
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/convert-to-book', [ChapterController::class, 'convertToBook']);
|
Route::post('/books/{bookSlug}/chapter/{chapterSlug}/convert-to-book', [ChapterController::class, 'convertToBook']);
|
||||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/permissions', [PermissionsController::class, 'showForPage']);
|
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/permissions', [PermissionsController::class, 'showForChapter']);
|
||||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/pdf', [ChapterExportController::class, 'pdf']);
|
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/pdf', [ChapterExportController::class, 'pdf']);
|
||||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/html', [ChapterExportController::class, 'html']);
|
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/html', [ChapterExportController::class, 'html']);
|
||||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/markdown', [ChapterExportController::class, 'markdown']);
|
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/markdown', [ChapterExportController::class, 'markdown']);
|
||||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/plaintext', [ChapterExportController::class, 'plainText']);
|
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/export/plaintext', [ChapterExportController::class, 'plainText']);
|
||||||
Route::put('/books/{bookSlug}/chapter/{chapterSlug}/permissions', [PermissionsController::class, 'updateForPage']);
|
Route::put('/books/{bookSlug}/chapter/{chapterSlug}/permissions', [PermissionsController::class, 'updateForChapter']);
|
||||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/references', [ReferenceController::class, 'chapter']);
|
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/references', [ReferenceController::class, 'chapter']);
|
||||||
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/delete', [ChapterController::class, 'showDelete']);
|
Route::get('/books/{bookSlug}/chapter/{chapterSlug}/delete', [ChapterController::class, 'showDelete']);
|
||||||
Route::delete('/books/{bookSlug}/chapter/{chapterSlug}', [ChapterController::class, 'destroy']);
|
Route::delete('/books/{bookSlug}/chapter/{chapterSlug}', [ChapterController::class, 'destroy']);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user