Dan Brown

Moved text for errors and form views.

Updated 404 page with additional links
...@@ -13,4 +13,14 @@ return [ ...@@ -13,4 +13,14 @@ return [
13 */ 13 */
14 'name' => 'Name', 14 'name' => 'Name',
15 'description' => 'Description', 15 'description' => 'Description',
16 + 'role' => 'Role',
17 +
18 + /**
19 + * Actions
20 + */
21 + 'actions' => 'Actions',
22 + 'view' => 'View',
23 + 'create' => 'Create',
24 + 'update' => 'Update',
25 + 'delete' => 'Delete',
16 ]; 26 ];
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -12,7 +12,6 @@ return [ ...@@ -12,7 +12,6 @@ return [
12 'edit' => 'Edit', 12 'edit' => 'Edit',
13 'sort' => 'Sort', 13 'sort' => 'Sort',
14 'move' => 'Move', 14 'move' => 'Move',
15 - 'permissions' => 'Permissions',
16 'delete' => 'Delete', 15 'delete' => 'Delete',
17 'meta_created' => 'Created :timeLength', 16 'meta_created' => 'Created :timeLength',
18 'meta_created_name' => 'Created :timeLength by :user', 17 'meta_created_name' => 'Created :timeLength by :user',
...@@ -21,6 +20,14 @@ return [ ...@@ -21,6 +20,14 @@ return [
21 'x_pages' => ':count Pages', 20 'x_pages' => ':count Pages',
22 21
23 /** 22 /**
23 + * Permissions and restrictions
24 + */
25 + 'permissions' => 'Permissions',
26 + 'permissions_intro' => 'Once enabled, These permissions will take priority over any set role permissions.',
27 + 'permissions_enable' => 'Enable Custom Permissions',
28 + 'permissions_save' => 'Save Permissions',
29 +
30 + /**
24 * Search 31 * Search
25 */ 32 */
26 'search_results' => 'Search Results', 33 'search_results' => 'Search Results',
...@@ -53,6 +60,7 @@ return [ ...@@ -53,6 +60,7 @@ return [
53 /** 60 /**
54 * Chapters 61 * Chapters
55 */ 62 */
63 + 'chapters_popular' => 'Popular Chapters',
56 'chapters_new' => 'New Chapter', 64 'chapters_new' => 'New Chapter',
57 'chapters_create' => 'Create New Chapter', 65 'chapters_create' => 'Create New Chapter',
58 'chapters_delete' => 'Delete Chapter', 66 'chapters_delete' => 'Delete Chapter',
...@@ -69,6 +77,7 @@ return [ ...@@ -69,6 +77,7 @@ return [
69 /** 77 /**
70 * Pages 78 * Pages
71 */ 79 */
80 + 'pages_popular' => 'Popular Pages',
72 'pages_new' => 'New Page', 81 'pages_new' => 'New Page',
73 'pages_attachments' => 'Attachments', 82 'pages_attachments' => 'Attachments',
74 'pages_navigation' => 'Page Navigation', 83 'pages_navigation' => 'Page Navigation',
......
...@@ -6,7 +6,15 @@ return [ ...@@ -6,7 +6,15 @@ return [
6 * Error text strings. 6 * Error text strings.
7 */ 7 */
8 8
9 - // Pages 9 + // Permissions
10 'permission' => 'You do not have permission to access the requested page.', 10 'permission' => 'You do not have permission to access the requested page.',
11 - 'permissionJson' => 'You do not have permission to perform the requested action.' 11 + 'permissionJson' => 'You do not have permission to perform the requested action.',
12 +
13 + // Error pages
14 + 'page_not_found' => 'Page Not Found',
15 + 'sorry_page_not_found' => 'Sorry, The page you were looking for could not be found.',
16 + 'return_home' => 'Return to home',
17 + 'error_occurred' => 'An Error Occurred',
18 + 'app_down' => ':appName is down right now',
19 + 'back_soon' => 'It will be back up soon.',
12 ]; 20 ];
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -4,9 +4,28 @@ ...@@ -4,9 +4,28 @@
4 4
5 5
6 <div class="container"> 6 <div class="container">
7 - <h1 class="text-muted">{{ $message or 'Page Not Found' }}</h1> 7 +
8 - <p>Sorry, The page you were looking for could not be found.</p> 8 +
9 - <a href="{{ baseUrl('/') }}" class="button">Return To Home</a> 9 + <h1>{{ $message or trans('errors.page_not_found') }}</h1>
10 + <p>{{ trans('errors.sorry_page_not_found') }}</p>
11 + <p><a href="{{ baseUrl('/') }}" class="button">{{ trans('errors.return_home') }}</a></p>
12 +
13 + <hr>
14 +
15 + <div class="row">
16 + <div class="col-md-4">
17 + <h3 class="text-muted">{{ trans('entities.pages_popular') }}</h3>
18 + @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Page::class]), 'style' => 'compact'])
19 + </div>
20 + <div class="col-md-4">
21 + <h3 class="text-muted">{{ trans('entities.books_popular') }}</h3>
22 + @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Book::class]), 'style' => 'compact'])
23 + </div>
24 + <div class="col-md-4">
25 + <h3 class="text-muted">{{ trans('entities.chapters_popular') }}</h3>
26 + @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Chapter::class]), 'style' => 'compact'])
27 + </div>
28 + </div>
10 </div> 29 </div>
11 30
12 @stop 31 @stop
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
3 @section('content') 3 @section('content')
4 4
5 <div class="container"> 5 <div class="container">
6 - <h1 class="text-muted">An Error Occurred</h1> 6 + <h1 class="text-muted">{{ trans('errors.error_occurred') }}</h1>
7 <p>{{ $message }}</p> 7 <p>{{ $message }}</p>
8 </div> 8 </div>
9 9
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
3 @section('content') 3 @section('content')
4 4
5 <div class="container"> 5 <div class="container">
6 - <h1 class="text-muted">{{ setting('app-name') }} is down right now</h1> 6 + <h1 class="text-muted">{{ trans('errors.app_down', ['appName' => setting('app-name')]) }}</h1>
7 - <p>It will be back up soon.</p> 7 + <p>{{ trans('errors.back_soon') }}</p>
8 </div> 8 </div>
9 9
10 @stop 10 @stop
...\ No newline at end of file ...\ No newline at end of file
......
1 <form action="{{$url}}" method="POST" class="inline"> 1 <form action="{{$url}}" method="POST" class="inline">
2 {{ csrf_field() }} 2 {{ csrf_field() }}
3 <input type="hidden" name="_method" value="DELETE"> 3 <input type="hidden" name="_method" value="DELETE">
4 - <button type="submit" class="button neg">{{ isset($text) ? $text : 'Delete' }}</button> 4 + <button type="submit" class="button neg">{{ isset($text) ? $text : trans('common.delete') }}</button>
5 </form> 5 </form>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,31 +2,31 @@ ...@@ -2,31 +2,31 @@
2 {!! csrf_field() !!} 2 {!! csrf_field() !!}
3 <input type="hidden" name="_method" value="PUT"> 3 <input type="hidden" name="_method" value="PUT">
4 4
5 - <p>Once enabled, These permissions will take priority over any set role permissions.</p> 5 + <p>{{ trans('entities.permissions_intro') }}</p>
6 6
7 <div class="form-group"> 7 <div class="form-group">
8 - @include('form/checkbox', ['name' => 'restricted', 'label' => 'Enable custom permissions']) 8 + @include('form/checkbox', ['name' => 'restricted', 'label' => trans('entities.permissions_enable')])
9 </div> 9 </div>
10 10
11 11
12 <table class="table"> 12 <table class="table">
13 <tr> 13 <tr>
14 - <th>Role</th> 14 + <th>{{ trans('common.role') }}</th>
15 - <th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>Actions</th> 15 + <th @if($model->isA('page')) colspan="3" @else colspan="4" @endif>{{ trans('common.actions') }}</th>
16 </tr> 16 </tr>
17 @foreach($roles as $role) 17 @foreach($roles as $role)
18 <tr> 18 <tr>
19 <td>{{ $role->display_name }}</td> 19 <td>{{ $role->display_name }}</td>
20 - <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'View', 'action' => 'view'])</td> 20 + <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.view'), 'action' => 'view'])</td>
21 @if(!$model->isA('page')) 21 @if(!$model->isA('page'))
22 - <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Create', 'action' => 'create'])</td> 22 + <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.create'), 'action' => 'create'])</td>
23 @endif 23 @endif
24 - <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Update', 'action' => 'update'])</td> 24 + <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.update'), 'action' => 'update'])</td>
25 - <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => 'Delete', 'action' => 'delete'])</td> 25 + <td>@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' => trans('common.delete'), 'action' => 'delete'])</td>
26 </tr> 26 </tr>
27 @endforeach 27 @endforeach
28 </table> 28 </table>
29 29
30 - <a href="{{ $model->getUrl() }}" class="button muted">Cancel</a> 30 + <a href="{{ $model->getUrl() }}" class="button muted">{{ trans('common.cancel') }}</a>
31 - <button type="submit" class="button pos">Save Permissions</button> 31 + <button type="submit" class="button pos">{{ trans('entities.permissions_save') }}</button>
32 </form> 32 </form>
...\ No newline at end of file ...\ No newline at end of file
......