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

  ViewVC Help
Powered by ViewVC 1.1.26