]> git.plutz.net Git - confetti/blob - cards/index.cgi
omit listing of empty courses and vcards
[confetti] / cards / index.cgi
1 #!/bin/sh
2
3 . $_EXEC/pdiread.sh
4 . $_EXEC/cards/l10n.sh
5 . $_EXEC/cards/widgets.sh
6 . $_EXEC/cards/list.sh
7
8 upcase=' y;abcdefghijklmnopqrstuvwxyzäöüé;ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜÉ;; '
9
10 filter="$(GET f)"
11 order="$(GET o)"
12 edit="$(GET e |PATH)"
13
14 [ "$order" ] || order=firstname
15 edit="${edit##*/}"
16
17 { w_filter_diag
18   printf '
19   [form class="newcard" action="%s/cards/new_card.sh" method="POST"
20     [button type="submit" %s]
21     [input name="seed" placeholder="%s"]
22   ]' "${_BASE}" "$(l10n newcard)" "$(l10n vcf_seed_label)"
23   [ "$edit" ] && edit_card "$edit"
24   list_cards
25 } | yield_page cards #/cards/cards.css