Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2016-12-03 13:31:54 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
066adf3cea8eb1886b11d6bb3d5e26f82d373c1a
066adf3c
1 parent
57dc53ce
Moved text for errors and form views.
Updated 404 page with additional links
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
66 additions
and
20 deletions
resources/lang/en/common.php
resources/lang/en/entities.php
resources/lang/en/errors.php
resources/views/errors/404.blade.php
resources/views/errors/500.blade.php
resources/views/errors/503.blade.php
resources/views/form/delete-button.blade.php
resources/views/form/restriction-form.blade.php
resources/lang/en/common.php
View file @
066adf3
...
...
@@ -13,4 +13,14 @@ return [
*/
'name'
=>
'Name'
,
'description'
=>
'Description'
,
'role'
=>
'Role'
,
/**
* Actions
*/
'actions'
=>
'Actions'
,
'view'
=>
'View'
,
'create'
=>
'Create'
,
'update'
=>
'Update'
,
'delete'
=>
'Delete'
,
];
\ No newline at end of file
...
...
resources/lang/en/entities.php
View file @
066adf3
...
...
@@ -12,7 +12,6 @@ return [
'edit'
=>
'Edit'
,
'sort'
=>
'Sort'
,
'move'
=>
'Move'
,
'permissions'
=>
'Permissions'
,
'delete'
=>
'Delete'
,
'meta_created'
=>
'Created :timeLength'
,
'meta_created_name'
=>
'Created :timeLength by :user'
,
...
...
@@ -21,6 +20,14 @@ return [
'x_pages'
=>
':count Pages'
,
/**
* Permissions and restrictions
*/
'permissions'
=>
'Permissions'
,
'permissions_intro'
=>
'Once enabled, These permissions will take priority over any set role permissions.'
,
'permissions_enable'
=>
'Enable Custom Permissions'
,
'permissions_save'
=>
'Save Permissions'
,
/**
* Search
*/
'search_results'
=>
'Search Results'
,
...
...
@@ -53,6 +60,7 @@ return [
/**
* Chapters
*/
'chapters_popular'
=>
'Popular Chapters'
,
'chapters_new'
=>
'New Chapter'
,
'chapters_create'
=>
'Create New Chapter'
,
'chapters_delete'
=>
'Delete Chapter'
,
...
...
@@ -69,6 +77,7 @@ return [
/**
* Pages
*/
'pages_popular'
=>
'Popular Pages'
,
'pages_new'
=>
'New Page'
,
'pages_attachments'
=>
'Attachments'
,
'pages_navigation'
=>
'Page Navigation'
,
...
...
resources/lang/en/errors.php
View file @
066adf3
...
...
@@ -6,7 +6,15 @@ return [
* Error text strings.
*/
// P
age
s
// P
ermission
s
'permission'
=>
'You do not have permission to access the requested page.'
,
'permissionJson'
=>
'You do not have permission to perform the requested action.'
'permissionJson'
=>
'You do not have permission to perform the requested action.'
,
// Error pages
'page_not_found'
=>
'Page Not Found'
,
'sorry_page_not_found'
=>
'Sorry, The page you were looking for could not be found.'
,
'return_home'
=>
'Return to home'
,
'error_occurred'
=>
'An Error Occurred'
,
'app_down'
=>
':appName is down right now'
,
'back_soon'
=>
'It will be back up soon.'
,
];
\ No newline at end of file
...
...
resources/views/errors/404.blade.php
View file @
066adf3
...
...
@@ -4,9 +4,28 @@
<div
class=
"container"
>
<h1
class=
"text-muted"
>
{{ $message or 'Page Not Found' }}
</h1>
<p>
Sorry, The page you were looking for could not be found.
</p>
<a
href=
"{{ baseUrl('/') }}"
class=
"button"
>
Return To Home
</a>
<h1>
{{ $message or trans('errors.page_not_found') }}
</h1>
<p>
{{ trans('errors.sorry_page_not_found') }}
</p>
<p><a
href=
"{{ baseUrl('/') }}"
class=
"button"
>
{{ trans('errors.return_home') }}
</a></p>
<hr>
<div
class=
"row"
>
<div
class=
"col-md-4"
>
<h3
class=
"text-muted"
>
{{ trans('entities.pages_popular') }}
</h3>
@include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Page::class]), 'style' => 'compact'])
</div>
<div
class=
"col-md-4"
>
<h3
class=
"text-muted"
>
{{ trans('entities.books_popular') }}
</h3>
@include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Book::class]), 'style' => 'compact'])
</div>
<div
class=
"col-md-4"
>
<h3
class=
"text-muted"
>
{{ trans('entities.chapters_popular') }}
</h3>
@include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Chapter::class]), 'style' => 'compact'])
</div>
</div>
</div>
@stop
\ No newline at end of file
...
...
resources/views/errors/500.blade.php
View file @
066adf3
...
...
@@ -3,7 +3,7 @@
@section('content')
<div
class=
"container"
>
<h1
class=
"text-muted"
>
An Error Occurred
</h1>
<h1
class=
"text-muted"
>
{{ trans('errors.error_occurred') }}
</h1>
<p>
{{ $message }}
</p>
</div>
...
...
resources/views/errors/503.blade.php
View file @
066adf3
...
...
@@ -3,8 +3,8 @@
@section('content')
<div
class=
"container"
>
<h1
class=
"text-muted"
>
{{
setting('app-name') }} is down right now
</h1>
<p>
It will be back up soon.
</p>
<h1
class=
"text-muted"
>
{{
trans('errors.app_down', ['appName' => setting('app-name')]) }}
</h1>
<p>
{{ trans('errors.back_soon') }}
</p>
</div>
@stop
\ No newline at end of file
...
...
resources/views/form/delete-button.blade.php
View file @
066adf3
<form
action=
"{{$url}}"
method=
"POST"
class=
"inline"
>
{{ csrf_field() }}
<input
type=
"hidden"
name=
"_method"
value=
"DELETE"
>
<button
type=
"submit"
class=
"button neg"
>
{{ isset($text) ? $text :
'Delete'
}}
</button>
<button
type=
"submit"
class=
"button neg"
>
{{ isset($text) ? $text :
trans('common.delete')
}}
</button>
</form>
\ No newline at end of file
...
...
resources/views/form/restriction-form.blade.php
View file @
066adf3
...
...
@@ -2,31 +2,31 @@
{!! csrf_field() !!}
<input
type=
"hidden"
name=
"_method"
value=
"PUT"
>
<p>
Once enabled, These permissions will take priority over any set role permissions.
</p>
<p>
{{ trans('entities.permissions_intro') }}
</p>
<div
class=
"form-group"
>
@include('form/checkbox', ['name' => 'restricted', 'label' =>
'Enable custom permissions'
])
@include('form/checkbox', ['name' => 'restricted', 'label' =>
trans('entities.permissions_enable')
])
</div>
<table
class=
"table"
>
<tr>
<th>
Role
</th>
<th
@
if
($
model-
>
isA('page')) colspan="3" @else colspan="4" @endif>
Actions
</th>
<th>
{{ trans('common.role') }}
</th>
<th
@
if
($
model-
>
isA('page')) colspan="3" @else colspan="4" @endif>
{{ trans('common.actions') }}
</th>
</tr>
@foreach($roles as $role)
<tr>
<td>
{{ $role->display_name }}
</td>
<td>
@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' =>
'View'
, 'action' => 'view'])
</td>
<td>
@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' =>
trans('common.view')
, 'action' => 'view'])
</td>
@if(!$model->isA('page'))
<td>
@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' =>
'Create'
, 'action' => 'create'])
</td>
<td>
@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' =>
trans('common.create')
, 'action' => 'create'])
</td>
@endif
<td>
@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' =>
'Update'
, 'action' => 'update'])
</td>
<td>
@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' =>
'Delete'
, 'action' => 'delete'])
</td>
<td>
@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' =>
trans('common.update')
, 'action' => 'update'])
</td>
<td>
@include('form/restriction-checkbox', ['name'=>'restrictions', 'label' =>
trans('common.delete')
, 'action' => 'delete'])
</td>
</tr>
@endforeach
</table>
<a
href=
"{{ $model->getUrl() }}"
class=
"button muted"
>
Cancel
</a>
<button
type=
"submit"
class=
"button pos"
>
Save Permissions
</button>
<a
href=
"{{ $model->getUrl() }}"
class=
"button muted"
>
{{ trans('common.cancel') }}
</a>
<button
type=
"submit"
class=
"button pos"
>
{{ trans('entities.permissions_save') }}
</button>
</form>
\ No newline at end of file
...
...
Please
register
or
sign in
to post a comment