From: Sebastian Riedel Date: Wed, 15 Sep 2004 21:27:52 +0000 (+0000) Subject: XHTML update X-Git-Tag: 2.10~183 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=d77cc42a2fd0ae059128043822ef127199e55ed2;p=maypole.git XHTML update git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@179 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/templates/beer/addnew b/templates/beer/addnew index e19c7c2..248fe28 100644 --- a/templates/beer/addnew +++ b/templates/beer/addnew @@ -1,31 +1,32 @@

Add a new [%classmetadata.moniker%]

[% USE element_maker = Class("HTML::Element") %] -

-

- - - - [% FOR col = classmetadata.columns; - NEXT IF col == "id"; - SET element = classmetadata.cgi.$col; - IF col == "brewery"; - SET create_url = base _ "/brewery/edit"; - SET new_element = element_maker.new("option", - "class", "redirect", - "value", create_url).push_content("Create new brewery"); - SET child = element.content_list.first; - SET foo = element.attr("name", "navi"); - SET child = child.attr("selected", "selected"); - SET element = - element.unshift_content(element_maker.new("option", value," ")); - element.attr("onChange", "go()"); - SET element = element.unshift_content(new_element); - END; - %] - - - [% END; %] -
[% classmetadata.colnames.$col; %] - [% element.as_HTML; %]
- -
+

+

