changed approach as requested by mdk
wreis [Tue, 27 May 2008 18:19:52 +0000 (18:19 +0000)]
44 files changed:
share/skin/base/layout/collection.tt
share/skin/base/layout/field.tt
share/skin/base/layout/list_view.tt
share/skin/base/layout/object.tt
share/skin/base/layout/site_layout.tt
share/skin/componentui/skin.conf
share/skin/default/layout/action.tt
share/skin/default/layout/action/link.tt [new file with mode: 0644]
share/skin/default/layout/field.tt [deleted file]
share/skin/default/layout/field/array.tt
share/skin/default/layout/field/boolean.tt [new file with mode: 0644]
share/skin/default/layout/field/collection.tt
share/skin/default/layout/field/date_time.tt [new file with mode: 0644]
share/skin/default/layout/field/integer.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable.tt
share/skin/default/layout/field/mutable/boolean.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/choose_many.tt
share/skin/default/layout/field/mutable/choose_one.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/date_time.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/file.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/hidden_array.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/integer.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/matching_passwords.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/number.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/password.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/string.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/text.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/time_range.tt
share/skin/default/layout/field/number.tt [new file with mode: 0644]
share/skin/default/layout/field/related_object.tt [new file with mode: 0644]
share/skin/default/layout/field/string.tt [new file with mode: 0644]
share/skin/default/layout/field/text.tt [new file with mode: 0644]
share/skin/default/layout/list_view.tt [deleted file]
share/skin/default/layout/object.tt
share/skin/default/layout/site_layout.tt [new file with mode: 0644]
share/skin/default/layout/value/boolean.tt [new file with mode: 0644]
share/skin/default/layout/value/collection.tt [new file with mode: 0644]
share/skin/default/layout/value/date_time.tt [new file with mode: 0644]
share/skin/default/layout/value/image.tt [new file with mode: 0644]
share/skin/default/layout/value/list.tt [new file with mode: 0644]
share/skin/default/layout/value/number.tt [new file with mode: 0644]
share/skin/default/layout/value/related_object.tt [new file with mode: 0644]
share/skin/default/layout/value/string.tt [new file with mode: 0644]
share/skin/default/layout/value/text.tt [new file with mode: 0644]

index d4703f1..691b01e 100644 (file)
@@ -1,5 +1,7 @@
 =for layout widget
 
-[% members %]
+<div id="collection_members">
+  [% members %]
+</div>
 
-=cut
\ No newline at end of file
+=cut
index 99954ab..a4508d6 100644 (file)
@@ -5,10 +5,10 @@
 
 =for layout label
 
-<strong > [% label %]: </strong>
+<span class="field_label"> [% label %]: </span>
 
 =for layout value_layout
 
-[% field_value %]
+<span class="field_value">[% field_value %]</span>
 
 =cut
index f4f6501..f7a4ef4 100644 (file)
@@ -2,11 +2,11 @@
 
 =for layout widget
 
-[% pager %]
+[% pager_fragment %]
 
 [% call_next %]
 
-[% pager %]
+[% pager_fragment %]
 
 [% actions %]
 
index cec7b4d..a67e089 100644 (file)
@@ -1,9 +1,11 @@
 =for layout widget
 
+<div id="object_field_list">
   [% field_list %]
+</div>
 
 =for layout field
 
-  [% call_next %] <br>
+  [% call_next %]
 
 =cut
index e9b70ca..5909714 100644 (file)
@@ -1,8 +1,6 @@
 =for layout widget
-<!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">
+<html>
 
 <head>
   [% head %]
 =for layout head_style
 
   <!-- stylesheet links go here -->
-  
+
 =for layout body
 
 [% inner %]
 
 =for layout header
 
-<h1>[% title %]</h1>
+<span class="site_layout_title">[% title %]</span>
 
 =cut
index cf9c36e..0fa450d 100644 (file)
@@ -1,3 +1,3 @@
-extends base
+extends default
 
 widget_search_path ComponentUI::View::Site::Widget
