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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (show annotations)
Thu Apr 10 20:26:45 2008 UTC (15 years, 11 months ago) by dpavlin
File size: 1496 byte(s)
added generic currnet_user_can implementation for models so that logged
users can actually see data :-)
1 use strict;
2 use warnings;
3
4 package A3C::Model::Organization;
5 use Jifty::DBI::Schema;
6
7 use A3C::Record schema {
8
9 column uid =>
10 label is _('UID'),
11 is indexed,
12 is distinct,
13 is mandatory;
14
15 column o =>
16 label is _('Naziv matične ustanove'),
17 is mandatory;
18
19 column l =>
20 label is _('Mjesto'),
21 hist is 'Zagreb',
22 is mandatory;
23
24 column postalAddress =>
25 label is _('Poštanska adresa'),
26 render as 'textarea',
27 is mandatory;
28
29 column postalCode =>
30 label is _('Poštanski broj'),
31 hint is 'HR-10000';
32
33 column street =>
34 label is _('Ulica i kućni broj');
35
36 column hrEduOrgUniqueNumber =>
37 label is _('hrEduOrgUniqueNumber'),
38 is indexed,
39 is mandatory;
40
41 column telephoneNumber =>
42 label is _('Broj telefona');
43
44 column facsimileTelephoneNumber =>
45 label is _('fax number');
46
47 column cn =>
48 label is _('cn'),
49 is indexed;
50
51 column dc =>
52 label is _('dc'),
53 is indexed;
54
55 column uidNumber =>
56 type is 'int',
57 label is _('uid number');
58
59 column gidNumber =>
60 type is 'int',
61 label is _('gid number');
62
63 column homeDirectory =>
64 label is _('home directory');
65
66 column 'loginShell';
67
68 column 'hrEduOrgMail';
69
70 column 'hrEduOrgType';
71
72 column 'hrEduOrgURL';
73
74 column 'hrEduOrgPolicyURI';
75
76 column 'hrEduOrgMobile';
77
78 column 'hrEduOrgMember';
79
80 };
81
82 # Your model-specific methods go here.
83
84 =head2 name
85
86 Humanly readable name of organization
87
88 =cut
89
90 sub name {
91 my $self = shift;
92 return $self->__value('cn') . ' | ' . $self->__value('o');
93 }
94
95 use A3C::DefaultACL;
96
97 1;
98

  ViewVC Help
Powered by ViewVC 1.1.26