]> git.plutz.net Git - confetti/blob - cards/main.cgi
reimplemented card listing
[confetti] / cards / main.cgi
1 #!/bin/sh
2
3 if [ "$ITEM" = "cards/cards.css" ]; then
4   . $_EXEC/cgilite/file.sh
5   FILE $_EXEC/cards/cards.css
6   return 0
7 elif [ "$(GET action)" = filter_card ]; then
8   . $_EXEC/cards/filter_card.sh
9   exit 0
10 fi
11
12 . $_EXEC/pdiread.sh
13 . $_EXEC/cards/l10n.sh
14 . $_EXEC/cards/widgets.sh
15 . $_EXEC/cards/list.sh
16
17 filter="$(GET filter)"
18 order="$(GET order)"
19
20 printf 'Content-Type: text/html; charset=utf-8\r\n\r\n'
21
22 { cat <<EOF
23 [!DOCTYPE XHTML]
24 [html [head
25   [title Cards]
26   [link rel="stylesheet" type="text/css" href="/style.css"]
27   [link rel="stylesheet" type="text/css" href="/cards/cards.css"]
28 ][body
29   $(W_NAVIGATION)
30   $(w_filter_diag)
31
32   [form class="newcard" action="?action=new_card" method="POST"
33     [button type="submit" $(l10n newcard)]
34   ]
35 EOF
36 list_cards
37 printf ']]'
38
39 } | "$_EXEC/cgilite/html-sh.sed"
40 $_EXEC/cgilite/html-sh.sed <<EOF