Updated chapter views with new design

This commit is contained in:
Dan Brown 2017-08-26 14:36:48 +01:00
parent 8fcbe44d3e
commit 5187d3fa78
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
10 changed files with 128 additions and 85 deletions

View File

@ -3,6 +3,8 @@
background-color: $backgroundColor; background-color: $backgroundColor;
color: $textColor; color: $textColor;
text-transform: uppercase; text-transform: uppercase;
border: 1px solid $backgroundColor;
vertical-align: top;
&:hover { &:hover {
background-color: lighten($backgroundColor, 8%); background-color: lighten($backgroundColor, 8%);
//box-shadow: $bs-med; //box-shadow: $bs-med;
@ -83,6 +85,14 @@ $button-border-radius: 2px;
color: #FFF; color: #FFF;
} }
} }
&.book {
border-color: $color-book;
color: $color-book;
&:hover, &:focus, &:active {
background-color: $color-book;
color: #FFF;
}
}
} }
.text-button { .text-button {

View File

@ -110,8 +110,7 @@ return [
'chapters_create' => 'Create New Chapter', 'chapters_create' => 'Create New Chapter',
'chapters_delete' => 'Delete Chapter', 'chapters_delete' => 'Delete Chapter',
'chapters_delete_named' => 'Delete Chapter :chapterName', 'chapters_delete_named' => 'Delete Chapter :chapterName',
'chapters_delete_explain' => 'This will delete the chapter with the name \':chapterName\', All pages will be removed 'chapters_delete_explain' => 'This will delete the chapter with the name \':chapterName\'. All pages will be removed and added directly to the parent book.',
and added directly to the parent book.',
'chapters_delete_confirm' => 'Are you sure you want to delete this chapter?', 'chapters_delete_confirm' => 'Are you sure you want to delete this chapter?',
'chapters_edit' => 'Edit Chapter', 'chapters_edit' => 'Edit Chapter',
'chapters_edit_named' => 'Edit Chapter :chapterName', 'chapters_edit_named' => 'Edit Chapter :chapterName',

View File

@ -9,8 +9,9 @@
@section('body') @section('body')
<div class="container" ng-non-bindable> <div class="container" ng-non-bindable>
<p>&nbsp;</p>
<div class="card"> <div class="card">
<h3>{{ trans('entities.books_permissions') }}</h3> <h3><i class="zmdi zmdi-lock-outline"></i> {{ trans('entities.books_permissions') }}</h3>
<div class="body"> <div class="body">
@include('form/restriction-form', ['model' => $book]) @include('form/restriction-form', ['model' => $book])
</div> </div>

View File

@ -1,12 +1,26 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="col-sm-12 faded">
<div class="breadcrumbs">
<a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a>
<span class="sep">&raquo;</span>
<a href="{{ baseUrl('/books/chapter/create') }}" class="text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.chapters_create') }}</a>
</div>
</div>
@stop
@section('body')
<div class="container small" ng-non-bindable> <div class="container small" ng-non-bindable>
<h1>{{ trans('entities.chapters_create') }}</h1> <div class="card">
<form action="{{ $book->getUrl('/chapter/create') }}" method="POST"> <h3><i class="zmdi zmdi-plus"></i> {{ trans('entities.chapters_create') }}</h3>
@include('chapters/form') <div class="body">
</form> <form action="{{ $book->getUrl('/chapter/create') }}" method="POST">
@include('chapters/form')
</form>
</div>
</div>
</div> </div>
@stop @stop

View File

@ -1,28 +1,30 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="col-sm-12 faded">
@include('chapters._breadcrumbs', ['chapter' => $chapter])
</div>
@stop
<div class="faded-small toolbar"> @section('body')
<div class="container">
<div class="row"> <div class="container small" ng-non-bindable>
<div class="col-sm-12 faded"> <p>&nbsp;</p>
@include('chapters._breadcrumbs', ['chapter' => $chapter]) <div class="card">
</div> <h3><i class="zmdi zmdi-delete"></i> {{ trans('entities.chapters_delete') }}</h3>
<div class="body">
<p>{{ trans('entities.chapters_delete_explain', ['chapterName' => $chapter->name]) }}</p>
<p class="text-neg">{{ trans('entities.chapters_delete_confirm') }}</p>
<form action="{{ $chapter->getUrl() }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
<a href="{{ $chapter->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
</form>
</div> </div>
</div> </div>
</div> </div>
<div class="container small" ng-non-bindable>
<h1>{{ trans('entities.chapters_delete') }}</h1>
<p>{{ trans('entities.chapters_delete_explain', ['chapterName' => $chapter->name]) }}</p>
<p class="text-neg">{{ trans('entities.chapters_delete_confirm') }}</p>
<form action="{{ $chapter->getUrl() }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE">
<a href="{{ $chapter->getUrl() }}" class="button primary">{{ trans('common.cancel') }}</a>
<button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
</form>
</div>
@stop @stop

View File

@ -1,13 +1,24 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="col-sm-12 faded">
@include('chapters._breadcrumbs', ['chapter' => $chapter])
</div>
@stop
@section('body')
<div class="container small" ng-non-bindable> <div class="container small" ng-non-bindable>
<h1>{{ trans('entities.chapters_edit') }}</h1> <p>&nbsp;</p>
<form action="{{ $chapter->getUrl() }}" method="POST"> <div class="card">
<input type="hidden" name="_method" value="PUT"> <h3><i class="zmdi zmdi-edit"></i> {{ trans('entities.chapters_edit') }}</h3>
@include('chapters/form', ['model' => $chapter]) <div class="body">
</form> <form action="{{ $chapter->getUrl() }}" method="POST">
<input type="hidden" name="_method" value="PUT">
@include('chapters/form', ['model' => $chapter])
</form>
</div>
</div>
</div> </div>
@stop @stop

View File

@ -11,7 +11,7 @@
@include('form/textarea', ['name' => 'description']) @include('form/textarea', ['name' => 'description'])
</div> </div>
<div class="form-group"> <div class="form-group text-right">
<a href="{{ back()->getTargetUrl() }}" class="button muted">{{ trans('common.cancel') }}</a> <a href="{{ back()->getTargetUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button pos">{{ trans('entities.chapters_save') }}</button> <button type="submit" class="button pos">{{ trans('entities.chapters_save') }}</button>
</div> </div>

View File

@ -1,29 +1,34 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="col-sm-12 faded">
<div class="faded-small toolbar"> @include('chapters._breadcrumbs', ['chapter' => $chapter])
<div class="container">
<div class="row">
<div class="col-sm-12 faded">
@include('chapters._breadcrumbs', ['chapter' => $chapter])
</div>
</div>
</div>
</div> </div>
@stop
@section('body')
<div class="container"> <div class="container">
<h1>{{ trans('entities.chapters_move') }}</h1>
<form action="{{ $chapter->getUrl('/move') }}" method="POST"> <div class="card">
{!! csrf_field() !!} <h3><i class="zmdi zmdi-folder"></i> {{ trans('entities.chapters_move') }}</h3>
<input type="hidden" name="_method" value="PUT"> <div class="body">
<form action="{{ $chapter->getUrl('/move') }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="PUT">
@include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book'])
<div class="form-group text-right">
<a href="{{ $chapter->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button pos">{{ trans('entities.chapters_move') }}</button>
</div>
</form>
</div>
</div>
@include('components.entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book'])
<a href="{{ $chapter->getUrl() }}" class="button muted">{{ trans('common.cancel') }}</a>
<button type="submit" class="button pos">{{ trans('entities.chapters_move') }}</button>
</form>
</div> </div>
@stop @stop

View File

@ -1,20 +1,21 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="col-sm-12 faded">
@include('chapters._breadcrumbs', ['chapter' => $chapter])
</div>
@stop
<div class="faded-small toolbar"> @section('body')
<div class="container">
<div class="row"> <div class="container" ng-non-bindable>
<div class="col-sm-12 faded"> <p>&nbsp;</p>
@include('chapters._breadcrumbs', ['chapter' => $chapter]) <div class="card">
</div> <h3><i class="zmdi zmdi-lock-outline"></i> {{ trans('entities.chapters_permissions') }}</h3>
<div class="body">
@include('form/restriction-form', ['model' => $chapter])
</div> </div>
</div> </div>
</div> </div>
<div class="container" ng-non-bindable>
<h1>{{ trans('entities.chapters_permissions') }}</h1>
@include('form/restriction-form', ['model' => $chapter])
</div>
@stop @stop

View File

@ -110,20 +110,20 @@
@endforeach @endforeach
</div> </div>
@else @else
<hr> <div class="well">
<p class="text-muted">{{ trans('entities.chapters_empty') }}</p> <p class="text-muted italic">{{ trans('entities.chapters_empty') }}</p>
<p> <p>
@if(userCan('page-create', $chapter)) @if(userCan('page-create', $chapter))
<a href="{{ $chapter->getUrl('/create-page') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a> <a href="{{ $chapter->getUrl('/create-page') }}" class="button outline page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a>
@endif @endif
@if(userCan('page-create', $chapter) && userCan('book-update', $book)) @if(userCan('page-create', $chapter) && userCan('book-update', $book))
&nbsp;&nbsp;<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>&nbsp;&nbsp; &nbsp;
@endif @endif
@if(userCan('book-update', $book)) @if(userCan('book-update', $book))
<a href="{{ $book->getUrl('/sort') }}" class="text-book"><i class="zmdi zmdi-book"></i>{{ trans('entities.books_empty_sort_current_book') }}</a> <a href="{{ $book->getUrl('/sort') }}" class="button outline book"><i class="zmdi zmdi-book"></i>{{ trans('entities.books_empty_sort_current_book') }}</a>
@endif @endif
</p> </p>
<hr> </div>
@endif @endif
</div> </div>