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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (show annotations)
Tue Apr 8 23:22:22 2008 UTC (11 years, 9 months ago) by dpavlin
File size: 3472 byte(s)
bunch of changes:
- added bulk create link (which still doesn't work all that well)
- 
1 use strict;
2 use warnings;
3
4 package Arh::Model::Unit;
5 use Jifty::DBI::Schema;
6
7 use Data::Dump qw/dump/;
8
9 use Arh::Record schema {
10
11 column unit_id =>
12 type is 'text',
13 label is _("ID"),
14 hints is _('Number for unit identification'),
15 is ajax_validates,
16 is mandatory;
17
18 column name =>
19 type is 'text',
20 label is _("Unit"),
21 hints is _('Name of unit described'),
22 is ajax_validates,
23 is mandatory;
24
25 column subcategory =>
26 label is _('Subcategory'),
27 hints is _('Function of unit, larger concept of which unit is part'),
28 type is 'text',
29 is ajax_validates,
30 is mandatory;
31
32 column category =>
33 label is _('Category'),
34 is mandatory,
35 references Arh::Model::Category,
36 is AutoReference;
37
38 column location =>
39 label is _("Location"),
40 refers_to Arh::Model::Location,
41 is AutoReference;
42
43 column site =>
44 label is _('Site'),
45 is mandatory,
46 refers_to Arh::Model::Site,
47 is AutoReference;
48
49 column gps =>
50 label is _('GPS coordinates');
51
52 column placement =>
53 label is _('Placement'),
54 is ajax_validates,
55 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 column dimensions =>
79 label is _("Dimensions"),
80 hints is _("Separate values with ; (semicolumn)"),
81 type is 'text';
82
83 column condition =>
84 label is _('Condition'),
85 is ajax_validates,
86 is mandatory;
87
88 column toplogy =>
89 label is _('Topology');
90
91 # column material =>
92 # label is _('Material');
93
94 column technique =>
95 label is _('Technique');
96
97 column description =>
98 label is _("Description"),
99 is ajax_validates,
100 is mandatory,
101 render as 'textarea';
102
103 column construction =>
104 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 column chronology =>
128 label is _("Chronology"),
129 refers_to Arh::Model::Chronology,
130 # is AutoReference,
131 since '0.0.2';
132
133 column chronostyle =>
134 label is _('Chronostyle');
135
136 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 refers_to Arh::Model::Unit,
151 is AutoReference;
152
153 column sources =>
154 label is _('Sources');
155
156 column bibliography =>
157 label is _('Bibliography'),
158 is ajax_validates,
159 is mandatory;
160
161 column copyright =>
162 label is _('Copyright'),
163 is ajax_validates,
164 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 };
176
177 #use Jifty::Plugin::ActorMetadata::Mixin::Model::ActorMetadata; # created_by, created_on, updated_on
178
179 # Your model-specific methods go here.
180
181 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 use Arh::DefaultACL;
189
190 1;
191

  ViewVC Help
Powered by ViewVC 1.1.26