index d2d7617..67d6c37 100644 (file)
@@ -1,11 +1,63 @@
-=extends NEXT
+=for layout widget
+
+  <form action="" method="post" enctype="multipart/form-data">
+    [% header  %]
+    [% field_list  %]
+    [% buttons %]
+    [% footer  %]
+  </form>
+
+=for layout header
+
+<!-- header -->
+
+=for layout field_list
+
+<p> [% call_next %] </p>
 
 =for layout field
 
-[% call_next %]
+[% call_next %] <br />
 
 =for layout message_layout
 
-    <span>[% message %]</span>
+    <span>[% message %]</span> <br />
+
+=for layout buttons
+  [% message %]
+  [% ok_button_fragment %]
+  [% apply_button_fragment %]
+  [% cancel_button_fragment %]
+
+=for layout standard_button
+
+  <input type="submit" class="button" name="[% event_id %]" value="[% label %]" />
+
+=for layout ok_button
+
+[% standard_button %]
+
+=for layout apply_button
+
+[% standard_button %]
+
+=for layout cancel_button
+
+[% standard_button %]
+
+=for layout whut
+
+  [% IF (viewport.ordered_fields.size != 0) && allowed_events.grep('^apply$').size; %]
+    <input type="submit" name="[% viewport.event_id_for('apply') | html%]" value="[% apply_label %]" />
+  [% END; %]
+
+  [% IF allowed_events.grep('^close$').size; %]
+    <input type="submit" name="[% viewport.event_id_for('close') | html%]" value="[% close_label %]" />
+  [% END; %]
+  <br />
+
+=for layout footer
+
+  <!-- footer -->
 
 =cut
diff --git a/share/skin/default/layout/action/link.tt b/share/skin/default/layout/action/link.tt
new file mode 100644 (file)
index 0000000..7c07d31
--- /dev/null
@@ -0,0 +1,3 @@
+=for layout widget
+  <a href="[% uri %]">[% label %]</a>
+=cut
diff --git a/share/skin/default/layout/field.tt b/share/skin/default/layout/field.tt
deleted file mode 100644 (file)
index a5273bb..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-=extends NEXT
-
-=for layout label
-
- [% label %]:
-
-=cut
index 39ae09d..2b049b5 100644 (file)
@@ -1,7 +1,20 @@
-=extends NEXT
+=for layout widget
+
+[% label %]
+[% list  %]
 
 =for layout label
 
- [% content | html %]:
+<strong > [% content | html %]: </strong>
+
+=for layout list
+
+<ul>
+[% content %]
+</ul>
+
+=for layout item
+
+<li>[% content | html %]</li>
 
-=cut
+=cut
\ No newline at end of file
diff --git a/share/skin/default/layout/field/boolean.tt b/share/skin/default/layout/field/boolean.tt
new file mode 100644 (file)
index 0000000..18ab448
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field
+
+=cut
index cb76a86..47244e7 100644 (file)
@@ -1,7 +1,20 @@
-=extends NEXT
+=for layout widget
+
+[% label_box %]
+[% list  %]
 
 =for layout label_box
 
- [% label %]:
+<strong> [% label %]: </strong>
+
+=for layout list
+
+<ul>
+[% call_next %]
+</ul>
+
+=for layout item
+
+<li>[% name %]</li>
 
 =cut
diff --git a/share/skin/default/layout/field/date_time.tt b/share/skin/default/layout/field/date_time.tt
new file mode 100644 (file)
index 0000000..18ab448
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field
+
+=cut
diff --git a/share/skin/default/layout/field/integer.tt b/share/skin/default/layout/field/integer.tt
new file mode 100644 (file)
index 0000000..18ab448
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field
+
+=cut
index 936c392..3983263 100644 (file)
@@ -1,7 +1,33 @@
-=extends NEXT
+=for layout widget
+
+[% label_fragment %] [% field %] [% message_fragment %] 
+
+=for layout label
+
+<label for="[%field_id%]" [% field_is_required %]>[% label %]:</label>
+
+=for layout field_is_required_yes
+
+class="required_field"
+
+=for layout field_is_required_no
+
+=for layout field
+
+<!-- Why is this here??? -->
+FIELD GOES HERE
 
 =for layout message
 
