/[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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 39 - (hide annotations)
Sun Apr 6 11:12:58 2008 UTC (16 years ago) by dpavlin
File size: 3301 byte(s)
huge and merry code dump of lastest changes in middle of refactoring
1 dpavlin 2 use strict;
2     use warnings;
3    
4     package Arh::Model::Unit;
5     use Jifty::DBI::Schema;
6    
7 dpavlin 11 use Data::Dump qw/dump/;
8    
9 dpavlin 2 use Arh::Record schema {
10    
11 dpavlin 39 column unit_id =>
12     type is 'text',
13     label is _("ID"),
14     hint is _('Number for unit identification'),
15     is mandatory;
16    
17 dpavlin 2 column name =>
18     type is 'text',
19 dpavlin 39 label is _("Unit"),
20     hint is _('Name of unit described'),
21 dpavlin 2 is mandatory;
22 dpavlin 39
23     column subcategory =>
24     label is _('Subcategory'),
25     hint is _('Function of unit, larger concept of which unit is part'),
26 dpavlin 2 type is 'text',
27     is mandatory;
28    
29 dpavlin 39 column category =>
30     label is _('Category'),
31 dpavlin 9 is mandatory,
32 dpavlin 39 references Arh::Model::Category,
33     is AutoReference;
34 dpavlin 9
35 dpavlin 39 column location =>
36     label is _("Location"),
37     refers_to Arh::Model::Location,
38     is AutoReference;
39    
40     column site =>
41     label is _('Site'),
42     is mandatory,
43     refers_to Arh::Model::Site,
44     is AutoReference;
45    
46     column gps =>
47     label is _('GPS coordinates');
48    
49     column placement =>
50     label is _('Placement'),
51     is mandatory;
52    
53     column context =>
54     label is _('Context');
55    
56     column discovery =>
57     label is _('Time of discovery');
58    
59     column function =>
60     label is _('Function');
61    
62     column reusage =>
63     label is _('Reusage');
64    
65     column ownership =>
66     label is _('Ownership');
67    
68     column presevation_place =>
69     label is _('Place of preservation');
70    
71     column inventory_nr =>
72     label is _('Inventory number');
73    
74 dpavlin 2 column dimensions =>
75     label is _("Dimensions"),
76 dpavlin 23 hint is _("Separate values with ; (semicolumn)"),
77 dpavlin 2 type is 'text';
78 dpavlin 39
79     column condition =>
80     label is _('Condition'),
81     is mandatory;
82 dpavlin 2
83 dpavlin 39 column toplogy =>
84     label is _('Topology');
85    
86     # column material =>
87     # label is _('Material');
88    
89     column technique =>
90     label is _('Technique');
91    
92 dpavlin 2 column description =>
93 dpavlin 8 label is _("Description"),
94 dpavlin 39 is mandatory,
95 dpavlin 8 render as 'textarea';
96 dpavlin 2
97 dpavlin 39 column contstruction =>
98     label is _('Construction');
99    
100     column iconography =>
101     label is _('Iconography');
102    
103     column decoration =>
104     label is _('Decoration');
105    
106     column motifs =>
107     label is _('Motifs');
108    
109     column inscription =>
110     label is _('Inscription');
111    
112     column language =>
113     label is _('Language');
114    
115     column font =>
116     label is _('Font');
117    
118     column author =>
119     label is _('Author(s)');
120    
121 dpavlin 2 column chronology =>
122     label is _("Chronology"),
123     refers_to Arh::Model::Chronology,
124 dpavlin 39 # is AutoReference,
125 dpavlin 2 since '0.0.2';
126    
127 dpavlin 39 column chronostyle =>
128     label is _('Chronostyle');
129 dpavlin 2
130 dpavlin 39 column explored =>
131     label is _('Explored');
132    
133     column conservations =>
134     label is _('Conservations');
135    
136     column restorations =>
137     label is _('Restorations');
138    
139     column legal =>
140     label is _('Legal status');
141    
142     column links =>
143     label is _('Links'),
144     refers_to Arh::Model::Unit,
145     is AutoReference;
146    
147     column sources =>
148     label is _('Sources');
149    
150     column bibliography =>
151     label is _('Bibliography'),
152     is mandatory;
153    
154     column copyright =>
155     label is _('Copyright'),
156     is mandatory;
157    
158     =for remove
159     column campaign =>
160     label is _("Part of campaign"),
161     refers_to Arh::Model::Campaign,
162     # is AutoReference,
163     is mandatory,
164     since '0.0.9';
165     =cut
166    
167 dpavlin 2 };
168    
169 dpavlin 10 #use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on
170    
171 dpavlin 2 # Your model-specific methods go here.
172    
173 dpavlin 8 sub material {
174     my $self = shift;
175     my $m = Arh::Model::UnitMaterialCollection->new;
176     $m->limit( column => 'unit', value => $self->id );
177     return $m;
178     }
179    
180 dpavlin 13 use Arh::DefaultACL;
181 dpavlin 10
182 dpavlin 2 1;
183    

  ViewVC Help
Powered by ViewVC 1.1.26