/[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 2 by dpavlin, Thu Nov 29 00:34:22 2007 UTC revision 9 by dpavlin, Thu Nov 29 16:40:10 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;
18            
19          column material =>          column campaign =>
20                  label is _("Material"),                  refers_to Arh::Model::Campaign,
21                  refers_to Arh::Model::UnitMaterial;                  is mandatory,
22                    since '0.0.9';
23    
24          column dimensions =>          column dimensions =>
25                  label is _("Dimensions"),                  label is _("Dimensions"),
# Line 30  use Arh::Record schema { Line 31  use Arh::Record schema {
31                  type is 'text';                  type is 'text';
32    
33          column description =>          column description =>
34                  label is _("Description");                  label is _("Description"),
35                    render as 'textarea';
36    
37          column chronology =>          column chronology =>
38                  label is _("Chronology"),                  label is _("Chronology"),
# Line 45  use Arh::Record schema { Line 47  use Arh::Record schema {
47    
48  # Your model-specific methods go here.  # Your model-specific methods go here.
49    
50    sub material {
51            my $self = shift;
52            my $m = Arh::Model::UnitMaterialCollection->new;
53            $m->limit( column => 'unit', value => $self->id );
54            return $m;
55    }
56    
57  1;  1;
58    

Legend:
Removed from v.2  
changed lines
  Added in v.9

  ViewVC Help
Powered by ViewVC 1.1.26