/[A3C]/lib/A3C/Model/hrEduOrg.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/A3C/Model/hrEduOrg.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 125 - (hide annotations)
Thu May 22 20:48:42 2008 UTC (15 years, 11 months ago) by dpavlin
File size: 4518 byte(s)
added custom CRUD for search of organization and search while
preserving most of Jifty ajax goodnes by overriding just a few
templates from jifty's Jifty::View::Declare::CRUD
1 dpavlin 119 package A3C::Model::hrEduOrg;
2     use strict;
3     use warnings;
4    
5     use Jifty::DBI::Schema;
6    
7     use A3C::Record schema {
8    
9     # hrEduOrg super: organization
10    
11     # hrEduOrg must:
12    
13     column hrEduOrgUniqueNumber =>
14     label is _('Visestruka vrijednost brojcani identifikator ustanove'),
15     max_length is 128,
16 dpavlin 124 is indexed,
17 dpavlin 119 is mandatory;
18    
19     column hrEduOrgMail =>
20     label is _('Sluzbena e-mail adresa ustanove'),
21     max_length is 256,
22     is mandatory;
23    
24     column o =>
25     label is _('RFC2256: organization this object belongs to'),
26     is mandatory;
27    
28     column hrEduOrgURL =>
29     label is _('URL adresa Web sjedista ustanove'),
30     max_length is 256,
31     is mandatory;
32    
33     column hrEduOrgType =>
34     label is _('Jednostruka vrijednost prema kategorizaciji MZOS'),
35     max_length is 128,
36     is mandatory;
37    
38     column objectClass =>
39     label is _('RFC2256: object classes of the entity'),
40     is mandatory;
41    
42    
43     # hrEduOrg may:
44    
45     column businessCategory =>
46     label is _('RFC2256: business category'),
47     max_length is 128;
48    
49     column searchGuide =>
50     label is _('RFC2256: search guide, obsoleted by enhancedSearchGuide');
51    
52     column internationaliSDNNumber =>
53     label is _('RFC2256: international ISDN number'),
54     max_length is 16;
55    
56     column telexNumber =>
57     label is _('RFC2256: Telex Number');
58    
59     column hrEduOrgPolicyURI =>
60     label is _('URI s oznakom; pokazuje na sluzbenu politiku ustanove'),
61     max_length is 256;
62    
63     column postOfficeBox =>
64     label is _('RFC2256: Post Office Box'),
65     max_length is 40;
66    
67     column telephoneNumber =>
68     label is _('RFC2256: Telephone Number'),
69     max_length is 32;
70    
71     column destinationIndicator =>
72     label is _('RFC2256: destination indicator'),
73     max_length is 128;
74    
75     column facsimileTelephoneNumber =>
76     label is _('RFC2256: Facsimile (Fax) Telephone Number');
77    
78     column hrEduOrgMobile =>
79     label is _('Broj mobilnog telefona ustanove');
80    
81     column userPassword =>
82     label is _('RFC2256/2307: password of user'),
83     max_length is 128;
84    
85     column x121Address =>
86     label is _('RFC2256: X.121 Address'),
87     max_length is 15;
88    
89     column st =>
90     label is _('RFC2256: state or province which this object resides in');
91    
92     column postalCode =>
93     label is _('RFC2256: postal code'),
94     max_length is 40;
95    
96     column seeAlso =>
97     label is _('RFC2256: DN of related object');
98    
99     column postalAddress =>
100 dpavlin 124 render as 'textarea',
101 dpavlin 119 label is _('RFC2256: postal address');
102    
103     column physicalDeliveryOfficeName =>
104     label is _('RFC2256: Physical Delivery Office Name'),
105     max_length is 128;
106    
107     column teletexTerminalIdentifier =>
108     label is _('RFC2256: Teletex Terminal Identifier');
109    
110     column l =>
111     label is _('RFC2256: locality which this object resides in');
112    
113     column registeredAddress =>
114     label is _('RFC2256: registered postal address');
115    
116     column hrEduOrgMember =>
117     label is _('Pripadnost nekoj ustanovi'),
118     max_length is 128;
119    
120     column description =>
121     label is _('RFC2256: descriptive information'),
122     max_length is 1024;
123    
124     column preferredDeliveryMethod =>
125     label is _('RFC2256: preferred delivery method');
126    
127     column street =>
128     label is _('RFC2256: street address of this object'),
129     max_length is 128;
130    
131    
132     # dcObject super: top
133    
134     # dcObject must:
135    
136     column dc =>
137     label is _('RFC1274/2247: domain component'),
138     is mandatory;
139    
140    
141     # posixAccount super: top
142    
143     # posixAccount must:
144    
145     column uidNumber =>
146 dpavlin 124 type is 'int',
147 dpavlin 119 label is _('An integer uniquely identifying a user in an administrative domain'),
148 dpavlin 124 is indexed,
149     is distinct,
150 dpavlin 119 is mandatory;
151    
152     column uid =>
153     label is _('RFC1274: user identifier'),
154     max_length is 256,
155 dpavlin 124 is indexed,
156     is distinct,
157 dpavlin 119 is mandatory;
158    
159     column homeDirectory =>
160     label is _('The absolute path to the home directory'),
161     is mandatory;
162    
163     column cn =>
164     label is _('RFC2256: common name(s) for which the entity is known by'),
165 dpavlin 124 is indexed,
166 dpavlin 119 is mandatory;
167    
168     column gidNumber =>
169 dpavlin 124 type is 'int',
170 dpavlin 119 label is _('An integer uniquely identifying a group in an administrative domain'),
171     is mandatory;
172    
173    
174     # posixAccount may:
175    
176     column gecos =>
177     label is _('The GECOS field; the common name');
178    
179     column loginShell =>
180     label is _('The path to the login shell');
181    
182    
183    
184    
185     };
186    
187    
188     =head2 name
189    
190 dpavlin 124 Humanly readable name of organization
191 dpavlin 119
192     =cut
193    
194 dpavlin 124 sub name {
195     my $self = shift;
196     return $self->cn . ' - ' . $self->o;
197     }
198 dpavlin 119
199    
200     =head2 ACL
201    
202     We use L<A3C::DefaultACL> for access control
203    
204     =cut
205    
206     use A3C::DefaultACL;
207    
208 dpavlin 125 # added to make Jifty::View::Declare::CRUD happy because it
209     # tries to capitalize first letter of model creating
210     # A3C::Model::HrEduOrg which is invalid
211     sub object_type { 'A3C::Model::hrEduOrg' }
212     sub collection_class { 'A3C::Model::hrEduOrgCollection' }
213    
214 dpavlin 119 1;

  ViewVC Help
Powered by ViewVC 1.1.26