-<span>[% message %]</span>
+<span>[% message %]</span><br />
+
+=for layout field
+
+<input type="[% field_type %]" name="[% field_name %]" id="[% field_id %]"
+  [% field_body %] />
+
+=for layout field_body
+
+value="[% field_value %]"
 
 =cut
diff --git a/share/skin/default/layout/field/mutable/boolean.tt b/share/skin/default/layout/field/mutable/boolean.tt
new file mode 100644 (file)
index 0000000..6d70f36
--- /dev/null
@@ -0,0 +1,18 @@
+=extends field/mutable
+
+=for layout widget
+
+<input name="[% exists_event %]" type="hidden" value="[% exists_value %]" />
+[% call_next %]
+
+=for layout field_body
+
+value="1" [% is_checked %]
+
+=for layout is_checked_yes
+
+checked="checked"
+
+=for layout is_checked_no
+
+=cut
index 1b6cd2c..ed6c136 100644 (file)
@@ -1,16 +1,50 @@
-=extends NEXT
+=extends field/mutable
 
 =for layout widget
 
 [% label_fragment %]
+<br />
 [% message_fragment %]
 [% field %]
 
+=for layout field
+
+<table>
+  <tr>
+    <td> [% available_values %] </td>
+    <td>  [% action_buttons %]  </td>
+    <td>
+      [% selected_values %]
+      [% current_values  %]
+    </td>
+  </tr>
+</table>
+
+=for layout available_values
+
+<select size="10" multiple="multiple"  name="[% event_id_add_values %]">
+ [% call_next %]
+</select>
+
+=for layout selected_values
+
+<select size="10" multiple="multiple"  name="[% event_id_remove_values %]">
+ [% call_next %]
+</select>
+
+=for layout hidden_value
+
+<input type="hidden" name="[% field_name %]" value="[% hidden_value %]">
+
+=for layout value_option
+
+<option value="[% option_value %]">[% option_name %]</option>
+
 =for layout action_buttons
 
-<input type="submit" value="&gt;&gt;" name="[% event_id_add_all_values %]" />
-<input type="submit" value="&gt;" name="[% event_id_do_add_values %]" />
-<input type="submit" value="&lt;" name="[% event_id_do_remove_values %]" />
-<input type="submit" value="&lt;&lt;" name="[% event_id_remove_all_values %]" />
+<input type="submit" value="&gt;&gt;" name="[% event_id_add_all_values %]" /> <br />
+<input type="submit" value="&gt;" name="[% event_id_do_add_values %]" /> <br />
+<input type="submit" value="&lt;" name="[% event_id_do_remove_values %]" /> <br />
+<input type="submit" value="&lt;&lt;" name="[% event_id_remove_all_values %]" /> <br />
 
 =cut
