]> git.evergreen-ils.org Git - working/NCIPServer.git/blob - templates/includes/UserOptionalFields.inc
560fcfb865d086a8e528d1a9472f2aef2bc674ea
[working/NCIPServer.git] / templates / includes / UserOptionalFields.inc
1 [% IF data.UserOptionalFields -%]
2 <ncip:UserOptionalFields>
3 [% IF data.UserOptionalFields.NameInformation -%]
4 <ncip:NameInformation>
5 <ncip:PersonalNameInformation>
6 <ncip:StructuredPersonalUserName>
7 [% IF data.UserOptionalFields.NameInformation.GivenName -%]
8 <ncip:GivenName>[% data.UserOptionalFields.NameInformation.GivenName | xml %]</ncip:GivenName>
9 [% END -%]
10 <ncip:Surname>[% data.UserOptionalFields.NameInformation.Surname | xml %]</ncip:Surname>
11 [% IF data.UserOptionalFields.NameInformation.Prefix -%]
12 <ncip:Prefix>[% data.UserOptionalFields.NameInformation.Prefix %]</ncip:Prefix>
13 [% END -%]
14 [% IF data.UserOptionalFields.NameInformation.Suffix -%]
15 <ncip:Suffix>[% data.UserOptionalFields.NameInformation.Suffix %]</ncip:Suffix>
16 [% END -%]
17 [% IF data.UserOptionalFields.NameInformation.Initials -%]
18 <ncip:Initials>[% data.UserOptionalFields.NameInformation.Initials %]</ncip:Initials>
19 [% END -%]
20 </ncip:StructuredPersonalUserName>
21 </ncip:PersonalNameInformation>
22 </ncip:NameInformation>
23 [% END -%]
24 [% IF data.UserOptionalFields.UserAddressInformation -%]
25 [% FOREACH element IN data.UserOptionalFields.UserAddressInformation -%]
26 <ncip:UserAddressInformation>
27 <ncip:UserAddressRoleType>[% element.UserAddressRoleType | xml %]</ncip:UserAddressRoleType>
28 [% IF element.PhysicalAddress -%]
29 <ncip:PhysicalAddress>
30 <ncip:StructuredAddress>
31 <ncip:Line1>[% element.PhysicalAddress.Line1 | xml %]</ncip:Line1>
32 [% IF element.PhysicalAddress.Line2 -%]
33 <ncip:Line2>[% element.PhysicalAddress.Line2 | xml %]</ncip:Line2>
34 [% END -%]
35 [% IF element.PhysicalAddress.Locality -%]
36 <ncip:Locality>[% element.PhysicalAddress.Locality | xml %]</ncip:Locality>
37 [% END -%]
38 [% IF element.PhysicalAddress.Region -%]
39 <ncip:Region>[% element.PhysicalAddress.Region | xml %]</ncip:Region>
40 [% END -%]
41 [% IF element.PhysicalAddress.Country -%]
42 <ncip:Country>[% element.PhysicalAddress.Country | xml %]</ncip:Country>
43 [% END -%]
44 [% IF element.PhysicalAddress.PostalCode -%]
45 <ncip:PostalCode>[% element.PhysicalAddress.PostalCode | xml %]</ncip:PostalCode>
46 [% END -%]
47 </ncip:StructuredAddress>
48 <ncip:PhysicalAddressType>Postal Address</ncip:PhysicalAddressType>
49 </ncip:PhysicalAddress>
50 [% ELSIF element.ElectronicAddress -%]
51 <ncip:ElectronicAddress>
52 <ncip:ElectronicAddressType>[% element.ElectronicAddress.Type | xml %]</ncip:ElectronicAddressType>
53 <ncip:ElectronicAddressData>[% element.ElectronicAddress.Data | xml %]</ncip:ElectronicAddressData>
54 </ncip:ElectronicAddress>
55 [% END -%]
56 </ncip:UserAddressInformation>
57 [% END -%]
58 [% END -%]
59 [% IF data.UserOptionalFields.UserPrivilege -%]
60 [% FOREACH privilege IN data.UserOptionalFields.UserPrivilege -%]
61 <ncip:UserPrivilege>
62 <ncip:AgencyId>[% privilege.AgencyId | xml -%]</ncip:AgencyId>
63 <ncip:AgencyUserPrivilegeType>[% privilege.AgencyUserPrivilegeType | xml %]</ncip:AgencyUserPrivilegeType>
64 [% IF privilege.ValidFromDate -%]
65 <ncip:ValidFromDate>[% privilege.ValidFromDate | xml %]</ncip:ValidFromDate>
66 [% END -%]
67 [% IF privilege.ValidToDate -%]
68 <ncip:ValidToDate>[% privilege.ValidToDate | xml %]</ncip:ValidToDate>
69 [% END -%]
70 [% IF privilege.UserPrivilegeDescription -%]
71 <ncip:UserPrivilegeDescription>[% privilege.UserPrivilegeDescription | xml %]</ncip:UserPrivilegeDescription>
72 [% END -%]
73 [% IF privilege.UserPrivilegeStatus -%]
74 <ncip:UserPrivilegeStatus>
75 <ncip:UserPrivilegeStatusType>
76 [% privilege.UserPrivilegeStatus.UserPrivilegeStatusType | xml %]
77 </ncip:UserPrivilegeStatusType>
78 [% IF privilege.UserPrivilegeStatus.DateOfUserPrivilegeStatus -%]
79 <ncip:DateOfUserPrivilegeStatus>
80 [% privilege.UserPrivilegeStatus.DateOfUserPrivilegeStatus | xml %]
81 </ncip:DateOfUserPrivilegeStatus>
82 [% END -%]
83 </ncip:UserPrivilegeStatus>
84 [% END -%]
85 </ncip:UserPrivilege>
86 [% END -%]
87 [% END -%]
88 [% IF data.UserOptionalFields.UserLanguage -%]
89 [% FOREACH language IN data.UserOptionalFields.UserLanguage -%]
90 <ncip:UserLanguage>[% language | xml %]</ncip:UserLanguage>
91 [% END -%]
92 [% END -%]
93 [% IF data.UserOptionalFields.BlockOrTrap -%]
94 [% FOREACH block IN data.UserOptionalFields.BlockOrTrap -%]
95 <ncip:BlockOrTrap>
96 <ncip:AgencyId>[% block.AgencyId | xml %]</ncip:AgencyId>
97 <ncip:BlockOrTrapType>[% block.BlockOrTrapType | xml %]</ncip:BlockOrTrapType>
98 [% IF block.ValidFromDate -%]
99 <ncip:ValidFromDate>[% block.ValidFromDate %]</ncip:ValidFromDate>
100 [% END -%]
101 [% IF block.ValidToDate -%]
102 <ncip:ValidToDate>[% block.ValidToDate %]</ncip:ValidToDate>
103 [% END %]
104 </ncip:BlockOrTrap>
105 [% END -%]
106 [% END -%]
107 </ncip:UserOptionalFields>
108 [% END -%]