aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2009-07-10 11:34:39 -0500
committerJoshua Peek <josh@joshpeek.com>2009-07-10 11:34:39 -0500
commit01d92021e69f54def1ec8103b2b99f907dd88ec4 (patch)
tree46f4869c1263d0efaf96084ebdc7d2f7905b7937
parentd60d7edce462f4602bfc9996689087a235b034c9 (diff)
downloadrails-01d92021e69f54def1ec8103b2b99f907dd88ec4.tar.gz
rails-01d92021e69f54def1ec8103b2b99f907dd88ec4.tar.bz2
rails-01d92021e69f54def1ec8103b2b99f907dd88ec4.zip
Switch scaffolding templates to HTML 5 doctype
-rw-r--r--railties/html/404.html33
-rw-r--r--railties/html/422.html33
-rw-r--r--railties/html/500.html31
-rw-r--r--railties/html/index.html61
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb8
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb3
6 files changed, 80 insertions, 89 deletions
diff --git a/railties/html/404.html b/railties/html/404.html
index eff660b90c..88ee108e90 100644
--- a/railties/html/404.html
+++ b/railties/html/404.html
@@ -1,23 +1,20 @@
-<!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">
-
+<!DOCTYPE html>
+<html>
<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">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
</head>
<body>
@@ -27,4 +24,4 @@
<p>You may have mistyped the address or the page may have moved.</p>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/railties/html/422.html b/railties/html/422.html
index b54e4a3cad..9c3c96670b 100644
--- a/railties/html/422.html
+++ b/railties/html/422.html
@@ -1,23 +1,20 @@
-<!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">
-
+<!DOCTYPE html>
+<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>The change you wanted was rejected (422)</title>
- <style type="text/css">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
</head>
<body>
@@ -27,4 +24,4 @@
<p>Maybe you tried to change something you didn't have access to.</p>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/railties/html/500.html b/railties/html/500.html
index ec3bbf02c4..f71c86e652 100644
--- a/railties/html/500.html
+++ b/railties/html/500.html
@@ -1,23 +1,20 @@
-<!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">
-
+<!DOCTYPE html>
+<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>We're sorry, but something went wrong (500)</title>
- <style type="text/css">
- body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
- div.dialog {
- width: 25em;
- padding: 0 4em;
- margin: 4em auto 0 auto;
- border: 1px solid #ccc;
- border-right-color: #999;
- border-bottom-color: #999;
- }
- h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
- </style>
+ <style type="text/css">
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
+ div.dialog {
+ width: 25em;
+ padding: 0 4em;
+ margin: 4em auto 0 auto;
+ border: 1px solid #ccc;
+ border-right-color: #999;
+ border-bottom-color: #999;
+ }
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
+ </style>
</head>
<body>
diff --git a/railties/html/index.html b/railties/html/index.html
index cd337dc74c..ff2dfd3193 100644
--- a/railties/html/index.html
+++ b/railties/html/index.html
@@ -1,5 +1,4 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
@@ -14,20 +13,20 @@
font-size: 13px;
color: #333;
}
-
+
h1 {
font-size: 28px;
color: #000;
}
-
+
a {color: #03c}
a:hover {
background-color: #03c;
color: white;
text-decoration: none;
}
-
-
+
+
#page {
background-color: #f0f0f0;
width: 750px;
@@ -35,7 +34,7 @@
margin-left: auto;
margin-right: auto;
}
-
+
#content {
float: left;
background-color: white;
@@ -44,7 +43,7 @@
padding: 25px;
width: 500px;
}
-
+
#sidebar {
float: right;
width: 175px;
@@ -53,7 +52,7 @@
#footer {
clear: both;
}
-
+
#header, #about, #getting-started {
padding-left: 75px;
@@ -73,14 +72,14 @@
font-weight: normal;
font-size: 16px;
}
-
-
+
+
#about h3 {
margin: 0;
margin-bottom: 10px;
font-size: 14px;
}
-
+
#about-content {
background-color: #ffd;
border: 1px solid #fc0;
@@ -113,8 +112,8 @@
margin: 0;
padding: 10px;
}
-
-
+
+
#getting-started {
border-top: 1px solid #ccc;
margin-top: 25px;
@@ -150,8 +149,8 @@
color: #555;
font-size: 13px;
}
-
-
+
+
#search {
margin: 0;
padding-top: 10px;
@@ -163,8 +162,8 @@
margin: 2px;
}
#search-text {width: 170px}
-
-
+
+
#sidebar ul {
margin-left: 0;
padding-left: 0;
@@ -181,7 +180,7 @@
#sidebar ul.links li {
margin-bottom: 5px;
}
-
+
</style>
<script type="text/javascript" src="javascripts/prototype.js"></script>
<script type="text/javascript" src="javascripts/effects.js"></script>
@@ -194,11 +193,11 @@
onComplete: function() {new Effect.BlindDown('about-content', {duration: 0.25})}
});
} else {
- new Effect[Element.visible('about-content') ?
+ new Effect[Element.visible('about-content') ?
'BlindUp' : 'BlindDown']('about-content', {duration: 0.25});
}
}
-
+
window.onload = function() {
$('search-text').value = '';
$('search').onsubmit = function() {
@@ -218,7 +217,7 @@
<input type="submit" value="Search" /> the Rails site
</form>
</li>
-
+
<li>
<h3>Join the community</h3>
<ul class="links">
@@ -227,7 +226,7 @@
<li><a href="http://wiki.rubyonrails.org/">Wiki</a></li>
</ul>
</li>
-
+
<li>
<h3>Browse the documentation</h3>
<ul class="links">
@@ -250,17 +249,17 @@
<h3><a href="rails/info/properties" onclick="about(); return false">About your application&rsquo;s environment</a></h3>
<div id="about-content" style="display: none"></div>
</div>
-
+
<div id="getting-started">
<h1>Getting started</h1>
<h2>Here&rsquo;s how to get rolling:</h2>
-
- <ol>
+
+ <ol>
<li>
- <h2>Use <tt>script/generate</tt> to create your models and controllers</h2>
+ <h2>Use <code>script/generate</code> to create your models and controllers</h2>
<p>To see all available options, run it without parameters.</p>
</li>
-
+
<li>
<h2>Set up a default route and remove or rename this file</h2>
<p>Routes are set up in config/routes.rb.</p>
@@ -268,13 +267,13 @@
<li>
<h2>Create your database</h2>
- <p>Run <tt>rake db:migrate</tt> to create your database. If you're not using SQLite (the default), edit <tt>config/database.yml</tt> with your username and password.</p>
+ <p>Run <code>rake db:migrate</code> to create your database. If you're not using SQLite (the default), edit <code>config/database.yml</code> with your username and password.</p>
</li>
</ol>
</div>
</div>
-
+
<div id="footer">&nbsp;</div>
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb
index ebc97f8130..aacfbe4a8f 100644
--- a/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb
+++ b/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb
@@ -1,9 +1,7 @@
-<!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">
+<!DOCTYPE html>
+<html>
<head>
- <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title><%= controller_class_name %>: <%%= controller.action_name %></title>
<%%= stylesheet_link_tag 'scaffold' %>
</head>
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb
index 2e603d5b4a..69beb388db 100644
--- a/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb
+++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb
@@ -5,6 +5,9 @@
<% for attribute in attributes -%>
<th><%= attribute.column.human_name %></th>
<% end -%>
+ <th></th>
+ <th></th>
+ <th></th>
</tr>
<%% @<%= plural_name %>.each do |<%= singular_name %>| %>