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

Diff of /lib/A3C/Model/Person.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 70 by dpavlin, Thu Apr 10 20:26:45 2008 UTC revision 121 by dpavlin, Thu May 15 19:18:45 2008 UTC
# Line 1  Line 1 
1  use strict;  use strict;
2  use warnings;  use warnings;
3    
4    =head1 WARNING
5    
6    B<This code is obsolete> since application is using L<A3C::Model::hrEduPerson>
7    
8    =cut
9    
10  package A3C::Model::Person;  package A3C::Model::Person;
11  use Jifty::DBI::Schema;  use Jifty::DBI::Schema;
12    
13    use A3C::AAIEduHr;
14    
15  use utf8;  use utf8;
16    
17  use A3C::Record schema {  use A3C::Record schema {
18    
19          column uid =>          column uid =>
20                  label is ('uid'),                  label is _('UID'),
21                  is indexed,                  is indexed,
22                  is mandatory,                  is mandatory,
23                  is distinct;                  is distinct;
24    
25          column hrEduPersonUniqueID =>          column hrEduPersonUniqueID =>
26                  label is ('hrEduPersonUniqueID'),                  label is _('hr Edu Person Unique ID'),
27                  is indexed,                  is indexed,
28                  is distinct,                  is distinct,
29                  is mandatory;                  is mandatory;
# Line 36  use A3C::Record schema { Line 44  use A3C::Record schema {
44                  type is 'text',                  type is 'text',
45                  is mandatory,                  is mandatory,
46                  label is _('Email address'), default is '',                  label is _('Email address'), default is '',
47                    is indexed,
48                  is immutable,                  is immutable,
49                  is distinct;                  is distinct;
50    
# Line 73  use A3C::Record schema { Line 82  use A3C::Record schema {
82                  filters are 'Jifty::DBI::Filter::Date';                  filters are 'Jifty::DBI::Filter::Date';
83    
84          column hrEduPersonGender =>          column hrEduPersonGender =>
85                  label is _('Spol');                  label is _('Spol'),
86                    valid are [ { display => 'Nepoznato', value => 0 }, A3C::AAIEduHr->vocabulary('hrEdu002') ];
87    
88          column jpegPhoto =>          column jpegPhoto =>
89                  label is _('Slika');                  label is _('Slika');
# Line 95  use A3C::Record schema { Line 105  use A3C::Record schema {
105    
106          column hrEduPersonProfessionalStatus =>          column hrEduPersonProfessionalStatus =>
107                  label is _('Stručni status'),                  label is _('Stručni status'),
108                  valid are [                  valid are [ '', A3C::AAIEduHr->vocabulary('hrEdu001'), 'VŠS' ],
                         '',  
                         'NKV',  
                         'PKV',  
                         'KV',  
                         'VKV',  
                         'SSS',  
                         'VS',  
                         'VSS',  
                         'VŠS',  
                         'MR',  
                         'DR',  
                 ],  
109                  default is '';                  default is '';
110    
111          column hrEduPersonAcademicStatus =>          column hrEduPersonAcademicStatus =>
112                  label is _('Zvanje'),                  label is _('Zvanje'),
113                  valid are [                  valid are [ '', A3C::AAIEduHr->vocabulary('hrEdu002') ],
                         '',  
                         'knjižničar',  
                         'viši knjižničar',  
                         'korepetitor',  
                         'viši korepetitor',  
                         'lektor',  
                         'viši lektor',  
                         'stručni suradnik',  
                         'asistent visoke škole',  
                         'profesor visoke škole',  
                         'mlađi asistent',  
                         'znanstveni novak',  
                         'znanstveni asistent',  
                         'znanstveni suradnik',  
                         'predavač',  
                         'viši predavač',  
                         'asistent',  
                         'asistent - predavač',  
                         'viši asistent',  
                         'docent',  
                         'izvanredni profesor',  
                         'redoviti profesor',  
                         'znanstveni savjetnik',  
                         'viši znanstveni suradnik',  
                 ],  
114                  default is '';                  default is '';
115    
116          column hrEduPersonScienceArea =>          column hrEduPersonScienceArea =>
117                  label is _('Područje znanosti'),                  label is _('Područje znanosti'),
118                  valid are [                  valid are [ '', A3C::AAIEduHr->vocabulary('hrEdu007') ],
                         '',  
                         'Tehničke znanosti',  
                         'Prirodne znanosti',  
                         'Humanističke znanosti',  
                         'Društvene znanosti',  
                         'Biotehničke znanosti',  
                         'Biomedicina i zdravstvo',  
                 ],  
119                  default is '';                  default is '';
120    
121          column 'o';          column 'o' =>
122                    is indexed;
123    
124          column 'l';          column 'l';
125          column 'postalAddress';          column 'postalAddress';
126            column 'postalCode';
127            column 'street';
128    
129  #       column organization =>  #       column organization =>
130  #               refers_to A3C::Model::Organization by 'id',  #               refers_to A3C::Model::Organization by 'id',
# Line 164  use A3C::Record schema { Line 133  use A3C::Record schema {
133          column hrEduPersonAffiliation =>          column hrEduPersonAffiliation =>
134                  label is _('Povezanost s ustanovom'),                  label is _('Povezanost s ustanovom'),
135                  is mandatory,                  is mandatory,
136                  valid are [                  valid are A3C::AAIEduHr->vocabulary('hrEdu004'),
                         'učenik',  
                         'student',  
                         'djelatnik',  
                         'vanjski suradnik',  
                         'korisnik usluge',  
                         'gost',  
                 ],  
137                  default is 'korisnik usluge';                  default is 'korisnik usluge';
138    
139          column hrEduPersonPrimaryAffiliation =>          column hrEduPersonPrimaryAffiliation =>
140                  label is _('Temeljna povezanost s ustanovom');                  label is _('Temeljna povezanost s ustanovom');
141                  is mandatory,                  is mandatory,
142                  valid are [                  valid are A3C::AAIEduHr->vocabulary('hrEdu004'),
                         'učenik',  
                         'student',  
                         'djelatnik',  
                         'vanjski suradnik',  
                         'korisnik usluge',  
                         'gost',  
                 ],  
143                  default is 'korisnik usluge';                  default is 'korisnik usluge';
144    
145          column hrEduPersonStudentCategory =>          column hrEduPersonStudentCategory =>
146                  label is 'Vrsta studenta',                  label is 'Vrsta studenta',
147                  valid are [                  valid are [
148                          '',                          '',
149                          'osnovnoškolac',                          A3C::AAIEduHr->vocabulary('hrEdu010'),
                         'srednjoškolac',  
                         'student stručnog studija',  
                         'preddiplomac',  
                         'postdiplomac',  
                         'dodiplomac',  
                         'pauzira godinu',  
                         'prekid studija',  
150                  ],                  ],
151                  default is '';                  default is '';
152    
# Line 211  use A3C::Record schema { Line 159  use A3C::Record schema {
159    
160          column hrEduPersonTitle =>          column hrEduPersonTitle =>
161                  label is 'Položaj u ustanovi',                  label is 'Položaj u ustanovi',
162                  valid are [     # FIXME reorder                  valid are [ '', A3C::AAIEduHr->vocabulary('hrEdu003') ],
                         '',  
                         'dekan',  
                         'direktor',  
                         'pomoćnik ravnatelja',  
                         'predstojnik zavoda',  
                         'pročelnik katedre',  
                         'pročelnik odsjeka',  
                         'pročelnik sveučilišnog odjela',  
                         'prodekan',  
                         'prorektor',  
                         'ravnatelj',  
                         'rektor',  
                         'voditelj laboratorija',  
                         'voditelj odjela',  
                         'voditelj organizacijske jedini',  
                         'voditelj projekta',  
                         'zamjenik pročelnika sveučilišn',  
                         'zamjenik ravnatelja',  
                 ],  
163                  default is '';                  default is '';
164    
165          column hrEduPersonRole =>          column hrEduPersonRole =>
166                  label is 'Uloga u ustanovi',                  label is 'Uloga u ustanovi',
167                  valid are [                  valid are [
168                          '',                          '',
169                          'administrator imenika',                          A3C::AAIEduHr->vocabulary('hrEdu006'),
                         'CARNet koordinator',  
                         'CARNet sistem inženjer',  
                         'ICT koordinator',  
                         'ISVU koordinator',  
                         'kontakt za sigurnosna pitanja',  
                         'MS koordinator',  
170                          'MATICA operater',                          'MATICA operater',
171                          'MATICA urednik',                          'MATICA urednik',
172                  ],                  ],
# Line 251  use A3C::Record schema { Line 174  use A3C::Record schema {
174    
175          column hrEduPersonStaffCategory =>          column hrEduPersonStaffCategory =>
176                  label is 'Vrsta posla u ustanovi',                  label is 'Vrsta posla u ustanovi',
177                  valid are [                  valid are [ '', A3C::AAIEduHr->vocabulary('hrEdu005') ];
                         'administrativno osoblje',  
                         'ICT podrška',  
                         'istraživači',  
                         'nastavno osoblje',  
                         'osoblje knjižnice',  
                         'tehničko osoblje',  
                 ];  
178    
179          column hrEduPersonGroupMember =>          column hrEduPersonGroupMember =>
180                  label is 'Pripadnost grupi',                  label is 'Pripadnost grupi',
# Line 333  Accessor for compatibility with Jifty mi Line 249  Accessor for compatibility with Jifty mi
249    
250  sub email {  sub email {
251          my $self = shift;          my $self = shift;
252          return $self->__value('mail');          return $self->mail;
253  }  }
254    
255  sub email_confirmed { 1 };  sub email_confirmed { 1 };
# Line 344  sub email_confirmed { 1 }; Line 260  sub email_confirmed { 1 };
260    
261  sub name {  sub name {
262          my $self = shift;          my $self = shift;
263          return $self->__value('cn') . ' <' . $self->__value('mail') . '>';          return $self->cn . ' <' . $self->mail . '>';
264  }  }
265    
266  =head2 validate_telephoneNumber  =head2 validate_telephoneNumber

Legend:
Removed from v.70  
changed lines
  Added in v.121

  ViewVC Help
Powered by ViewVC 1.1.26