X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;f=templates%2Fview_attendee.sh;h=bdfdc6a621ebe2fe5ebfb0335f072d353d5c3352;hb=ef6fdf91d47347a43164ae8edfcc0dce6329af3f;hp=8a0f2d53b6aae0170ef544de02c6fdcadc8367b1;hpb=794a134935cb59c5bd014026f1bed4a08a5645c9;p=lobster
diff --git a/templates/view_attendee.sh b/templates/view_attendee.sh
index 8a0f2d5..bdfdc6a 100755
--- a/templates/view_attendee.sh
+++ b/templates/view_attendee.sh
@@ -1,93 +1,86 @@
-declare -A item_name
+# Copyright 2014, 2015 Paul Hänsch
+#
+# This file is part of Confetti.
+#
+# Confetti is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# Confetti is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with Confetti. If not, see .
-item_name[PHOTO]="Foto"
-item_name[LOGO]="Logo"
-item_name[FN]="Voller Name"
-item_name[SOUND]="Aussprache"
-item_name[GENDER]="Geschlecht"
-item_name[KIND]="Typ"
-item_name[TITLE]="Beruf"
-item_name[ROLE]="Position"
-item_name[ORG]="Organisation"
-item_name[MEMBER]="Mitglied"
-item_name[CATEGORIES]="Kategorien"
-item_name[ANNIVERSARY]="Jubiläum"
-item_name[BDAY]="Geburtstag"
-item_name[EMAIL]="E-Mail"
-item_name[TEL]="Telefon"
-item_name[IMPP]="Chat"
-item_name[ADR]="Anschrift"
-item_name[URL]="Webseite"
-item_name[LANG]="Sprache"
-item_name[NOTE]="Notiz"
+n=$(printf %s "$values[N]" \
+ | sed -rn 's:^([^;]*)(\;[^;]*)(\;[^;]*)?(\;[^;]*)?(\;[^;]*)?$:\4 \2 \3 \1 \5:gp' \
+ | sed -r 's:,: :;s:\;: :g;s: +: :g;s:^ $::;'
+ )
+fullname="${n:-${values[FN]:-${values[NICKNAME]}}}"
-item_name[RELATED]="Kontakte"
+cat <
+