diff options
Diffstat (limited to 'app')
| -rw-r--r-- | app/assets/stylesheets/errors.css.scss | 15 | ||||
| -rw-r--r-- | app/controllers/errors_controller.rb | 9 | ||||
| -rw-r--r-- | app/views/errors/not_found.html.erb | 13 | ||||
| -rw-r--r-- | app/views/errors/server_error.html.erb | 14 |
4 files changed, 51 insertions, 0 deletions
diff --git a/app/assets/stylesheets/errors.css.scss b/app/assets/stylesheets/errors.css.scss new file mode 100644 index 000000000..b314da37a --- /dev/null +++ b/app/assets/stylesheets/errors.css.scss @@ -0,0 +1,15 @@ +#workspace.errors { + + body {text-align: center; } + div.error { + width: 45em; + padding:1em; + margin: 2em auto 0 auto; + border: 1px solid #ccc; + border-right-color: #999; + border-bottom-color: #999; + } + h2 { font-size: 100%; color: #f00; line-height: 1.5em; font-weight: bold} + a,a:visited { text-decoration: underline; color: blue} + +} diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb new file mode 100644 index 000000000..c68a60804 --- /dev/null +++ b/app/controllers/errors_controller.rb @@ -0,0 +1,9 @@ +class ErrorsController < ApplicationController + def not_found + render :status => 404, :formats => [:html] + end + + def server_error + render :status => 500, :formats => [:html] + end +end
\ No newline at end of file diff --git a/app/views/errors/not_found.html.erb b/app/views/errors/not_found.html.erb new file mode 100644 index 000000000..8d761413f --- /dev/null +++ b/app/views/errors/not_found.html.erb @@ -0,0 +1,13 @@ + <div class="error"> + <h2>Désolé, la page demandée n'existe pas</h2> + <a href="http://www.chouette.mobi/spip.php?rubrique38" target="_blank">N'hésitez pas à nous décrire le problème</a>, nous essaierons de le résoudre.<br/>Merci d'avance<br/> <br/> + Vous pouvez néanmoins continuer à utiliser l'application CHOUETTE<br/> + <br/> + <br/> + <br/> + <br/> + <h2>The page you were looking for doesn't exist.</h2> + You may have mistyped the address or the page may have moved. <br/> + <a href="http://www.chouette.mobi/spip.php?rubrique38" target="_blank">Please describe us what happened</a>, we'll try to come back with an answer. <br/>Thank you. <br/> <br/> + You can still continue the use the CHOUETTE application. <br/> + </div> diff --git a/app/views/errors/server_error.html.erb b/app/views/errors/server_error.html.erb new file mode 100644 index 000000000..0a000df2e --- /dev/null +++ b/app/views/errors/server_error.html.erb @@ -0,0 +1,14 @@ + <div class="error"> + <h2>Désolé, une erreur est survenue</h2> + <a href="http://www.chouette.mobi/spip.php?rubrique38" target="_blank">N'hésitez pas à nous décrire le problème</a>, nous essaierons de le résoudre.<br/>Merci d'avance<br/> <br/> + Vous pouvez néanmoins continuer à utiliser l'application CHOUETTE<br/> + <br/> + <br/> + <br/> + <br/> + <h2>We're sorry, but something went wrong.</h2> + You may have mistyped the address or the page may have moved. <br/> + <a href="http://www.chouette.mobi/spip.php?rubrique38" target="_blank">Please describe us what happened</a>, we'll try to come back with an answer. <br/>Thank you. <br/> <br/> + You can still continue the use the CHOUETTE application. <br/> + </div> + |