+ + + + [% FOR col = classmetadata.columns; + NEXT IF col == "id"; + SET element = classmetadata.cgi.$col; + IF col == "brewery"; + SET create_url = base _ "/brewery/edit"; + SET new_element = element_maker.new("option", + "class", "redirect", + "value", create_url).push_content("Create new brewery"); + SET child = element.content_list.first; + SET foo = element.attr("name", "navi"); + SET child = child.attr("selected", "selected"); + SET element = + element.unshift_content(element_maker.new("option", value," ")); + element.attr("onChange", "go()"); + SET element = element.unshift_content(new_element); + END; + %] + + + + + [% END; %] +
[% classmetadata.colnames.$col; %][% element.as_HTML; %]
+ +
diff --git a/templates/beerdb.css b/templates/beerdb.css deleted file mode 100644 index 07cc28d..0000000 --- a/templates/beerdb.css +++ /dev/null @@ -1,145 +0,0 @@ -HTML { - PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px -} -BODY { - PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px; - BACKGROUND-COLOR: #ffffea; -} -.content { - PADDING: 12px; - MARGIN-TOP: 1px; MARGIN-BOTTOM:0px; - MARGIN-LEFT: 15px; MARGIN-RIGHT: 15px; - BORDER-COLOR: #000000; - BORDER-TOP: 0px; - BORDER-BOTTOM: 0px; - BORDER-LEFT: 1px; - BORDER-RIGHT: 1px; -} - -H1 { - FONT-SIZE: 30pt; MARGIN: 0px; - FONT-FAMILY: Optima, "Lucida Grande",Sans-serif; - TEXT-ALIGN: center; - PADDING-BOTTOM: 1em; -} -H2 { - PADDING-RIGHT: 0.25em; PADDING-LEFT: 0.25em; FONT-SIZE: 16pt; - PADDING-BOTTOM: 0.5em; MARGIN: 0px; PADDING-TOP: 0.1em; -FONT-FAMILY: Optima, "Lucida Grande",Sans-serif; - TEXT-ALIGN: center; -} - -A { text-decoration: none; color:#225 } -A:hover { text-decoration: underline; color:#222 } - -table { -border: 0px solid; -background-color: #ffffff; - -} -#matrix th { -background-color: #DDE; -border: 1px solid; - font: bold 12px Verdana, sans-serif; -} - -#matrix tr.alternate { background-color:#EEF; } -#matrix td { - font: 12px Verdana, sans-serif; -} - -#navlist -{ -padding: 3px 0; -margin-left: 0; -border-bottom: 1px solid #778; -font: bold 12px Verdana, sans-serif; -} - -#navlist li -{ -list-style: none; -margin: 0; -display: inline; -} - -#navlist li a -{ -padding: 3px 0.5em; -margin-left: 3px; -border: 1px solid #778; -border-bottom: none; -background: #DDE; -text-decoration: none; -} - -#navlist li a:link { color: #448; } -#navlist li a:visited { color: #667; } - -#navlist li a:hover -{ -color: #000; -background: #AAE; -border-color: #227; -} - -#navlist li a#current -{ -background: white; -border-bottom: 1px solid white; -} - -td { font: 12px Verdana, sans-serif; } -.field { -background-color: #DDE; -border: 1px solid; -font-weight: bold; -} - -#vlist -{ -padding: 0 1px 1px; -margin-left: 0; -font: bold 12px Verdana, sans-serif; -background: gray; -width: 13em; -} - -#vlist li -{ -list-style: none; -margin: 0; -border-top: 1px solid gray; -text-align: left; -} - -#vlist li a -{ -display: block; -padding: 0.25em 0.5em 0.25em 0.75em; -border-left: 1em solid #AAB; -background: #CCD; -text-decoration: none; -} -#vlist li a:hover { - border-color: #227; -} -.search {float:right; background: #ffa; padding-left: 5px; padding-right: 5px} -.list { width: 70%; } - -.column-wrap { position: relative; } -.leftcolumn { position: absolute; left: 10px; top: 50px; width: 200px; - border-right: 1px dotted black; -} -.centercolumn { margin-left: 200px; margin-right: 300px; } -.rightcolumn { position: absolute; right: 0px; top: 50px; width: 300px; } - -.messages { - margin: 20px; padding: 3px; border: 1px solid black; - background: #ddd; - font: bold 12px Verdana, sans-serif; -} - -.error { color: #d00; } - -.chorus { font-style: italic; position: relative; margin-left:50px; } diff --git a/templates/custom/frontpage b/templates/custom/frontpage deleted file mode 100644 index 2cef7ae..0000000 --- a/templates/custom/frontpage +++ /dev/null @@ -1,16 +0,0 @@ -[% INCLUDE header %] - -

The beer database

- - -[% FOR table = config.display_tables %] - - - -[% END %] -
-List by [%table %] -
- -
-[% INCLUDE footer %] diff --git a/templates/custom/header b/templates/custom/header deleted file mode 100644 index b95e32a..0000000 --- a/templates/custom/header +++ /dev/null @@ -1,23 +0,0 @@ - - - Beer Database - - - - - - - -
- diff --git a/templates/factory/addnew b/templates/factory/addnew index f56fcf4..9345c78 100644 --- a/templates/factory/addnew +++ b/templates/factory/addnew @@ -11,9 +11,9 @@ table. #%]

Add a new [% classmetadata.moniker %]

-
- - + + +
[% FOR col = classmetadata.columns %] [% NEXT IF col == "id" %] @@ -22,5 +22,5 @@ table. [% END; %]
- +
diff --git a/templates/factory/edit b/templates/factory/edit index f1e0fbf..c5c511b 100644 --- a/templates/factory/edit +++ b/templates/factory/edit @@ -12,7 +12,7 @@ form similar to L but with the current values filled in. [% INCLUDE header %] [% FOR item = objects; %]

Edit [% item.name %]

-
+ [% FOR col = classmetadata.columns; NEXT IF col == "id"; "

"; @@ -23,6 +23,6 @@ form similar to L but with the current values filled in. IF errors.$col; errors.$col; END; - ''; + ''; END %] [% INCLUDE footer %] diff --git a/templates/factory/frontpage b/templates/factory/frontpage index 9cf3562..30861d2 100644 --- a/templates/factory/frontpage +++ b/templates/factory/frontpage @@ -12,7 +12,7 @@ It shows a list of all tables it is allowed to display.

[% config.application_name || "A poorly configured Maypole application" %]

- +
[% FOR table = config.display_tables %]
diff --git a/templates/factory/header b/templates/factory/header index 7e16e26..5a58823 100644 --- a/templates/factory/header +++ b/templates/factory/header @@ -8,8 +8,9 @@ "A poorly configured Maypole application" %] - - + +