1 # Copyright 2014 - 2016 Paul Hänsch
3 # This file is part of Confetti.
5 # Confetti is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # Confetti is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU Affero General Public License for more details.
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Confetti. If not, see <http://www.gnu.org/licenses/>.
19 <div class="section basic">
20 <h2 class="item FN">$values[FN]</h2>
21 ${values[GENDER]:+<span class="item GENDER">$(l10n $values[GENDER])</span>}
23 $(for n in NICKNAME NICKNAME{0..10}; do
24 echo "${values[$n]:+<span class="item NICKNAME">aka. $values[$n]</span>}"
27 ${values[BDAY]:+<span class="item BDAY"><b>*:</b> $values[BDAY]</span>}
28 ${values[X-ZACK-JOINDATE]:+<span class="item X-ZACK-JOINDATE"><b>$(l10n label_join):</b> $values[X-ZACK-JOINDATE]</span>}
29 ${values[X-ZACK-LEAVEDATE]:+<span class="item X-ZACK-LEAVEDATE"><b>$(l10n label_leave):</b> $values[X-ZACK-LEAVEDATE]</span>}
30 ${values[SOUND]:+<audio controls="controls" class="item SOUND"><source type="audio/ogg" src="data:audio/ogg;base64,$values[SOUND]" /></audio>}
31 ${values[PHOTO]:+<img class="item PHOTO" src="data:image/$tags[PHOTO_TYPE];base64,$values[PHOTO]" />}
32 ${values[LOGO]:+<img class="item LOGO" src="data:image/$tags[LOGO_TYPE];base64,$values[LOGO]" />}
35 --><div class="section address">
37 $(for n in ADR ADR{0..10}; do
38 echo "${values[$n]:+<span class="item ADR">$values[$n]</span>}"
40 ${values[URL]:+<h3>$(l10n URL)</h3>}
41 $(for n in URL URL{0..10}; do
42 echo "${values[$n]:+<span class="item URL"><a href="$values[$n]">$values[$n]</a></span>}"
46 --><div class="section phone">
48 $(for n in TEL TEL{0..10}; do
49 echo "${values[$n]:+<span class="item TEL">$tags[${n}_TYPE] $values[$n]</span>}"
51 ${values[EMAIL]:+<h3>$(l10n EMAIL)</h3>}
52 $(for n in EMAIL EMAIL{0..10}; do
53 echo "${values[$n]:+<span class="item EMAIL"><a href="mailto:$values[$n]">$values[$n]</a></span>}"
55 ${values[IMPP]:+<h3>$(l10n IMPP)</h3>}
56 $(for n in IMPP IMPP{0..10}; do
57 echo "${values[$n]:+<span class="item IMPP">$tags[${n}_TYPE] <a href="$values[$n]">$values[$n]</a></span>}"
61 --><div class="section insurance">
62 <h3>$(l10n X-HEALTH-INSURANCE)</h3>
65 --><div class="section note">
66 ${values[NOTE]:+<h3>$(l10n NOTE)</h3>}
67 $(for n in NOTE NOTE{0..10}; do
68 echo "${values[$n]:+<span class="item NOTE">$values[$n]</span>}"
70 ${values[X-CLIENT-REFERRAL]:+<h3>$(l10n X-CLIENT-REFERRAL)</h3>}
71 $(for n in X-CLIENT-REFERRAL X-CLIENT-REFERRAL{0..10}; do
72 echo "${values[$n]:+<span class="item X-CLIENT-REFERRAL">$values[$n]</span>}"
76 --><div class="section prescriptions">
77 <h3>$(l10n prescriptions)</h3>
79 $(sed -rn 's:(.*)\t'$id'$:\1:p' "$_DATA/mappings/attendance" |while read each; do
80 cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")"
81 echo ' <li><a class="item attendance" href="?p=courses#'$each'">'$cname'</a></li>'