From d77cc42a2fd0ae059128043822ef127199e55ed2 Mon Sep 17 00:00:00 2001 From: Sebastian Riedel Date: Wed, 15 Sep 2004 21:27:52 +0000 Subject: [PATCH] XHTML update git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@179 48953598-375a-da11-a14b-00016c27c3ee --- templates/beer/addnew | 59 ++++++++++++++------------- templates/custom/frontpage | 16 -------- templates/custom/header | 23 ----------- templates/factory/addnew | 8 ++-- templates/factory/edit | 4 +- templates/factory/frontpage | 2 +- templates/factory/header | 5 ++- templates/factory/list | 6 +-- templates/factory/macros | 7 ++-- templates/factory/search_form | 10 ++--- templates/factory/view | 6 +-- templates/{beerdb.css => maypole.css} | 0 12 files changed, 55 insertions(+), 91 deletions(-) delete mode 100644 templates/custom/frontpage delete mode 100644 templates/custom/header rename templates/{beerdb.css => maypole.css} (100%) 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/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" %] - - + +