X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=cards%2Flist.sh;h=4e40072a9b396889196794ce044801358891a835;hp=6c0f18b229961a4ecff5dee7aab91ecb3e52b12b;hb=203fc5d63ba59a30688bac00c98d199cb08a8f30;hpb=11e258b8e6cf832c96b20648aa8c9ca0288c597f diff --git a/cards/list.sh b/cards/list.sh index 6c0f18b..4e40072 100755 --- a/cards/list.sh +++ b/cards/list.sh @@ -40,8 +40,8 @@ edit_card(){ "${course##*/}" \ "$(grep -qF "${course##*/} ${cardfile##*/}" "$_DATA/mappings/attendance" \ && printf 'checked="checked"' - )" \ - "$(pdi_value "$(pdi_load "$course")" SUMMARY |unescape |HTML)" + )" \ + "$(pdi_value "$(pdi_load "$course")" SUMMARY || l10n "(unnamed course)" |unescape |HTML)" done) [h3 $(l10n CATEGORIES) ] $( grep -xE '[^ ]+' "$_DATA"/mappings/categories |while read -r cat; do @@ -78,24 +78,24 @@ print_card(){ local card="$(pdi_load "$cardfile")" cat <<-EOF [div .card #${cardfile##*/} - [div .section .basic ­$( + [div .section .basic . $( card_item "$card" FN GENDER NICKNAME BDAY X-ZACK-JOINDATE X-ZACK-LEAVEDATE SOUND PHOTO LOGO )] - [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 .note ­$(card_item "$card" NOTE)] - [div .section .attendance [h3 $(l10n course_attendance) ] [ul ­ + [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 .note . $(card_item "$card" NOTE)] + [div .section .attendance [h3 $(l10n course_attendance) ] [ul $(grep -F " ${cardfile##*/}" "$_DATA/mappings/attendance" |while read each discard; do - printf '[li [a .item .attendance href="/courses#%s" ­%s]]' \ + printf '[li [a .item .attendance href="/courses#%s" . %s]]' \ "$each" \ - "$(pdi_value "$(pdi_load "$_DATA/ical/$each")" SUMMARY |unescape |HTML)" + "$(pdi_value "$(pdi_load "$_DATA/ical/$each")" SUMMARY || l10n "(unnamed course)" |unescape |HTML)" done)] $(card_item "$card" CATEGORIES) ] [div .control [a .item href="/cards/edit_card.sh?card=${cardfile##*/}" $(l10n edit)] - [a .item href="/cards/?x=${cardfile##*/}" $(l10n vcf_export)] + [a .item href="/cards/export_card.sh?card=${cardfile##*/}" $(l10n vcf_export)] ] ] EOF