refactoring card display
[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
16 filter="$(GET filter)"
17 order="$(GET order)"
18
19 printf 'Content-Type: text/html; charset=utf-8\r\n\r\n'
20
21 $_EXEC/cgilite/html-sh.sed <<EOF
22 [!DOCTYPE HTML]
23 [html [head
24   [title Cards]
25   [link rel="stylesheet" type="text/css" href="/style.css"]
26   [link rel="stylesheet" type="text/css" href="/cards/cards.css"]
27 ][body
28   $(W_NAVIGATION)
29   $(w_filter_diag)
30
31   [form class="newcard" action="?action=new_card" method="POST"
32     [button type="submit" $(l10n newcard)]
33   ]
34
35 ]]
36 EOF