/[Arh]/lib/Arh/Model/Unit.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/Arh/Model/Unit.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 7 by dpavlin, Thu Nov 29 00:34:22 2007 UTC revision 8 by dpavlin, Thu Nov 29 16:08:13 2007 UTC
# Line 15  use Arh::Record schema { Line 15  use Arh::Record schema {
15                  type is 'text',                  type is 'text',
16                  label is _("Number"),                  label is _("Number"),
17                  is mandatory;                  is mandatory;
           
         column material =>  
                 label is _("Material"),  
                 refers_to Arh::Model::UnitMaterial;  
18    
19          column dimensions =>          column dimensions =>
20                  label is _("Dimensions"),                  label is _("Dimensions"),
# Line 30  use Arh::Record schema { Line 26  use Arh::Record schema {
26                  type is 'text';                  type is 'text';
27    
28          column description =>          column description =>
29                  label is _("Description");                  label is _("Description"),
30                    render as 'textarea';
31    
32          column chronology =>          column chronology =>
33                  label is _("Chronology"),                  label is _("Chronology"),
# Line 45  use Arh::Record schema { Line 42  use Arh::Record schema {
42    
43  # Your model-specific methods go here.  # Your model-specific methods go here.
44    
45    sub material {
46            my $self = shift;
47            my $m = Arh::Model::UnitMaterialCollection->new;
48            $m->limit( column => 'unit', value => $self->id );
49            return $m;
50    }
51    
52  1;  1;
53    

Legend:
Removed from v.7  
changed lines
  Added in v.8

  ViewVC Help
Powered by ViewVC 1.1.26