aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-10-10 18:18:27 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-10-10 18:18:27 +0000
commit5e08c668d264ada2c9f1f4eb354da9aa27f4c279 (patch)
treef827f9c20e95d92eb2e748e38b17e58c15668cd3
parentbbcd508d64e909bff0cd8d969f906e666f87d648 (diff)
downloadrails-5e08c668d264ada2c9f1f4eb354da9aa27f4c279.tar.gz
rails-5e08c668d264ada2c9f1f4eb354da9aa27f4c279.tar.bz2
rails-5e08c668d264ada2c9f1f4eb354da9aa27f4c279.zip
Fixed default 404.html and 500.htmls to remove extreme ugliness and added error language fit for humans [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--railties/CHANGELOG2
-rw-r--r--railties/html/404.html49
-rw-r--r--railties/html/500.html49
3 files changed, 90 insertions, 10 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG
index 835f652703..62e395e6d5 100644
--- a/railties/CHANGELOG
+++ b/railties/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Fixed default 404.html and 500.htmls to remove extreme ugliness and include human language [DHH]
+
* Update to latest Prototype and script.aculo.us trunk versions [Thomas Fuchs]
* PostgreSQL: db:test:purge closes open database connections first. #6236 [alex]
diff --git a/railties/html/404.html b/railties/html/404.html
index 0e1845619d..78295d4258 100644
--- a/railties/html/404.html
+++ b/railties/html/404.html
@@ -1,8 +1,47 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title>The page you were looking for doesn't exist (404)</title>
+ <style type="text/css">
+ div.dialog {
+ margin: 0;
+ padding: 10px;
+ text-align: left;
+ border: 1px solid #ccc;
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ background-color: #fff;
+ }
+
+ div.outer {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ width: 500px;
+ height: 300px;
+ margin-left: -260px;
+ margin-top: -150px;
+ }
+
+ body { background-color: #fff; }
+ </style>
+</head>
+
<body>
- <h1>File not found</h1>
- <p>Change this error message for pages not found in public/404.html</p>
+
+<div class="outer">
+ <!-- This file lives in public/404.html -->
+
+ <div class="dialog" style="text-align: center;">
+ <div style="text-align: center; width: 200px; margin: 0 auto;">
+ <p style="color: red; font-size: 16px; line-height: 20px;">The page you were looking for doesn't exist.</p>
+ <p style="color: #666;">You may have mistyped the address or the page may have moved.</p>
+ </div>
+</div>
+
</body>
</html> \ No newline at end of file
diff --git a/railties/html/500.html b/railties/html/500.html
index 146b216bfd..7a2af943d9 100644
--- a/railties/html/500.html
+++ b/railties/html/500.html
@@ -1,8 +1,47 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
+ <title>We're sorry, but something went wrong</title>
+ <style type="text/css">
+ div.dialog {
+ margin: 0;
+ padding: 10px;
+ text-align: left;
+ border: 1px solid #ccc;
+ border-right: 1px solid #999;
+ border-bottom: 1px solid #999;
+ background-color: #fff;
+ }
+
+ div.outer {
+ position: absolute;
+ left: 50%;
+ top: 50%;
+ width: 500px;
+ height: 300px;
+ margin-left: -260px;
+ margin-top: -150px;
+ }
+
+ body { background-color: #fff; }
+ </style>
+</head>
+
<body>
- <h1>Application error</h1>
- <p>Change this error message for uncaught exceptions in public/500.html</p>
+
+<div class="outer">
+ <!-- This file lives in public/500.html -->
+
+ <div class="dialog" style="text-align: center;">
+ <div style="text-align: center; width: 200px; margin: 0 auto;">
+ <p style="color: red; font-size: 16px; line-height: 20px;">We're sorry, but something went wrong.</p>
+ <p style="color: #666;">We've been notified about this issue and we'll take a look at it shortly.</p>
+ </div>
+</div>
+
</body>
</html> \ No newline at end of file