X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=cards%2Flist.sh;h=2f2e767a9dad082aed283da405e01c1eda6bf8fb;hp=a7b8c13671dadc3d823d87368619a5ae9e08ec21;hb=HEAD;hpb=69b83ace4446bad3db994806448b3d81c9cb5809 diff --git a/cards/list.sh b/cards/list.sh index a7b8c13..e12d760 100755 --- a/cards/list.sh +++ b/cards/list.sh @@ -31,7 +31,10 @@ edit_card(){ [ $(pdi_count "$card" IMPP) -gt 0 ] && edit_item "$card" IMPP [ $(pdi_count "$card" URL ) -gt 0 ] && edit_item "$card" URL )] - [div .section .address $(edit_item "$card" ADR)] + [div .section .address $( + edit_item "$card" ADR + [ $(pdi_count "$card" X-IBAN) -gt 0 ] && edit_item "$card" X-IBAN + )] [div .section .note $(edit_item "$card" NOTE)] [div .section .attendance [h3 $(l10n course_attendance) ] [div .attendance $( @@ -65,7 +68,7 @@ edit_card(){ [div .item .newfield [select name="newfield" [option value="" disabled="disabled" selected="selected" $(l10n edit_addfieldtext)] - $(for f in NICKNAME EMAIL TEL IMPP ADR URL NOTE X-ZACK-LEAVEDATE; do + $(for f in NICKNAME EMAIL TEL IMPP ADR URL NOTE X-ZACK-LEAVEDATE X-IBAN; do printf '[option value="%s" %s] ' "$f" "$(l10n "$f")" done) ][button type="submit" name="action" value="addfield" $(l10n edit_addfield)] @@ -90,7 +93,7 @@ print_card(){ )] [div .section .phone . $(card_item "$card" TEL)] [div .section .message . $(card_item "$card" EMAIL IMPP URL)] - [div .section .address . $(card_item "$card" ADR)] + [div .section .address . $(card_item "$card" ADR X-IBAN)] [div .section .note . $(card_item "$card" NOTE)] [div .section .attendance [h3 $(l10n course_attendance) ] [ul $(grep -F " ${cardfile##*/}" "$_DATA/mappings/attendance" |while read each discard; do @@ -101,6 +104,7 @@ print_card(){ $(card_item "$card" CATEGORIES) ] [div .control + [a .button .item href="${_BASE}/ledgers/account.sh?card=${cardfile##*/}" $(l10n ledger)] [a .button .item href="${_BASE}/cards/edit_card.sh?card=${cardfile##*/}" $(l10n edit)] [a .button .item href="${_BASE}/cards/export_card.sh?card=${cardfile##*/}" $(l10n vcf_export)] ] @@ -113,11 +117,9 @@ print_cards(){ while read cardfile; do cachefile="${_DATA}/cache/${cardfile##*/}.cache" - # if [ -s "$cachefile" -a "$cachefile" -nt "$cardfile" \ - # -a "$cachefile" -nt "${_EXEC}/cards" ]; then if [ -s "$cachefile" -a "$cachefile" -nt "$cardfile" ]; then cat "$cachefile" - else + elif [ -s "$cardfile" ]; then print_card "$cardfile" |tee "$cachefile" fi done @@ -150,6 +152,7 @@ filter_attendance(){ filter_cards(){ local filter f fex='x;p;' + local upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; ' filter="$(printf %s "${filter}" \ | sed -E 's;[]\/\(\)\\\$\?\.\+\*\;\[\{\}];\\&;g;