Dan Brown

Extracted text from book & chapter views

...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
22 <php> 22 <php>
23 <env name="APP_ENV" value="testing"/> 23 <env name="APP_ENV" value="testing"/>
24 <env name="APP_DEBUG" value="false"/> 24 <env name="APP_DEBUG" value="false"/>
25 + <env name="APP_LANG" value="en"/>
25 <env name="CACHE_DRIVER" value="array"/> 26 <env name="CACHE_DRIVER" value="array"/>
26 <env name="SESSION_DRIVER" value="array"/> 27 <env name="SESSION_DRIVER" value="array"/>
27 <env name="QUEUE_DRIVER" value="sync"/> 28 <env name="QUEUE_DRIVER" value="sync"/>
......
1 +<?php
2 +return [
3 +
4 + /**
5 + * Buttons
6 + */
7 + 'cancel' => 'Cancel',
8 + 'confirm' => 'Confirm',
9 +
10 +
11 + /**
12 + * Form Labels
13 + */
14 + 'name' => 'Name',
15 + 'description' => 'Description',
16 +];
...\ No newline at end of file ...\ No newline at end of file
1 +<?php
2 +return [
3 +
4 + /**
5 + * Shared
6 + */
7 + 'recently_created' => 'Recently Created',
8 + 'recently_update' => 'Recently Updated',
9 + 'recently_viewed' => 'Recently Viewed',
10 + 'recent_activity' => 'Recent Activity',
11 + 'create_now' => 'Create one now',
12 + 'edit' => 'Edit',
13 + 'sort' => 'Sort',
14 + 'move' => 'Move',
15 + 'permissions' => 'Permissions',
16 + 'delete' => 'Delete',
17 + 'meta_created' => 'Created :timeLength',
18 + 'meta_created_name' => 'Created :timeLength by :user',
19 + 'meta_updated' => 'Updated :timeLength',
20 + 'meta_updated_name' => 'Updated :timeLength by :user',
21 + 'x_pages' => ':count Pages',
22 +
23 + /**
24 + * Search
25 + */
26 + 'search_results' => 'Search Results',
27 + 'search_clear' => 'Clear Search',
28 +
29 + /**
30 + * Books
31 + */
32 + 'books' => 'Books',
33 + 'books_empty' => 'No books have been created',
34 + 'books_popular' => 'Popular Books',
35 + 'books_popular_empty' => 'The most popular books will appear here.',
36 + 'books_create' => 'Create New Book',
37 + 'books_delete' => 'Delete Book',
38 + 'books_delete_explain' => 'This will delete the book with the name \':bookName\', All pages and chapters will be removed.',
39 + 'books_delete_confirmation' => 'Are you sure you want to delete this book?',
40 + 'books_edit' => 'Edit Book',
41 + 'books_form_book_name' => 'Book Name',
42 + 'books_save' => 'Save Book',
43 + 'books_permissions' => 'Book Permissions',
44 + 'books_empty_contents' => 'No pages or chapters have been created for this book.',
45 + 'books_empty_create_page' => 'Create a new page',
46 + 'books_empty_or' => 'or',
47 + 'books_empty_sort_current_book' => 'Sort the current book',
48 + 'books_empty_add_chapter' => 'Add a chapter',
49 + 'books_permissions_active' => 'Book Permissions Active',
50 + 'books_search_this' => 'Search this book',
51 + 'books_navigation' => 'Book Navigation',
52 +
53 + /**
54 + * Chapters
55 + */
56 + 'chapters_new' => 'New Chapter',
57 + 'chapters_create' => 'Create New Chapter',
58 + 'chapters_delete' => 'Delete Chapter',
59 + 'chapters_delete_explain' => 'This will delete the chapter with the name \':chapterName\', All pages will be removed
60 + and added directly to the parent book.',
61 + 'chapters_delete_confirm' => 'Are you sure you want to delete this chapter?',
62 + 'chapters_edit' => 'Edit Chapter',
63 + 'chapters_save' => 'Save Chapter',
64 + 'chapters_move' => 'Move Chapter',
65 + 'chapters_permissions' => 'Chapter Permissions',
66 + 'chapters_empty' => 'No pages are currently in this chapter.',
67 + 'chapters_permissions_active' => 'Chapter Permissions Active',
68 +
69 + /**
70 + * Pages
71 + */
72 + 'pages_new' => 'New Page',
73 + 'pages_attachments' => 'Attachments',
74 + 'pages_navigation' => 'Page Navigation',
75 +];
...\ No newline at end of file ...\ No newline at end of file
1 -1@extends('public') 1 +@extends('public')
2 2
3 @section('header-buttons') 3 @section('header-buttons')
4 <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a> 4 <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 @section('content') 3 @section('content')
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 - <h1>Create New Book</h1> 6 + <h1>{{ trans('entities.books_create') }}</h1>
7 <form action="{{ baseUrl("/books") }}" method="POST"> 7 <form action="{{ baseUrl("/books") }}" method="POST">
8 @include('books/form') 8 @include('books/form')
9 </form> 9 </form>
......
...@@ -3,15 +3,15 @@ ...@@ -3,15 +3,15 @@
3 @section('content') 3 @section('content')
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 - <h1>Delete Book</h1> 6 + <h1>{{ trans('entities.books_delete') }}</h1>
7 - <p>This will delete the book with the name '{{$book->name}}', All pages and chapters will be removed.</p> 7 + <p>{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}</p>
8 - <p class="text-neg">Are you sure you want to delete this book?</p> 8 + <p class="text-neg">{{ trans('entities.books_delete_confirmation') }}</p>
9 9
10 <form action="{{$book->getUrl()}}" method="POST"> 10 <form action="{{$book->getUrl()}}" method="POST">
11 {!! csrf_field() !!} 11 {!! csrf_field() !!}
12 <input type="hidden" name="_method" value="DELETE"> 12 <input type="hidden" name="_method" value="DELETE">
13 - <a href="{{$book->getUrl()}}" class="button">Cancel</a> 13 + <a href="{{$book->getUrl()}}" class="button">{{ trans('common.cancel') }}</a>
14 - <button type="submit" class="button neg">Confirm</button> 14 + <button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
15 </form> 15 </form>
16 </div> 16 </div>
17 17
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 @section('content') 3 @section('content')
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 - <h1>Edit Book</h1> 6 + <h1>{{ trans('entities.books_edit') }}</h1>
7 <form action="{{ $book->getUrl() }}" method="POST"> 7 <form action="{{ $book->getUrl() }}" method="POST">
8 <input type="hidden" name="_method" value="PUT"> 8 <input type="hidden" name="_method" value="PUT">
9 @include('books/form', ['model' => $book]) 9 @include('books/form', ['model' => $book])
......
1 1
2 {{ csrf_field() }} 2 {{ csrf_field() }}
3 <div class="form-group title-input"> 3 <div class="form-group title-input">
4 - <label for="name">Book Name</label> 4 + <label for="name">{{ trans('common.name') }}</label>
5 @include('form/text', ['name' => 'name']) 5 @include('form/text', ['name' => 'name'])
6 </div> 6 </div>
7 7
8 <div class="form-group description-input"> 8 <div class="form-group description-input">
9 - <label for="description">Description</label> 9 + <label for="description">{{ trans('common.description') }}</label>
10 @include('form/textarea', ['name' => 'description']) 10 @include('form/textarea', ['name' => 'description'])
11 </div> 11 </div>
12 12
13 <div class="form-group"> 13 <div class="form-group">
14 - <a href="{{ back()->getTargetUrl() }}" class="button muted">Cancel</a> 14 + <a href="{{ back()->getTargetUrl() }}" class="button muted">{{ trans('common.cancel') }}</a>
15 - <button type="submit" class="button pos">Save Book</button> 15 + <button type="submit" class="button pos">{{ trans('entities.books_save') }}</button>
16 </div> 16 </div>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
9 <div class="col-xs-11 faded"> 9 <div class="col-xs-11 faded">
10 <div class="action-buttons"> 10 <div class="action-buttons">
11 @if($currentUser->can('book-create-all')) 11 @if($currentUser->can('book-create-all'))
12 - <a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>Add new book</a> 12 + <a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.books_create') }}</a>
13 @endif 13 @endif
14 </div> 14 </div>
15 </div> 15 </div>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 <div class="container" ng-non-bindable> 21 <div class="container" ng-non-bindable>
22 <div class="row"> 22 <div class="row">
23 <div class="col-sm-7"> 23 <div class="col-sm-7">
24 - <h1>Books</h1> 24 + <h1>{{ trans('entities.books') }}</h1>
25 @if(count($books) > 0) 25 @if(count($books) > 0)
26 @foreach($books as $book) 26 @foreach($books as $book)
27 @include('books/list-item', ['book' => $book]) 27 @include('books/list-item', ['book' => $book])
...@@ -29,27 +29,27 @@ ...@@ -29,27 +29,27 @@
29 @endforeach 29 @endforeach
30 {!! $books->render() !!} 30 {!! $books->render() !!}
31 @else 31 @else
32 - <p class="text-muted">No books have been created.</p> 32 + <p class="text-muted">{{ trans('entities.books_empty') }}</p>
33 @if(userCan('books-create-all')) 33 @if(userCan('books-create-all'))
34 - <a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>Create one now</a> 34 + <a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>{{ trans('entities.create_one_now') }}</a>
35 @endif 35 @endif
36 @endif 36 @endif
37 </div> 37 </div>
38 <div class="col-sm-4 col-sm-offset-1"> 38 <div class="col-sm-4 col-sm-offset-1">
39 <div id="recents"> 39 <div id="recents">
40 @if($recents) 40 @if($recents)
41 - <div class="margin-top large">&nbsp;</div> 41 + <div class="margin-top">&nbsp;</div>
42 - <h3>Recently Viewed</h3> 42 + <h3>{{ trans('entities.recently_viewed') }}</h3>
43 @include('partials/entity-list', ['entities' => $recents]) 43 @include('partials/entity-list', ['entities' => $recents])
44 @endif 44 @endif
45 </div> 45 </div>
46 <div class="margin-top large">&nbsp;</div> 46 <div class="margin-top large">&nbsp;</div>
47 <div id="popular"> 47 <div id="popular">
48 - <h3>Popular Books</h3> 48 + <h3>{{ trans('entities.books_popular') }}</h3>
49 @if(count($popular) > 0) 49 @if(count($popular) > 0)
50 @include('partials/entity-list', ['entities' => $popular]) 50 @include('partials/entity-list', ['entities' => $popular])
51 @else 51 @else
52 - <p class="text-muted">The most popular books will appear here.</p> 52 + <p class="text-muted">{{ trans('entities.books_popular_empty') }}</p>
53 @endif 53 @endif
54 </div> 54 </div>
55 </div> 55 </div>
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
16 16
17 17
18 <div class="container" ng-non-bindable> 18 <div class="container" ng-non-bindable>
19 - <h1>Book Permissions</h1> 19 + <h1>{{ trans('entities.books_permissions') }}</h1>
20 @include('form/restriction-form', ['model' => $book]) 20 @include('form/restriction-form', ['model' => $book])
21 </div> 21 </div>
22 22
......
...@@ -8,26 +8,26 @@ ...@@ -8,26 +8,26 @@
8 <div class="col-md-12"> 8 <div class="col-md-12">
9 <div class="action-buttons faded"> 9 <div class="action-buttons faded">
10 @if(userCan('page-create', $book)) 10 @if(userCan('page-create', $book))
11 - <a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Page</a> 11 + <a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.pages_new') }}</a>
12 @endif 12 @endif
13 @if(userCan('chapter-create', $book)) 13 @if(userCan('chapter-create', $book))
14 - <a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i> New Chapter</a> 14 + <a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.chapters_new') }}</a>
15 @endif 15 @endif
16 @if(userCan('book-update', $book)) 16 @if(userCan('book-update', $book))
17 - <a href="{{$book->getEditUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a> 17 + <a href="{{$book->getEditUrl()}}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>{{ trans('entities.edit') }}</a>
18 @endif 18 @endif
19 @if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book)) 19 @if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book))
20 <div dropdown class="dropdown-container"> 20 <div dropdown class="dropdown-container">
21 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a> 21 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
22 <ul> 22 <ul>
23 @if(userCan('book-update', $book)) 23 @if(userCan('book-update', $book))
24 - <li><a href="{{ $book->getUrl('/sort') }}" class="text-primary"><i class="zmdi zmdi-sort"></i>Sort</a></li> 24 + <li><a href="{{ $book->getUrl('/sort') }}" class="text-primary"><i class="zmdi zmdi-sort"></i>{{ trans('entities.sort') }}</a></li>
25 @endif 25 @endif
26 @if(userCan('restrictions-manage', $book)) 26 @if(userCan('restrictions-manage', $book))
27 - <li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li> 27 + <li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li>
28 @endif 28 @endif
29 @if(userCan('book-delete', $book)) 29 @if(userCan('book-delete', $book))
30 - <li><a href="{{ $book->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li> 30 + <li><a href="{{ $book->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('entities.delete') }}</a></li>
31 @endif 31 @endif
32 </ul> 32 </ul>
33 </div> 33 </div>
...@@ -59,23 +59,19 @@ ...@@ -59,23 +59,19 @@
59 <hr> 59 <hr>
60 @endforeach 60 @endforeach
61 @else 61 @else
62 - <p class="text-muted">No pages or chapters have been created for this book.</p> 62 + <p class="text-muted">{{ trans('entities.books_empty_contents') }}</p>
63 <p> 63 <p>
64 - <a href="{{ $book->getUrl('/page/create') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a> 64 + <a href="{{ $book->getUrl('/page/create') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a>
65 - &nbsp;&nbsp;<em class="text-muted">-or-</em>&nbsp;&nbsp;&nbsp; 65 + &nbsp;&nbsp;<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>&nbsp;&nbsp;&nbsp;
66 - <a href="{{ $book->getUrl('/chapter/create') }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>Add a chapter</a> 66 + <a href="{{ $book->getUrl('/chapter/create') }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>{{ trans('entities.books_empty_add_chapter') }}</a>
67 </p> 67 </p>
68 <hr> 68 <hr>
69 @endif 69 @endif
70 - <p class="text-muted small"> 70 + @include('partials.entity-meta', ['entity' => $book])
71 - Created {{$book->created_at->diffForHumans()}} @if($book->createdBy) by <a href="{{ $book->createdBy->getProfileUrl() }}">{{$book->createdBy->name}}</a> @endif
72 - <br>
73 - Last Updated {{$book->updated_at->diffForHumans()}} @if($book->updatedBy) by <a href="{{ $book->updatedBy->getProfileUrl() }}">{{$book->updatedBy->name}}</a> @endif
74 - </p>
75 </div> 71 </div>
76 </div> 72 </div>
77 <div class="search-results" ng-cloak ng-show="searching"> 73 <div class="search-results" ng-cloak ng-show="searching">
78 - <h3 class="text-muted">Search Results <a ng-if="searching" ng-click="clearSearch()" class="text-small"><i class="zmdi zmdi-close"></i>Clear Search</a></h3> 74 + <h3 class="text-muted">{{ trans('entities.search_results') }} <a ng-if="searching" ng-click="clearSearch()" class="text-small"><i class="zmdi zmdi-close"></i>{{ trans('entities.search_clear') }}</a></h3>
79 <div ng-if="!searchResults"> 75 <div ng-if="!searchResults">
80 @include('partials/loading-icon') 76 @include('partials/loading-icon')
81 </div> 77 </div>
...@@ -90,21 +86,21 @@ ...@@ -90,21 +86,21 @@
90 @if($book->restricted) 86 @if($book->restricted)
91 <p class="text-muted"> 87 <p class="text-muted">
92 @if(userCan('restrictions-manage', $book)) 88 @if(userCan('restrictions-manage', $book))
93 - <a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a> 89 + <a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}</a>
94 @else 90 @else
95 - <i class="zmdi zmdi-lock-outline"></i>Book Permissions Active 91 + <i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}
96 @endif 92 @endif
97 </p> 93 </p>
98 @endif 94 @endif
99 <div class="search-box"> 95 <div class="search-box">
100 <form ng-submit="searchBook($event)"> 96 <form ng-submit="searchBook($event)">
101 - <input ng-model="searchTerm" ng-change="checkSearchForm()" type="text" name="term" placeholder="Search This Book"> 97 + <input ng-model="searchTerm" ng-change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}">
102 <button type="submit"><i class="zmdi zmdi-search"></i></button> 98 <button type="submit"><i class="zmdi zmdi-search"></i></button>
103 <button ng-if="searching" ng-click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button> 99 <button ng-if="searching" ng-click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button>
104 </form> 100 </form>
105 </div> 101 </div>
106 <div class="activity anim fadeIn"> 102 <div class="activity anim fadeIn">
107 - <h3>Recent Activity</h3> 103 + <h3>{{ trans('entities.recent_activity') }}</h3>
108 @include('partials/activity-list', ['activity' => Activity::entityActivity($book, 20, 0)]) 104 @include('partials/activity-list', ['activity' => Activity::entityActivity($book, 20, 0)])
109 </div> 105 </div>
110 </div> 106 </div>
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 @section('content') 3 @section('content')
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 - <h1>Create New Chapter</h1> 6 + <h1>{{ trans('entities.chapters_create') }}</h1>
7 <form action="{{ $book->getUrl('/chapter/create') }}" method="POST"> 7 <form action="{{ $book->getUrl('/chapter/create') }}" method="POST">
8 @include('chapters/form') 8 @include('chapters/form')
9 </form> 9 </form>
......
...@@ -3,16 +3,15 @@ ...@@ -3,16 +3,15 @@
3 @section('content') 3 @section('content')
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 - <h1>Delete Chapter</h1> 6 + <h1>{{ trans('entities.chapters_delete') }}</h1>
7 - <p>This will delete the chapter with the name '{{$chapter->name}}', All pages will be removed 7 + <p>{{ trans('entities.chapters_delete_explain', ['chapterName' => $chapter->name]) }}</p>
8 - and added directly to the book.</p> 8 + <p class="text-neg">{{ trans('entities.chapters_delete_confirm') }}</p>
9 - <p class="text-neg">Are you sure you want to delete this chapter?</p>
10 9
11 <form action="{{ $chapter->getUrl() }}" method="POST"> 10 <form action="{{ $chapter->getUrl() }}" method="POST">
12 {!! csrf_field() !!} 11 {!! csrf_field() !!}
13 <input type="hidden" name="_method" value="DELETE"> 12 <input type="hidden" name="_method" value="DELETE">
14 - <a href="{{ $chapter->getUrl() }}" class="button primary">Cancel</a> 13 + <a href="{{ $chapter->getUrl() }}" class="button primary">{{ trans('common.cancel') }}</a>
15 - <button type="submit" class="button neg">Confirm</button> 14 + <button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
16 </form> 15 </form>
17 </div> 16 </div>
18 17
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 @section('content') 3 @section('content')
4 4
5 <div class="container small" ng-non-bindable> 5 <div class="container small" ng-non-bindable>
6 - <h1>Edit Chapter</h1> 6 + <h1>{{ trans('entities.chapters_edit') }}</h1>
7 <form action="{{ $chapter->getUrl() }}" method="POST"> 7 <form action="{{ $chapter->getUrl() }}" method="POST">
8 <input type="hidden" name="_method" value="PUT"> 8 <input type="hidden" name="_method" value="PUT">
9 @include('chapters/form', ['model' => $chapter]) 9 @include('chapters/form', ['model' => $chapter])
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
2 {!! csrf_field() !!} 2 {!! csrf_field() !!}
3 3
4 <div class="form-group title-input"> 4 <div class="form-group title-input">
5 - <label for="name">Chapter Name</label> 5 + <label for="name">{{ trans('common.name') }}</label>
6 @include('form/text', ['name' => 'name']) 6 @include('form/text', ['name' => 'name'])
7 </div> 7 </div>
8 8
9 <div class="form-group description-input"> 9 <div class="form-group description-input">
10 - <label for="description">Description</label> 10 + <label for="description">{{ trans('common.description') }}</label>
11 @include('form/textarea', ['name' => 'description']) 11 @include('form/textarea', ['name' => 'description'])
12 </div> 12 </div>
13 13
14 <div class="form-group"> 14 <div class="form-group">
15 - <a href="{{ back()->getTargetUrl() }}" class="button muted">Cancel</a> 15 + <a href="{{ back()->getTargetUrl() }}" class="button muted">{{ trans('common.cancel') }}</a>
16 - <button type="submit" class="button pos">Save Chapter</button> 16 + <button type="submit" class="button pos">{{ trans('entities.chapters_save') }}</button>
17 </div> 17 </div>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 @endif 17 @endif
18 18
19 @if(!isset($hidePages) && count($chapter->pages) > 0) 19 @if(!isset($hidePages) && count($chapter->pages) > 0)
20 - <p class="text-muted chapter-toggle"><i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ count($chapter->pages) }} Pages</span></p> 20 + <p class="text-muted chapter-toggle"><i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ trans('entities.x_pages', ['count' => $chapter->pages->count()]) }}</span></p>
21 <div class="inset-list"> 21 <div class="inset-list">
22 @foreach($chapter->pages as $page) 22 @foreach($chapter->pages as $page)
23 <h5 class="@if($page->draft) draft @endif"><a href="{{ $page->getUrl() }}" class="text-page @if($page->draft) draft @endif"><i class="zmdi zmdi-file-text"></i>{{$page->name}}</a></h5> 23 <h5 class="@if($page->draft) draft @endif"><a href="{{ $page->getUrl() }}" class="text-page @if($page->draft) draft @endif"><i class="zmdi zmdi-file-text"></i>{{$page->name}}</a></h5>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 </div> 17 </div>
18 18
19 <div class="container"> 19 <div class="container">
20 - <h1>Move Chapter <small class="subheader">{{$chapter->name}}</small></h1> 20 + <h1>{{ trans('entities.chapters_move') }} <small class="subheader">{{$chapter->name}}</small></h1>
21 21
22 <form action="{{ $chapter->getUrl('/move') }}" method="POST"> 22 <form action="{{ $chapter->getUrl('/move') }}" method="POST">
23 {!! csrf_field() !!} 23 {!! csrf_field() !!}
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
25 25
26 @include('partials/entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book']) 26 @include('partials/entity-selector', ['name' => 'entity_selection', 'selectorSize' => 'large', 'entityTypes' => 'book'])
27 27
28 - <a href="{{ $chapter->getUrl() }}" class="button muted">Cancel</a> 28 + <a href="{{ $chapter->getUrl() }}" class="button muted">{{ trans('common.cancel') }}</a>
29 - <button type="submit" class="button pos">Move Chapter</button> 29 + <button type="submit" class="button pos">{{ trans('entities.chapters_move') }}</button>
30 </form> 30 </form>
31 </div> 31 </div>
32 32
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 </div> 17 </div>
18 18
19 <div class="container" ng-non-bindable> 19 <div class="container" ng-non-bindable>
20 - <h1>Chapter Permissions</h1> 20 + <h1>{{ trans('entities.chapters_permissions') }}</h1>
21 @include('form/restriction-form', ['model' => $chapter]) 21 @include('form/restriction-form', ['model' => $chapter])
22 </div> 22 </div>
23 23
......
...@@ -13,23 +13,23 @@ ...@@ -13,23 +13,23 @@
13 <div class="col-sm-4 faded"> 13 <div class="col-sm-4 faded">
14 <div class="action-buttons"> 14 <div class="action-buttons">
15 @if(userCan('page-create', $chapter)) 15 @if(userCan('page-create', $chapter))
16 - <a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>New Page</a> 16 + <a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.pages_new') }}</a>
17 @endif 17 @endif
18 @if(userCan('chapter-update', $chapter)) 18 @if(userCan('chapter-update', $chapter))
19 - <a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>Edit</a> 19 + <a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>{{ trans('entities.edit') }}</a>
20 @endif 20 @endif
21 @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter)) 21 @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
22 <div dropdown class="dropdown-container"> 22 <div dropdown class="dropdown-container">
23 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a> 23 <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i></a>
24 <ul> 24 <ul>
25 @if(userCan('chapter-update', $chapter)) 25 @if(userCan('chapter-update', $chapter))
26 - <li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary"><i class="zmdi zmdi-folder"></i>Move</a></li> 26 + <li><a href="{{ $chapter->getUrl('/move') }}" class="text-primary"><i class="zmdi zmdi-folder"></i>{{ trans('entities.move') }}</a></li>
27 @endif 27 @endif
28 @if(userCan('restrictions-manage', $chapter)) 28 @if(userCan('restrictions-manage', $chapter))
29 - <li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>Permissions</a></li> 29 + <li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li>
30 @endif 30 @endif
31 @if(userCan('chapter-delete', $chapter)) 31 @if(userCan('chapter-delete', $chapter))
32 - <li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>Delete</a></li> 32 + <li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('entities.delete') }}</a></li>
33 @endif 33 @endif
34 </ul> 34 </ul>
35 </div> 35 </div>
...@@ -57,26 +57,22 @@ ...@@ -57,26 +57,22 @@
57 </div> 57 </div>
58 @else 58 @else
59 <hr> 59 <hr>
60 - <p class="text-muted">No pages are currently in this chapter.</p> 60 + <p class="text-muted">{{ trans('entities.chapters_empty') }}</p>
61 <p> 61 <p>
62 @if(userCan('page-create', $chapter)) 62 @if(userCan('page-create', $chapter))
63 - <a href="{{ $chapter->getUrl('/create-page') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>Create a new page</a> 63 + <a href="{{ $chapter->getUrl('/create-page') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a>
64 @endif 64 @endif
65 @if(userCan('page-create', $chapter) && userCan('book-update', $book)) 65 @if(userCan('page-create', $chapter) && userCan('book-update', $book))
66 - &nbsp;&nbsp;<em class="text-muted">-or-</em>&nbsp;&nbsp;&nbsp; 66 + &nbsp;&nbsp;<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>&nbsp;&nbsp;&nbsp;
67 @endif 67 @endif
68 @if(userCan('book-update', $book)) 68 @if(userCan('book-update', $book))
69 - <a href="{{ $book->getUrl('/sort') }}" class="text-book"><i class="zmdi zmdi-book"></i>Sort the current book</a> 69 + <a href="{{ $book->getUrl('/sort') }}" class="text-book"><i class="zmdi zmdi-book"></i>{{ trans('entities.books_empty_sort_current_book') }}</a>
70 @endif 70 @endif
71 </p> 71 </p>
72 <hr> 72 <hr>
73 @endif 73 @endif
74 74
75 - <p class="text-muted small"> 75 + @include('partials.entity-meta', ['entity' => $chapter])
76 - Created {{ $chapter->created_at->diffForHumans() }} @if($chapter->createdBy) by <a href="{{ $chapter->createdBy->getProfileUrl() }}">{{ $chapter->createdBy->name}}</a> @endif
77 - <br>
78 - Last Updated {{ $chapter->updated_at->diffForHumans() }} @if($chapter->updatedBy) by <a href="{{ $chapter->updatedBy->getProfileUrl() }}">{{ $chapter->updatedBy->name}}</a> @endif
79 - </p>
80 </div> 76 </div>
81 <div class="col-md-3 col-md-offset-1"> 77 <div class="col-md-3 col-md-offset-1">
82 <div class="margin-top large"></div> 78 <div class="margin-top large"></div>
...@@ -84,19 +80,20 @@ ...@@ -84,19 +80,20 @@
84 <div class="text-muted"> 80 <div class="text-muted">
85 81
86 @if($book->restricted) 82 @if($book->restricted)
83 + <p class="text-muted">
87 @if(userCan('restrictions-manage', $book)) 84 @if(userCan('restrictions-manage', $book))
88 - <a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Book Permissions Active</a> 85 + <a href="{{ $book->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}</a>
89 @else 86 @else
90 - <i class="zmdi zmdi-lock-outline"></i>Book Permissions Active 87 + <i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.books_permissions_active') }}
91 @endif 88 @endif
92 - <br> 89 + </p>
93 @endif 90 @endif
94 91
95 @if($chapter->restricted) 92 @if($chapter->restricted)
96 @if(userCan('restrictions-manage', $chapter)) 93 @if(userCan('restrictions-manage', $chapter))
97 - <a href="{{ $chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active</a> 94 + <a href="{{ $chapter->getUrl('/permissions') }}"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}</a>
98 @else 95 @else
99 - <i class="zmdi zmdi-lock-outline"></i>Chapter Permissions Active 96 + <i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.chapters_permissions_active') }}
100 @endif 97 @endif
101 @endif 98 @endif
102 </div> 99 </div>
......
...@@ -72,11 +72,7 @@ ...@@ -72,11 +72,7 @@
72 72
73 <hr> 73 <hr>
74 74
75 - <p class="text-muted small"> 75 + @include('partials.entity-meta', ['entity' => $page])
76 - Created {{ $page->created_at->diffForHumans() }} @if($page->createdBy) by <a href="{{ $page->createdBy->getProfileUrl() }}">{{$page->createdBy->name}}</a> @endif
77 - <br>
78 - Last Updated {{ $page->updated_at->diffForHumans() }} @if($page->updatedBy) by <a href="{{ $page->updatedBy->getProfileUrl() }}">{{$page->updatedBy->name}}</a> @endif
79 - </p>
80 76
81 </div> 77 </div>
82 </div> 78 </div>
......
...@@ -2,16 +2,16 @@ ...@@ -2,16 +2,16 @@
2 <div class="book-tree" ng-non-bindable> 2 <div class="book-tree" ng-non-bindable>
3 3
4 @if (isset($page) && $page->attachments->count() > 0) 4 @if (isset($page) && $page->attachments->count() > 0)
5 - <h6 class="text-muted">Attachments</h6> 5 + <h6 class="text-muted">{{ trans('entities.pages_attachments') }}</h6>
6 @foreach($page->attachments as $attachment) 6 @foreach($page->attachments as $attachment)
7 <div class="attachment"> 7 <div class="attachment">
8 - <a href="{{ $attachment->getUrl() }}" @if($attachment->external) target="_blank" @endif><i class="zmdi zmdi-{{ $attachment->external ? 'open-in-new' : 'file' }}"></i> {{ $attachment->name }}</a> 8 + <a href="{{ $attachment->getUrl() }}" @if($attachment->external) target="_blank" @endif><i class="zmdi zmdi-{{ $attachment->external ? 'open-in-new' : 'file' }}"></i>{{ $attachment->name }}</a>
9 </div> 9 </div>
10 @endforeach 10 @endforeach
11 @endif 11 @endif
12 12
13 @if (isset($pageNav) && $pageNav) 13 @if (isset($pageNav) && $pageNav)
14 - <h6 class="text-muted">Page Navigation</h6> 14 + <h6 class="text-muted">{{ trans('entities.pages_navigation') }}</h6>
15 <div class="sidebar-page-nav menu"> 15 <div class="sidebar-page-nav menu">
16 @foreach($pageNav as $navItem) 16 @foreach($pageNav as $navItem)
17 <li class="page-nav-item {{ $navItem['nodeName'] }}"> 17 <li class="page-nav-item {{ $navItem['nodeName'] }}">
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
21 </div> 21 </div>
22 @endif 22 @endif
23 23
24 - <h6 class="text-muted">Book Navigation</h6> 24 + <h6 class="text-muted">{{ trans('entities.books_navigation') }}</h6>
25 <ul class="sidebar-page-list menu"> 25 <ul class="sidebar-page-list menu">
26 <li class="book-header"><a href="{{ $book->getUrl() }}" class="book {{ $current->matches($book)? 'selected' : '' }}"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li> 26 <li class="book-header"><a href="{{ $book->getUrl() }}" class="book {{ $current->matches($book)? 'selected' : '' }}"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li>
27 27
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
34 34
35 @if($bookChild->isA('chapter') && count($bookChild->pages) > 0) 35 @if($bookChild->isA('chapter') && count($bookChild->pages) > 0)
36 <p class="text-muted chapter-toggle @if($bookChild->matchesOrContains($current)) open @endif"> 36 <p class="text-muted chapter-toggle @if($bookChild->matchesOrContains($current)) open @endif">
37 - <i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ count($bookChild->pages) }} Pages</span> 37 + <i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ trans('entities.x_pages', ['count' => $bookChild->pages->count()]) }}</span>
38 </p> 38 </p>
39 <ul class="menu sub-menu inset-list @if($bookChild->matchesOrContains($current)) open @endif"> 39 <ul class="menu sub-menu inset-list @if($bookChild->matchesOrContains($current)) open @endif">
40 @foreach($bookChild->pages as $childPage) 40 @foreach($bookChild->pages as $childPage)
......
1 +<p class="text-muted small">
2 + @if ($entity->createdBy)
3 + {!! trans('entities.meta_created_name', ['timeLength' => $entity->created_at->diffForHumans(), 'user' => "<a href='{$entity->createdBy->getProfileUrl()}'>".htmlentities($entity->createdBy->name). "</a>"]) !!}
4 + @else
5 + {{ trans('entities.meta_created', ['timeLength' => $entity->created_at->diffForHumans()]) }}
6 + @endif
7 + <br>
8 + @if ($entity->updatedBy)
9 + {!! trans('entities.meta_updated_name', ['timeLength' => $entity->updated_at->diffForHumans(), 'user' => "<a href='{$entity->updatedBy->getProfileUrl()}'>".htmlentities($entity->updatedBy->name). "</a>"]) !!}
10 + @else
11 + {{ trans('entities.meta_updated', ['timeLength' => $entity->updated_at->diffForHumans()]) }}
12 + @endif
13 +</p>
...\ No newline at end of file ...\ No newline at end of file
...@@ -245,7 +245,7 @@ class AuthTest extends TestCase ...@@ -245,7 +245,7 @@ class AuthTest extends TestCase
245 { 245 {
246 $this->setSettings(['registration-enabled' => 'true']); 246 $this->setSettings(['registration-enabled' => 'true']);
247 $this->visit('/password/email') 247 $this->visit('/password/email')
248 - ->seeLink('Sign in') 248 + ->seeLink('Log in')
249 ->seeLink('Sign up'); 249 ->seeLink('Sign up');
250 } 250 }
251 251
...@@ -260,6 +260,6 @@ class AuthTest extends TestCase ...@@ -260,6 +260,6 @@ class AuthTest extends TestCase
260 return $this->visit('/login') 260 return $this->visit('/login')
261 ->type($email, '#email') 261 ->type($email, '#email')
262 ->type($password, '#password') 262 ->type($password, '#password')
263 - ->press('Sign In'); 263 + ->press('Log In');
264 } 264 }
265 } 265 }
......
...@@ -36,11 +36,11 @@ class LdapTest extends \TestCase ...@@ -36,11 +36,11 @@ class LdapTest extends \TestCase
36 ->see('Username') 36 ->see('Username')
37 ->type($this->mockUser->name, '#username') 37 ->type($this->mockUser->name, '#username')
38 ->type($this->mockUser->password, '#password') 38 ->type($this->mockUser->password, '#password')
39 - ->press('Sign In') 39 + ->press('Log In')
40 ->seePageIs('/login')->see('Please enter an email to use for this account.'); 40 ->seePageIs('/login')->see('Please enter an email to use for this account.');
41 41
42 $this->type($this->mockUser->email, '#email') 42 $this->type($this->mockUser->email, '#email')
43 - ->press('Sign In') 43 + ->press('Log In')
44 ->seePageIs('/') 44 ->seePageIs('/')
45 ->see($this->mockUser->name) 45 ->see($this->mockUser->name)
46 ->seeInDatabase('users', ['email' => $this->mockUser->email, 'email_confirmed' => false, 'external_auth_id' => $this->mockUser->name]); 46 ->seeInDatabase('users', ['email' => $this->mockUser->email, 'email_confirmed' => false, 'external_auth_id' => $this->mockUser->name]);
...@@ -64,7 +64,7 @@ class LdapTest extends \TestCase ...@@ -64,7 +64,7 @@ class LdapTest extends \TestCase
64 ->see('Username') 64 ->see('Username')
65 ->type($this->mockUser->name, '#username') 65 ->type($this->mockUser->name, '#username')
66 ->type($this->mockUser->password, '#password') 66 ->type($this->mockUser->password, '#password')
67 - ->press('Sign In') 67 + ->press('Log In')
68 ->seePageIs('/') 68 ->seePageIs('/')
69 ->see($this->mockUser->name) 69 ->see($this->mockUser->name)
70 ->seeInDatabase('users', ['email' => $this->mockUser->email, 'email_confirmed' => false, 'external_auth_id' => $ldapDn]); 70 ->seeInDatabase('users', ['email' => $this->mockUser->email, 'email_confirmed' => false, 'external_auth_id' => $ldapDn]);
...@@ -87,7 +87,7 @@ class LdapTest extends \TestCase ...@@ -87,7 +87,7 @@ class LdapTest extends \TestCase
87 ->see('Username') 87 ->see('Username')
88 ->type($this->mockUser->name, '#username') 88 ->type($this->mockUser->name, '#username')
89 ->type($this->mockUser->password, '#password') 89 ->type($this->mockUser->password, '#password')
90 - ->press('Sign In') 90 + ->press('Log In')
91 ->seePageIs('/login')->see('These credentials do not match our records.') 91 ->seePageIs('/login')->see('These credentials do not match our records.')
92 ->dontSeeInDatabase('users', ['external_auth_id' => $this->mockUser->name]); 92 ->dontSeeInDatabase('users', ['external_auth_id' => $this->mockUser->name]);
93 } 93 }
......
...@@ -136,7 +136,7 @@ class EntityTest extends TestCase ...@@ -136,7 +136,7 @@ class EntityTest extends TestCase
136 $this->asAdmin() 136 $this->asAdmin()
137 ->visit('/books') 137 ->visit('/books')
138 // Choose to create a book 138 // Choose to create a book
139 - ->click('Add new book') 139 + ->click('Create New Book')
140 ->seePageIs('/books/create') 140 ->seePageIs('/books/create')
141 // Fill out form & save 141 // Fill out form & save
142 ->type($book->name, '#name') 142 ->type($book->name, '#name')
......
...@@ -211,7 +211,7 @@ class RolesTest extends TestCase ...@@ -211,7 +211,7 @@ class RolesTest extends TestCase
211 $this->checkAccessPermission('book-create-all', [ 211 $this->checkAccessPermission('book-create-all', [
212 '/books/create' 212 '/books/create'
213 ], [ 213 ], [
214 - '/books' => 'Add new book' 214 + '/books' => 'Create New Book'
215 ]); 215 ]);
216 216
217 $this->visit('/books/create') 217 $this->visit('/books/create')
......