diff --git a/share/skin/default/layout/field/mutable/choose_one.tt b/share/skin/default/layout/field/mutable/choose_one.tt
new file mode 100644 (file)
index 0000000..74e8d8c
--- /dev/null
@@ -0,0 +1,27 @@
+=extends field/mutable
+
+=for layout field
+
+<select name="[% field_name %]" id="[% field_id %]">
+  [% option_is_required %]
+  [% option_list %]
+</select>
+
+=for layout option_is_required_yes
+
+=for layout option_is_required_no
+
+<option value="">--</option>
+
+=for layout option
+
+  <option value="[% option_value %]" [% option_is_selected %]
+    > [% option_name %]</option>
+
+=for layout option_is_selected_yes
+
+selected="selected"
+
+=for layout option_is_selected_no
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/date_time.tt b/share/skin/default/layout/field/mutable/date_time.tt
new file mode 100644 (file)
index 0000000..05a69a5
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field/mutable
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/file.tt b/share/skin/default/layout/field/mutable/file.tt
new file mode 100644 (file)
index 0000000..05a69a5
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field/mutable
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/hidden_array.tt b/share/skin/default/layout/field/mutable/hidden_array.tt
new file mode 100644 (file)
index 0000000..0f5e35d
--- /dev/null
@@ -0,0 +1,9 @@
+=for layout widget
+
+[% hidden_list %]
+
+=for layout hidden_field
+
+<input type="hidden" name="[% field_name %]" value="[% field_value %]" />
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/integer.tt b/share/skin/default/layout/field/mutable/integer.tt
new file mode 100644 (file)
index 0000000..05a69a5
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field/mutable
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/matching_passwords.tt b/share/skin/default/layout/field/mutable/matching_passwords.tt
new file mode 100644 (file)
index 0000000..d07b784
--- /dev/null
@@ -0,0 +1,8 @@
+=extends field/mutable/password
+
+=for layout widget
+
+[% call_next %]
+[% check_value %]
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/number.tt b/share/skin/default/layout/field/mutable/number.tt
new file mode 100644 (file)
index 0000000..05a69a5
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field/mutable
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/password.tt b/share/skin/default/layout/field/mutable/password.tt
new file mode 100644 (file)
index 0000000..05a69a5
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field/mutable
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/string.tt b/share/skin/default/layout/field/mutable/string.tt
new file mode 100644 (file)
index 0000000..05a69a5
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field/mutable
+
+=cut
diff --git a/share/skin/default/layout/field/mutable/text.tt b/share/skin/default/layout/field/mutable/text.tt
new file mode 100644 (file)
index 0000000..b4038aa
--- /dev/null
@@ -0,0 +1,9 @@
+=extends field/mutable
+
+=for layout field
+
+<textarea name="[% field_name %]" id="[% field_id %]">[%
+ field_value 
+%]</textarea>
+
+=cut
index 9a53cb2..954c40b 100644 (file)
@@ -1,11 +1,25 @@
-=extends NEXT
+=for layout widget
+
+[% label %] [% field %] [% message %]
+
+=for layout field
+
+TODO
+
+=for layout label
+
+<!-- This conditional goes away when mst comes up with something better -->
+[% content_str = GET content; %]
+[% IF content_str.length; %]
+  <label> [% content_str | html %]: </label>
+[% END; %]
 
 =for layout message
 
 <!-- This conditional goes away when mst comes up with something better -->
 [% content_str = GET content; %]
 [% IF content_str.length; %]
-  <span> [% content_str | html %] </span>
+  <span> [% content_str | html %] </span> <br />
 [% END %]
 
 =cut
diff --git a/share/skin/default/layout/field/number.tt b/share/skin/default/layout/field/number.tt
new file mode 100644 (file)
index 0000000..18ab448
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field
+
+=cut
diff --git a/share/skin/default/layout/field/related_object.tt b/share/skin/default/layout/field/related_object.tt
new file mode 100644 (file)
index 0000000..18ab448
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field
+
+=cut
diff --git a/share/skin/default/layout/field/string.tt b/share/skin/default/layout/field/string.tt
new file mode 100644 (file)
index 0000000..18ab448
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field
+
+=cut
diff --git a/share/skin/default/layout/field/text.tt b/share/skin/default/layout/field/text.tt
new file mode 100644 (file)
index 0000000..18ab448
--- /dev/null
@@ -0,0 +1,3 @@
+=extends field
+
+=cut
diff --git a/share/skin/default/layout/list_view.tt b/share/skin/default/layout/list_view.tt
deleted file mode 100644 (file)
index 5712596..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-=extends NEXT
-
-=for layout actions
-
-<ul>
-  [% call_next %]
-</ul>
-
-=for layout pager
-
-<ul>
-  [% first_page %]
-  [% previous_page %]
-  [% page_list %]
-  [% next_page %]
-  [% last_page %]
-</ul>
-
-=cut
index 21def52..20dee31 100644 (file)
@@ -2,6 +2,6 @@
 
 =for layout field
 
