Backport
[platal.git] / templates / vcard.tpl
CommitLineData
0337d704 1{**************************************************************************}
2{* *}
50a40a33 3{* Copyright (C) 2003-2006 Polytechnique.org *}
0337d704 4{* http://opensource.polytechnique.org/ *}
5{* *}
6{* This program is free software; you can redistribute it and/or modify *}
7{* it under the terms of the GNU General Public License as published by *}
8{* the Free Software Foundation; either version 2 of the License, or *}
9{* (at your option) any later version. *}
10{* *}
11{* This program is distributed in the hope that it will be useful, *}
12{* but WITHOUT ANY WARRANTY; without even the implied warranty of *}
13{* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *}
14{* GNU General Public License for more details. *}
15{* *}
16{* You should have received a copy of the GNU General Public License *}
17{* along with this program; if not, write to the Free Software *}
18{* Foundation, Inc., *}
19{* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *}
20{* *}
21{**************************************************************************}
22BEGIN:VCARD
23VERSION:3.0
24{if $vcard.nom_usage}
25FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.nom_usage` (`$vcard.nom`)"|qp_enc}
26{else}
27FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.nom`"|qp_enc}
28{/if}
29N;ENCODING=QUOTED-PRINTABLE:{$vcard.nom|qp_enc};{$vcard.prenom|qp_enc};{$vcard.nom_usage|qp_enc};;
d865c4a0 30{if $vcard.nickname}
31NICKNAME;ENCODING=QUOTED-PRINTABLE:{$vcard.nickname}
32{/if}
7d73bb7b 33EMAIL;TYPE=internet:{$vcard.bestalias}@{#globals.mail.domain#}
0337d704 34{if $vcard.bestalias neq $vcard.forlife}
7d73bb7b 35EMAIL;TYPE=internet:{$vcard.forlife}@{#globals.mail.domain#}
0337d704 36{/if}
37{if $vcard.virtualalias}
38EMAIL;TYPE=internet:{$vcard.virtualalias}
39{/if}
40{if $vcard.mobile}
41TEL;TYPE=cell;ENCODING=QUOTED-PRINTABLE:{$vcard.mobile|qp_enc}
42{/if}
43{if $vcard.adr_pro}
44{if $vcard.adr_pro[0].entreprise}
45ORG;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].entreprise|qp_enc}
46{/if}
47{if $vcard.adr_pro[0].poste}
48TITLE;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].poste|qp_enc}
49{/if}
50{if $vcard.adr_pro[0].fonction}
51ROLE;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].fonction|qp_enc}
52{/if}
53{if $vcard.adr_pro[0].tel}
54TEL;TYPE=work;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].tel|qp_enc}
55{/if}
56{if $vcard.adr_pro[0].fax}
57FAX;TYPE=work;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].fax|qp_enc}
58{/if}
59ADR;TYPE=work;ENCODING=QUOTED-PRINTABLE:{format_adr adr=$vcard.adr_pro[0]}
60{/if}
61{foreach item=adr from=$vcard.adr}
62ADR;TYPE=home{if $adr.courier},postal{/if};ENCODING=QUOTED-PRINTABLE:{format_adr adr=$adr}
79a5acea 63{foreach item=tel from=$adr.tels}
64{if $tel.tel}
65{if $tel.tel_type neq 'Fax'}TEL{else}FAX{/if};TYPE=home;ENCODING=QUOTED-PRINTABLE:{$tel.tel|qp_enc}
0337d704 66{/if}
67{/foreach}
79a5acea 68{/foreach}
0337d704 69{if $vcard.web}
70URL;ENCODING=QUOTED-PRINTABLE:{$vcard.web|qp_enc}
71{/if}
d865c4a0 72{if strlen(trim($vcard.freetext)) == 0}
a77a3269 73NOTE;ENCODING=QUOTED-PRINTABLE:{"(X`$vcard.promo`)"|qp_enc}
74{else}
d865c4a0 75NOTE;ENCODING=QUOTED-PRINTABLE:{"(X`$vcard.promo`)\n`$vcard.freetext`"|qp_enc}
a77a3269 76{/if}
937e3c82 77{if $vcard.photo}
78PHOTO;BASE64:{$vcard.photo|base64_encode}
79{/if}
0337d704 80SORT-STRING;ENCODING=QUOTED-PRINTABLE:{$vcard.nom|qp_enc}
81REV:{$vcard.date|date_format:"%Y%m%dT000000Z"}
82END:VCARD
83{* vim:set et sw=2 sts=2 sws=2: *}