X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fview_attendee.sh;h=bdfdc6a621ebe2fe5ebfb0335f072d353d5c3352;hp=0bc29f7d4cac3e8e77b55c7bb306275bc37329c6;hb=33a8e0e8967077bb2aa63b4bea706dc61d3e42d8;hpb=10dc80cb808b22e1ffe613b3a6b5ec82691b08dc diff --git a/templates/view_attendee.sh b/templates/view_attendee.sh index 0bc29f7..bdfdc6a 100755 --- a/templates/view_attendee.sh +++ b/templates/view_attendee.sh @@ -15,10 +15,15 @@ # You should have received a copy of the GNU Affero General Public License # along with Confetti. If not, see . +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]}}}" + cat <
-

$values[FN]

+

$fullname

${values[GENDER]:+$(l10n $values[GENDER])} $(for n in NICKNAME NICKNAME{0..10}; do @@ -77,11 +82,5 @@ cat <'$cname'' done) -
- END_HTML