-  [% call_next %]
+  [% call_next %] <br>
 
 =cut
diff --git a/share/skin/default/layout/site_layout.tt b/share/skin/default/layout/site_layout.tt
new file mode 100644 (file)
index 0000000..17d78ca
--- /dev/null
@@ -0,0 +1,22 @@
+=extends NEXT
+
+=for layout widget
+
+<!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">
+
+<head>
+  [% head %]
+</head>
+
+<body>
+  [% body %]
+</body>
+
+</html>
+
+=for layout head_style
+
+=cut
diff --git a/share/skin/default/layout/value/boolean.tt b/share/skin/default/layout/value/boolean.tt
new file mode 100644 (file)
index 0000000..310783b
--- /dev/null
@@ -0,0 +1,5 @@
+=for layout widget
+
+[% value | html %]
+
+=cut
\ No newline at end of file
diff --git a/share/skin/default/layout/value/collection.tt b/share/skin/default/layout/value/collection.tt
new file mode 100644 (file)
index 0000000..c866aa8
--- /dev/null
@@ -0,0 +1,15 @@
+=for layout widget
+
+[% list %]
+
+=for layout list
+
+<ul>
+[% content %]
+</ul>
+
+=for layout item
+
+<li>[% value | html %]</li>
+
+=cut
diff --git a/share/skin/default/layout/value/date_time.tt b/share/skin/default/layout/value/date_time.tt
new file mode 100644 (file)
index 0000000..0ee0d75
--- /dev/null
@@ -0,0 +1,5 @@
+=for layout widget
+
+[% value | html %]
+
+=cut
diff --git a/share/skin/default/layout/value/image.tt b/share/skin/default/layout/value/image.tt
new file mode 100644 (file)
index 0000000..5ebea74
--- /dev/null
@@ -0,0 +1,11 @@
+=for layout widget
+
+[% image %]
+
+=for layout has_image
+
+<img src="[% uri %]">
+
+=for layout no_image
+
+=cut
\ No newline at end of file
diff --git a/share/skin/default/layout/value/list.tt b/share/skin/default/layout/value/list.tt
new file mode 100644 (file)
index 0000000..bd8ad27
--- /dev/null
@@ -0,0 +1,15 @@
+=for layout widget
+
+[% list %]
+
+=for layout list
+
+<ul>
+[% content %]
+</ul>
+
+=for layout item
+
+<li>[% value | html %]</li>
+
+=cut
\ No newline at end of file
diff --git a/share/skin/default/layout/value/number.tt b/share/skin/default/layout/value/number.tt
new file mode 100644 (file)
index 0000000..0ee0d75
--- /dev/null
@@ -0,0 +1,5 @@
+=for layout widget
+
+[% value | html %]
+
+=cut
diff --git a/share/skin/default/layout/value/related_object.tt b/share/skin/default/layout/value/related_object.tt
new file mode 100644 (file)
index 0000000..0ee0d75
--- /dev/null
@@ -0,0 +1,5 @@
+=for layout widget
+
+[% value | html %]
+
+=cut
diff --git a/share/skin/default/layout/value/string.tt b/share/skin/default/layout/value/string.tt
new file mode 100644 (file)
index 0000000..310783b
--- /dev/null
@@ -0,0 +1,5 @@
+=for layout widget
+
+[% value | html %]
+
+=cut
\ No newline at end of file
diff --git a/share/skin/default/layout/value/text.tt b/share/skin/default/layout/value/text.tt
new file mode 100644 (file)
index 0000000..310783b
--- /dev/null
@@ -0,0 +1,5 @@
+=for layout widget
+
+[% value | html %]
+
+=cut
\ No newline at end of file