work in progress, listview still broken
groditi [Wed, 2 Jan 2008 18:49:19 +0000 (18:49 +0000)]
58 files changed:
lib/ComponentUI/View/Site/Widget/Layout.pm
lib/Reaction/InterfaceModel/Collection.pm
lib/Reaction/InterfaceModel/Collection/DBIC/Role/Base.pm
lib/Reaction/InterfaceModel/Collection/DBIC/Role/Where.pm
lib/Reaction/InterfaceModel/Reflector/DBIC.pm
lib/Reaction/UI/Controller/Collection.pm
lib/Reaction/UI/Controller/Collection/CRUD.pm
lib/Reaction/UI/LayoutSet.pm
lib/Reaction/UI/ViewPort/Action.pm
lib/Reaction/UI/ViewPort/Action/Link.pm
lib/Reaction/UI/ViewPort/Collection.pm
lib/Reaction/UI/ViewPort/Collection/Grid.pm
lib/Reaction/UI/ViewPort/Collection/Grid/Member.pm
lib/Reaction/UI/ViewPort/Field/Mutable/Array.pm
lib/Reaction/UI/ViewPort/Field/Mutable/ChooseOne.pm
lib/Reaction/UI/ViewPort/Field/Mutable/DateTime.pm
lib/Reaction/UI/ViewPort/Field/Mutable/Number.pm
lib/Reaction/UI/ViewPort/Field/Role/Choices.pm
lib/Reaction/UI/ViewPort/Field/Role/Mutable.pm
lib/Reaction/UI/ViewPort/ListView.pm
lib/Reaction/UI/ViewPort/Object.pm
lib/Reaction/UI/ViewPort/Role/Actions.pm
lib/Reaction/UI/Widget/Field/Array.pm [moved from lib/Reaction/UI/Widget/Field/List.pm with 87% similarity]
lib/Reaction/UI/Widget/ListView.pm
share/skin/default/layout/action.tt [moved from share/skin/default/layout/action_form.tt with 100% similarity]
share/skin/default/layout/action/link.tt [moved from share/skin/default/layout/grid_view/action.tt with 100% similarity]
share/skin/default/layout/collection.tt [new file with mode: 0644]
share/skin/default/layout/collection/grid.tt [moved from share/skin/default/layout/grid_view.tt with 75% similarity]
share/skin/default/layout/collection/grid/member.tt [moved from share/skin/default/layout/grid_view/entity.tt with 100% similarity]
share/skin/default/layout/collection/grid/member/with_actions.tt [moved from share/skin/default/layout/grid_view/entity/with_actions.tt with 76% similarity]
share/skin/default/layout/display_field/boolean.tt [deleted file]
share/skin/default/layout/display_field/date_time.tt [deleted file]
share/skin/default/layout/display_field/number.tt [deleted file]
share/skin/default/layout/display_field/related_object.tt [deleted file]
share/skin/default/layout/display_field/string.tt [deleted file]
share/skin/default/layout/display_field/text.tt [deleted file]
share/skin/default/layout/field.tt
share/skin/default/layout/field/array.tt [moved from share/skin/default/layout/display_field/list.tt with 100% similarity]
share/skin/default/layout/field/boolean.tt
share/skin/default/layout/field/collection.tt [moved from share/skin/default/layout/display_field/collection.tt with 100% similarity]
share/skin/default/layout/field/integer.tt [moved from share/skin/default/layout/field/file.tt with 100% similarity]
share/skin/default/layout/field/mutable.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/boolean.tt [new file with mode: 0644]
share/skin/default/layout/field/mutable/choose_many.tt [moved from share/skin/default/layout/field/choose_many.tt with 97% similarity]
share/skin/default/layout/field/mutable/choose_one.tt [moved from share/skin/default/layout/field/choose_one.tt with 95% similarity]
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 [moved from share/skin/default/layout/field/hidden_array.tt with 100% similarity]
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 [moved from share/skin/default/layout/field/time_range.tt with 100% similarity]
share/skin/default/layout/field/number.tt
share/skin/default/layout/field/related_object.tt [moved from share/skin/default/layout/field/password.tt with 100% similarity]
share/skin/default/layout/field/text.tt
share/skin/default/layout/list_view.tt
share/skin/default/layout/object.tt [moved from share/skin/default/layout/object_view.tt with 100% similarity]

