Skip to content

Commit

Permalink
Fix errors views and locales
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienheyd committed Apr 3, 2017
1 parent 678348c commit c11062c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 10 deletions.
13 changes: 13 additions & 0 deletions src/resources/lang/vendor/boilerplate/en/errors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return [
'backlink' => 'Go back to the previous page',
'403' => [
'title' => 'Error 403',
'message' => "You are not allowed to access to this page.",
],
'404' => [
'title' => 'Error 404',
'message' => 'Page or document not found.',
]
];
13 changes: 13 additions & 0 deletions src/resources/lang/vendor/boilerplate/fr/errors.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

return [
'backlink' => 'Revenir à la page précédente',
'403' => [
'title' => 'Erreur 403',
'message' => "Vous n'avez pas l'autorisation d'accès à cette page.",
],
'404' => [
'title' => 'Erreur 404',
'message' => 'Page ou document introuvable.',
]
];
10 changes: 5 additions & 5 deletions src/resources/views/errors/403.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@extends('auth.layout', ['title' => 'Erreur 404'])
xtends('boilerplate::auth.layout', ['title' => __('boilerplate::errors.403.title')])

@section('content')
@component('auth.loginbox')
@component('boilerplate::auth.loginbox')
<div class="text-center">
<h2 class="mtn">Erreur 403</h2>
<p>Vous n'êtes pas autorisé à accéder à cette page.</p>
<p><a href="{{ URL::previous() }}" class="btn btn-primary">Revenir à la page précédente</a></p>
<h2 class="mtn">{{ __('boilerplate::errors.403.title') }}</h2>
<p>{{ __('boilerplate::errors.403.message') }}</p>
<p><a href="{{ URL::previous() }}" class="btn btn-primary">{{ __('boilerplate::errors.backlink') }}</a></p>
</div>
@endcomponent
@endsection
10 changes: 5 additions & 5 deletions src/resources/views/errors/404.blade.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
@extends('auth.layout', ['title' => 'Erreur 404'])
@extends('boilerplate::auth.layout', ['title' => __('boilerplate::errors.404.title')])

@section('content')
@component('auth.loginbox')
@component('boilerplate::auth.loginbox')
<div class="text-center">
<h2 class="mtn">Erreur 404</h2>
<p>Page introuvable</p>
<p><a href="{{ URL::previous() }}" class="btn btn-primary">Revenir à la page précédente</a></p>
<h2 class="mtn">{{ __('boilerplate::errors.404.title') }}</h2>
<p>{{ __('boilerplate::errors.404.message') }}</p>
<p><a href="{{ URL::previous() }}" class="btn btn-primary">{{ __('boilerplate::errors.backlink') }}</a></p>
</div>
@endcomponent
@endsection

0 comments on commit c11062c

Please sign in to comment.