fixes
[platal.git] / templates / vcard.tpl
1 {**************************************************************************}
2 {*                                                                        *}
3 {*  Copyright (C) 2003-2006 Polytechnique.org                             *}
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 {**************************************************************************}
22 BEGIN:VCARD
23 VERSION:3.0
24 {if $vcard.nom_usage}
25 FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.nom_usage` (`$vcard.nom`)"|qp_enc}
26 {else}
27 FN;ENCODING=QUOTED-PRINTABLE:{"`$vcard.prenom` `$vcard.nom`"|qp_enc}
28 {/if}
29 N;ENCODING=QUOTED-PRINTABLE:{$vcard.nom|qp_enc};{$vcard.prenom|qp_enc};{$vcard.nom_usage|qp_enc};;
30 EMAIL;TYPE=internet:{$vcard.bestalias}@polytechnique.org
31 {if $vcard.bestalias neq $vcard.forlife}
32 EMAIL;TYPE=internet:{$vcard.forlife}@polytechnique.org
33 {/if}
34 {if $vcard.virtualalias}
35 EMAIL;TYPE=internet:{$vcard.virtualalias}
36 {/if}
37 {if $vcard.mobile}
38 TEL;TYPE=cell;ENCODING=QUOTED-PRINTABLE:{$vcard.mobile|qp_enc}
39 {/if}
40 {if $vcard.adr_pro}
41 {if $vcard.adr_pro[0].entreprise}
42 ORG;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].entreprise|qp_enc}
43 {/if}
44 {if $vcard.adr_pro[0].poste}
45 TITLE;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].poste|qp_enc}
46 {/if}
47 {if $vcard.adr_pro[0].fonction}
48 ROLE;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].fonction|qp_enc}
49 {/if}
50 {if $vcard.adr_pro[0].tel}
51 TEL;TYPE=work;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].tel|qp_enc}
52 {/if}
53 {if $vcard.adr_pro[0].fax}
54 FAX;TYPE=work;ENCODING=QUOTED-PRINTABLE:{$vcard.adr_pro[0].fax|qp_enc}
55 {/if}
56 ADR;TYPE=work;ENCODING=QUOTED-PRINTABLE:{format_adr adr=$vcard.adr_pro[0]}
57 {/if}
58 {foreach item=adr from=$vcard.adr}
59 ADR;TYPE=home{if $adr.courier},postal{/if};ENCODING=QUOTED-PRINTABLE:{format_adr adr=$adr}
60 {foreach item=tel from=$adr.tels}
61 {if $tel.tel}
62 {if $tel.tel_type neq 'Fax'}TEL{else}FAX{/if};TYPE=home;ENCODING=QUOTED-PRINTABLE:{$tel.tel|qp_enc}
63 {/if}
64 {/foreach}
65 {/foreach}
66 {if $vcard.web}
67 URL;ENCODING=QUOTED-PRINTABLE:{$vcard.web|qp_enc}
68 {/if}
69 NOTE;ENCODING=QUOTED-PRINTABLE:{"(X`$vcard.promo`)\n`$vcard.libre`"|qp_enc}
70 SORT-STRING;ENCODING=QUOTED-PRINTABLE:{$vcard.nom|qp_enc}
71 REV:{$vcard.date|date_format:"%Y%m%dT000000Z"}
72 END:VCARD
73 {* vim:set et sw=2 sts=2 sws=2: *}