index d33fa31..5fef458 100644 (file)
@@ -2,7 +2,7 @@ package ComponentUI::View::Site::Widget::Layout;
 
 use Reaction::UI::WidgetClass;
 
-class Layout which {
+class Layout, which {
 
   implements fragment main_content {
     if (my $inner = $_{viewport}->inner) {
index 9b962bd..068e1c0 100644 (file)
@@ -33,6 +33,8 @@ class Collection is "Reaction::InterfaceModel::Object", which {
                             metaclass  => DomainModelAttribute,
                            );
 
+  has 'member_type' => (is => 'ro', isa => 'ClassName');
+
   implements _build__collection_store => as { [] };
 
   implements members => as {
index ee32997..b2a0685 100644 (file)
@@ -14,11 +14,8 @@ role Base, which {
                              isa => 'DBIx::Class::ResultSet',
                             );
 
-  has '_im_class' => (
-                      is         => 'ro',
-                      isa        => 'Str',
-                      lazy_build => 1,
-                     );
+  has 'member_type' => (is => 'ro', isa => 'ClassName', lazy_build => 1);
+
 
   #implements BUILD => as {
   #  my $self = shift;
@@ -29,8 +26,10 @@ role Base, which {
   #    unless $self->_im_class->can("inflate_result");
   #};
 
+
+
   #Oh man. I have a bad feeling about this one.
-  implements _build__im_class => as {
+  implements _build_member_type => as {
     my $self = shift;
     my $class = blessed($self) || $self;
     $class =~ s/::Collection$//;
@@ -39,8 +38,7 @@ role Base, which {
 
   implements _build__collection_store => as {
     my $self = shift;
-    my $im_class = $self->_im_class;
-    [ $self->_source_resultset->search({}, {result_class => $im_class})->all ];
+    [ $self->_source_resultset->search({}, {result_class => $self->member_type})->all ];
   };
 
   implements clone => as {
@@ -49,7 +47,7 @@ role Base, which {
     #should the clone include the arrayref of IM::Objects too?
     return (blessed $self)->new(
                                 _source_resultset => $rs,
-                                _im_class => $self->_im_class, @_
+                                member_type => $self->member_type, @_
                                );
   };
 
@@ -72,7 +70,7 @@ role Base, which {
     my $rs = $self->_source_resultset->page(@_);
     return (blessed $self)->new(
                                 _source_resultset => $rs,
-                                _im_class => $self->_im_class,
+                                member_type => $self->member_type,
                                );
   };
 
@@ -101,10 +99,10 @@ Provides methods to allow a collection to be populated by a L<DBIx::Class::Resul
 Required, Read-only. Contains the L<DBIx::Class::ResultSet> used to populate the
 collection.
 
-=head2 _im_class
+=head2 member_type
 
 Read-only, lazy_build. The name of the IM Object Class that the resultset inside this
-collection will inflate to. Predicate: C<_has_im_class>
+collection will inflate to. Predicate: C<has_member_type>
 
 =head1 METHODS
 
index 1faaa73..c5459ae 100644 (file)
@@ -11,7 +11,7 @@ role Where, which {
     my $rs = $self->_source_resultset->search_rs(@_);
     return (blessed $self)->new(
                                 _source_resultset => $rs,
-                                _im_class => $self->_im_class
+                                member_type => $self->member_type
                                );
   };
 
@@ -27,7 +27,7 @@ role Where, which {
   implements find => as {
     my $self = shift;
     $self->_source_resultset
-      ->search({},{result_class => $self->_im_class})
+      ->search({},{result_class => $self->member_type})
         ->find(@_);
   };
 };
index 8df719b..c602e83 100644 (file)
@@ -380,7 +380,7 @@ class DBIC, which {
 
     my $make_immutable = $meta->is_immutable || $self->make_classes_immutable;;
     $meta->make_mutable if $meta->is_immutable;
-    $meta->add_method(_build__im_class => sub{ $object } );
+    $meta->add_method(_build_member_type => sub{ $object } );
     #XXX as a default pass the domain model as a target_model until i come up with something
     #better through the coercion method
     my $def_act_args = sub {
index d7d727b..2aff23e 100644 (file)
@@ -6,7 +6,7 @@ use base 'Reaction::UI::Controller';
 use Reaction::Class;
 
 use aliased 'Reaction::UI::ViewPort::ListView';
-use aliased 'Reaction::UI::ViewPort::ObjectView';
+use aliased 'Reaction::UI::ViewPort::Object';
 
 has 'model_name'      => (isa => 'Str', is => 'rw', required => 1);
 has 'collection_name' => (isa => 'Str', is => 'rw', required => 1);
@@ -17,7 +17,7 @@ has action_viewport_args => (isa => 'HashRef', is => 'rw', lazy_build => 1);
 sub _build_action_viewport_map {
   return {
           list => ListView,
-          view => ObjectView,
+          view => Object,
          };
 }
 
@@ -52,7 +52,7 @@ sub object :Chained('base') :PathPart('id') :CaptureArgs(1) {
 sub view :Chained('object') :Args(0) {
   my ($self, $c) = @_;
   my $object :Stashed;
-  $c->forward(basic_page => [{object => $object}]);
+  $c->forward(basic_page => [{model => $object}]);
 }
 
 sub basic_page : Private {
index 8a2dcd0..3d04c1f 100644 (file)
@@ -5,11 +5,11 @@ use warnings;
 use base 'Reaction::UI::Controller::Collection';
 use Reaction::Class;
 
-use aliased 'Reaction::UI::ViewPort::ActionForm';
+use aliased 'Reaction::UI::ViewPort::Action';
 
 sub _build_action_viewport_map {
   my $map = shift->next::method(@_);
-  map{ $map->{$_} = ActionForm } qw/create update delete delete_all/;
+  map{ $map->{$_} = Action } qw/create update delete delete_all/;
   return $map;
 }
 
@@ -22,7 +22,7 @@ sub _build_action_viewport_args {
         { label => 'Delete all', action => sub {
             [ '', 'delete_all', $_[1]->req->captures ] } },
       ],
-      Entity =>
+      Member =>
       { action_prototypes =>
         [ { label => 'View', action => sub {
               [ '', 'view', [ @{$_[1]->req->captures},   $_[0]->__id ] ] } },
@@ -102,7 +102,7 @@ sub basic_model_action :Private {
   return $self->push_viewport
     (
      $self->action_viewport_map->{$cat_action_name},
-     action => $self->get_model_action($c, $im_action_name, $target),
+     model => $self->get_model_action($c, $im_action_name, $target),
      %{ $vp_args || {} },
      %{ $self->action_viewport_args->{$cat_action_name} || {} },
     );
index 4a9c533..da4ecdc 100644 (file)
@@ -78,7 +78,6 @@ class LayoutSet which {
     # doesn't have the match pos go past the latter = and lose name2
     while ($data =~ m/=(.*?)\n(.*?)(?:\n(?==)|$)/sg) {
       my ($data, $text) = ($1, $2);
-
       if ($data =~ /^for layout (\S+)/) {
         my $fname = $1;
         $layouts->{$fname} = $text;
index e7a21a5..9da7191 100644 (file)
@@ -17,7 +17,8 @@ use aliased 'Reaction::UI::ViewPort::Field::Mutable::ChooseMany';
 #use aliased 'Reaction::UI::ViewPort::InterfaceModel::Field::Mutable::TimeRange';
 
 class Action is 'Reaction::UI::ViewPort::Object', which {
-  has '+model' => (isa => 'Reaction::InterfaceModel::Action');
+  has model  => (is => 'ro', isa => 'Reaction::InterfaceModel::Action', required => 1);
+  #has '+model' => (isa => 'Reaction::InterfaceModel::Action');
 
   has next_action       => (is => 'rw', isa => 'ArrayRef');
   has on_apply_callback => (is => 'rw', isa => 'CodeRef');
index 314c6a3..8bc8da8 100644 (file)
@@ -1,4 +1,4 @@
-package Reaction::UI::ViewPort::InterfaceModel::Action::Link;
+package Reaction::UI::ViewPort::Action::Link;
 
 use Reaction::Class;
 
index c728f8e..a260bd7 100644 (file)
@@ -17,21 +17,24 @@ class Collection is 'Reaction::UI::ViewPort', which {
 
   implements BUILD => as {
     my ($self, $args) = @_;
-    my $entity_args = delete $args->{Member};
+    my $member_args = delete $args->{Member};
     $self->member_args( $member_args ) if ref $member_args;
   };
 
+  implements _build_member_args => as{ {} };
+
   implements _build_member_class => as{ Object };
 
   after clear_current_collection => sub{
-    shift->clear_entities; #clear the entitiesis the current collection changes, duh
+    shift->clear_members; #clear the members the current collection changes, duh
   };
 
   implements _build_current_collection => as {
     shift->collection;
   };
 
-  implements model
+  #I'm not really sure why this is here all of a sudden.
+  implements model => as { shift->current_collection };
 
   implements _build_members => as {
     my ($self) = @_;
@@ -50,7 +53,7 @@ class Collection is 'Reaction::UI::ViewPort', which {
       my $builder_cache = $builders->{$type} ||= {};
       my $member = $class->new(
                             ctx           => $ctx,
-                            object        => $obj,
+                            model         => $obj,
                             location      => join('-', $loc, $i++),
                             builder_cache => $builder_cache,
                             %$args
index 3314039..bc81a0c 100644 (file)
@@ -25,13 +25,16 @@ class Grid is 'Reaction::UI::ViewPort::Collection', which {
     return \%labels;
   };
 
+  implements _build_field_order     => as { []; };
+  implements _build_excluded_fields => as { []; };
+
   implements _build_ordered_fields => as {
     my ($self) = @_;
     confess("current_collection lacks a value for 'member_type' attribute")
       unless $self->current_collection->has_member_type;
     my %excluded = map { $_ => undef } @{ $self->excluded_fields };
     #treat _$field_name as private and exclude fields with no reader
-    my @names = grep { $_ !~ /^_/ && !exists($exclude{$_})} map { $_->name }
+    my @names = grep { $_ !~ /^_/ && !exists($excluded{$_})} map { $_->name }
       grep { defined $_->get_read_method }
         $self->current_collection->member_type->meta->parameter_attributes;
     return $self->sort_by_spec($self->field_order, \@names);
index 0aa5e1d..c37e10e 100644 (file)
@@ -2,7 +2,7 @@ package Reaction::UI::ViewPort::Collection::Grid::Member;
 
 use Reaction::Class;
 
-Class Member is 'Reaction::UI::ViewPort::Object', which {
+class Member is 'Reaction::UI::ViewPort::Object', which {
 
   around _build_fields_for_type_Num => sub {
     $_[0]->(@_[1..3], { layout => 'value/number', %{ $_[4] } })
@@ -41,3 +41,5 @@ Class Member is 'Reaction::UI::ViewPort::Object', which {
   around _build_fields_for_type_Reaction_InterfaceModel_Collection => sub { return };
 
 };
+
+1;
index 7fa3118..49e629b 100644 (file)
@@ -9,7 +9,7 @@ class Array is 'Reaction::UI::ViewPort::Field::Array', which {
     my $orig = shift;
     my $self = shift;
     return $orig->($self) unless @_;
-    my $value = defined $_[0] ? $_[0] || [];
+    my $value = defined $_[0] ? $_[0] : [];
     $orig->($self, (ref $value eq 'ARRAY' ? $value : [ $value ]));
     $self->sync_to_action;
   };
index 3ab97b6..12d6d11 100644 (file)
@@ -4,8 +4,8 @@ use Reaction::Class;
 
 class ChooseOne is 'Reaction::UI::ViewPort::Field', which {
 
-  does 'Reaction::UI::ViewPort::Object::Field::Role::Mutable';
-  does 'Reaction::UI::ViewPort::Object::Field::Role::Choices';
+  does 'Reaction::UI::ViewPort::Field::Role::Mutable';
+  does 'Reaction::UI::ViewPort::Field::Role::Choices';
 
   around value => sub {
     my $orig = shift;
index f792e5c..4950aa1 100644 (file)
@@ -4,8 +4,7 @@ use Reaction::Class;
 use Time::ParseDate;
 use DateTime;
 
-class 'Reaction::UI::ViewPort::Field::Mutable::DateTime'
-  is 'Reaction::UI::ViewPort::Field::DateTime', which {
+class 'Reaction::UI::ViewPort::Field::Mutable::DateTime', is 'Reaction::UI::ViewPort::Field::DateTime', which {
 
   does 'Reaction::UI::ViewPort::Field::Role::Mutable';
 
@@ -26,9 +25,7 @@ class 'Reaction::UI::ViewPort::Field::Mutable::DateTime'
     }
   };
 
-  override accept_events => sub {
-    ('value_string', super());
-  };
+  around accept_events => sub { ('value_string', shift->(@_)) };
 
 };
 
index d52121b..41308f3 100644 (file)
@@ -2,7 +2,7 @@ package Reaction::UI::ViewPort::Field::Mutable::Number;
 
 use Reaction::Class;
 
-class Number 'Reaction::UI::ViewPort::Field::Number', which {
+class Number is 'Reaction::UI::ViewPort::Field::Number', which {
   does 'Reaction::UI::ViewPort::Field::Role::Mutable';
 };
 
index db1c3af..326dc54 100644 (file)
@@ -1,6 +1,6 @@
 package Reaction::UI::ViewPort::Field::Role::Choices;
 
-use Reaction::Class;
+use Reaction::Role;
 use URI;
 use Scalar::Util 'blessed';
 
index 62191ca..db6c4f3 100644 (file)
@@ -1,5 +1,7 @@
 package Reaction::UI::ViewPort::Field::Role::Mutable;
 
+use Reaction::Role;
+
 use aliased 'Reaction::InterfaceModel::Action';
 use aliased 'Reaction::Meta::InterfaceModel::Action::ParameterAttribute';
 
@@ -44,3 +46,5 @@ role Mutable, which {
   around accept_events => sub { ('value', shift->(@_)) };
 
 };
+
+1;
index 5d90c76..1c2247d 100644 (file)
@@ -1,24 +1,24 @@
 package Reaction::UI::ViewPort::ListView;
 
 use Reaction::Class;
-use aliased 'Reaction::UI::ViewPort::GridView::Entity::WithActions';
+use aliased 'Reaction::UI::ViewPort::Collection::Grid::Member::WithActions';
 
-class ListView is 'Reaction::UI::ViewPort::GridView', which {
+class ListView is 'Reaction::UI::ViewPort::Collection::Grid', which {
 
-  does 'Reaction::UI::ViewPort::GridView::Role::Order';
-  does 'Reaction::UI::ViewPort::GridView::Role::Pager';
-  does 'Reaction::UI::ViewPort::GridView::Role::Actions';
+  does 'Reaction::UI::ViewPort::Collection::Role::Order';
+  does 'Reaction::UI::ViewPort::Collection::Role::Pager';
+  does 'Reaction::UI::ViewPort::Role::Actions';
 
   #If I decide that object actions and collection actions should be
   #lumped together i oculd move these into the collection action role
   #ooor we could create a third role that does this, but gah, no?
-  implements _build_entity_class => as { WithActions };
+  implements _build_member_class => as { WithActions };
 
   #You'se has to goes aways. sorry.
   #if i saved the args as an attribute i could probably get around this....
   implements object_action_count => as {
     my $self = shift;
-    for ( @{ $self->entities } ) {
+    for ( @{ $self->members } ) {
       #pickup here, and of to the widget for listview
       return scalar @{ $_->action_prototypes };
     }
index d7a70c1..8a40fbf 100644 (file)
@@ -9,7 +9,7 @@ use aliased 'Reaction::UI::ViewPort::Field::Boolean';
 use aliased 'Reaction::UI::ViewPort::Field::String';
 use aliased 'Reaction::UI::ViewPort::Field::DateTime';
 use aliased 'Reaction::UI::ViewPort::Field::RelatedObject';
-use aliased 'Reaction::UI::ViewPort::Field::List';
+use aliased 'Reaction::UI::ViewPort::Field::Array';
 use aliased 'Reaction::UI::ViewPort::Field::Collection';
 
 use aliased 'Reaction::InterfaceModel::Object' => 'IM_Object';
@@ -48,14 +48,14 @@ class Object is 'Reaction::UI::ViewPort', which {
       my $field = $self->$meth($obj, $attr, ($args->{$field_name} || {}));
       push(@fields, $field) if $field;
     }
-    return \@field;
+    return \@fields;
   };
 
   implements _build_ordered_fields => as {
     my ($self) = @_;
     my %excluded = map { $_ => undef } @{ $self->excluded_fields };
     #treat _$field_name as private and exclude fields with no reader
-    my @names = grep { $_ !~ /^_/ && !exists($exclude{$_})} map { $_->name }
+    my @names = grep { $_ !~ /^_/ && !exists($excluded{$_})} map { $_->name }
       grep { defined $_->get_read_method } $self->model->meta->parameter_attributes;
     return $self->sort_by_spec($self->field_order, \@names);
   };
@@ -164,7 +164,7 @@ class Object is 'Reaction::UI::ViewPort', which {
 
   implements _build_fields_for_type_ArrayRef => as {
     my ($self, $attr, $args) = @_;
-    $self->_build_simple_field(attribute => $attr, class => List, %$args);
+    $self->_build_simple_field(attribute => $attr, class => Array, %$args);
   };
 
   implements _build_fields_for_type_Reaction_InterfaceModel_Object => as {
index d7641be..9c99077 100644 (file)
@@ -13,15 +13,12 @@ role Actions, which {
     my ($self) = @_;
     my (@act, $i);
     my $ctx = $self->ctx;
-    #if i could abstract this vs ->object for row we could eliminate the entity
-    #version of this role and just use one for both things. that would be cool.
-    my $obj = $self->current_collection;
     my $loc = $self->location;
     foreach my $proto (@{ $self->action_prototypes }) {
       my $action = Reaction::UI::ViewPort::Action::Link->new
         (
          ctx      => $ctx,
-         target   => $obj,
+         target   => $self->model,
          location => join ('-', $loc, 'action', $i++),
          %$proto,
         );
similarity index 87%
rename from lib/Reaction/UI/Widget/Field/List.pm
rename to lib/Reaction/UI/Widget/Field/Array.pm
index 57f9d92..cf318c9 100644 (file)
@@ -1,8 +1,8 @@
-package Reaction::UI::Widget::Field::List;
+package Reaction::UI::Widget::Field::Array;
 
 use Reaction::UI::WidgetClass;
 
-class List, which {
+class Array, which {
 
   before fragment widget {
     arg 'label' => $_{viewport}->label;
@@ -24,7 +24,7 @@ __END__;
 
 =head1 NAME
 
-Reaction::UI::Widget::DisplayField::List
+Reaction::UI::Widget::DisplayField::Array
 
 =head1 DESCRIPTION
 
index cfd8028..be6fc6c 100644 (file)
@@ -2,7 +2,7 @@ package Reaction::UI::Widget::ListView;
 
 use Reaction::UI::WidgetClass;
 
-class ListView is 'Reaction::UI::Widget::GridView', which {
+class ListView is 'Reaction::UI::Widget::Collection::Grid', which {
 
   after fragment widget {
     arg pager_obj => $_{viewport}->pager;
diff --git a/share/skin/default/layout/collection.tt b/share/skin/default/layout/collection.tt
new file mode 100644 (file)
index 0000000..d4703f1
--- /dev/null
@@ -0,0 +1,5 @@
+=for layout widget
+
+[% members %]
+
+=cut
\ No newline at end of file
similarity index 75%
rename from share/skin/default/layout/grid_view.tt
rename to share/skin/default/layout/collection/grid.tt
index 310fe66..bfde10d 100644 (file)
 
 [% label %]
 
-=for layout footer
-
-<tfoot>
-  [% footer_row %]
-</tfoot>
-
-=for layout footer_row
-
-[% header_row %]
-
 =for layout body
 
 <tbody>
-  [% body_rows %]
+
+  [% members %]
+
 </tbody>
 
 =cut
diff --git a/share/skin/default/layout/display_field/boolean.tt b/share/skin/default/layout/display_field/boolean.tt
deleted file mode 100644 (file)
index d531087..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-=for layout widget
-
-[% label_layout %]
-[% value_layout %]
-
-=for layout label_layout
-
-<strong > [% label %]: </strong>
-
-=for layout value_layout
-
-[% value %]
-
-=cut
diff --git a/share/skin/default/layout/display_field/date_time.tt b/share/skin/default/layout/display_field/date_time.tt
deleted file mode 100644 (file)
index d531087..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-=for layout widget
-
-[% label_layout %]
-[% value_layout %]
-
-=for layout label_layout
-
-<strong > [% label %]: </strong>
-
-=for layout value_layout
-
-[% value %]
-
-=cut
diff --git a/share/skin/default/layout/display_field/number.tt b/share/skin/default/layout/display_field/number.tt
deleted file mode 100644 (file)
index d531087..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-=for layout widget
-
-[% label_layout %]
-[% value_layout %]
-
-=for layout label_layout
-
-<strong > [% label %]: </strong>
-
-=for layout value_layout
-
-[% value %]
-
-=cut
diff --git a/share/skin/default/layout/display_field/related_object.tt b/share/skin/default/layout/display_field/related_object.tt
deleted file mode 100644 (file)
index d531087..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-=for layout widget
-
-[% label_layout %]
-[% value_layout %]
-
-=for layout label_layout
-
-<strong > [% label %]: </strong>
-
-=for layout value_layout
-
-[% value %]
-
-=cut
diff --git a/share/skin/default/layout/display_field/string.tt b/share/skin/default/layout/display_field/string.tt
deleted file mode 100644 (file)
index d531087..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-=for layout widget
-
-[% label_layout %]
-[% value_layout %]
-
-=for layout label_layout
-
-<strong > [% label %]: </strong>
-
-=for layout value_layout
-
-[% value %]
-
-=cut
diff --git a/share/skin/default/layout/display_field/text.tt b/share/skin/default/layout/display_field/text.tt
deleted file mode 100644 (file)
index d531087..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-=for layout widget
-
-[% label_layout %]
-[% value_layout %]
-
-=for layout label_layout
-
-<strong > [% label %]: </strong>
-
-=for layout value_layout
-
-[% value %]
-
-=cut
index fbda583..d531087 100644 (file)
@@ -1,26 +1,14 @@
 =for layout widget
 
-[% label_fragment %] [% field %] [% message_fragment %] <br />
+[% label_layout %]
+[% value_layout %]
 
-=for layout label
+=for layout label_layout
 
-<label>[% label %]:</label>
+<strong > [% label %]: </strong>
 
-=for layout field
+=for layout value_layout
 
-FIELD GOES HERE
-
-=for layout message
-
-<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 %]"
+[% value %]
 
 =cut
index b750116..18ab448 100644 (file)
@@ -1,13 +1,3 @@
 =extends field
 
-=for layout field_body
-
-value="1" [% is_checked %]
-
-=for layout is_checked_yes
-
-checked="checked"
-
-=for layout is_checked_no
-
 =cut
diff --git a/share/skin/default/layout/field/mutable.tt b/share/skin/default/layout/field/mutable.tt
new file mode 100644 (file)
index 0000000..c4b3205
--- /dev/null
@@ -0,0 +1,27 @@
+=for layout widget
+
+[% label_fragment %] [% field %] [% message_fragment %] <br />
+
+=for layout label
+
+<label for="[%field_id%]">[% label %]:</label>
+
+=for layout field
+
+<!-- Why is this here??? -->
+FIELD GOES HERE
+
+=for layout message
+
+<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..f50b377
--- /dev/null
@@ -0,0 +1,13 @@
+=extends field/mutable
+
+=for layout field_body
+
+value="1" [% is_checked %]
+
+=for layout is_checked_yes
+
+checked="checked"
+
+=for layout is_checked_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/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..c038280
--- /dev/null
@@ -0,0 +1,9 @@
+=extends field/mutable
+
+=for layout field
+
+<textarea name="[% field_name %]" id="[% field_id %]">
+  [% field_value %]
+</textarea>
+
+=cut
index 201220f..18ab448 100644 (file)
@@ -1,26 +1,3 @@
-=for layout widget
-
-[% label %] [% field %] [% message %]
-
-=for layout field
-
-<!-- We need a replacement for process_attrs -->
-<input type="text" name="[% name | html%]" id="[% id | html %]" value="[% content | html %]" />
-
-=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> <br />
-[% END %]
+=extends field
 
 =cut
index e472cc8..18ab448 100644 (file)
@@ -1,9 +1,3 @@
 =extends field
 
-=for layout field
-
-<textarea name="[% field_name %]" id="[% field_id %]">
-  [% field_value %]
-</textarea>
-
 =cut
index 61e92a8..f4f6501 100644 (file)
@@ -1,4 +1,4 @@
-=extends grid_view
+=extends collection/grid
 
 =for layout widget