removed debug marks
[confetti] / templates / attendees.html.sh
1 . ${_EXEC}/templates/text_attendee.sh
2 . ${_EXEC}/templates/view_attendee.sh
3 . ${_EXEC}/templates/edit_attendee.sh
4
5 check(){
6   [ "$_GET[\"filtertype\"]" = "$1" ] && echo 'checked="checked"'
7 }
8
9 cat <<EOF
10 <div class="filter">
11 <form action="/" method="GET">
12   <div class="search">
13     <span class="label">Filter:</span>
14     <input type="hidden" name="page" value="attendees"/>
15     <input type="text" name="filter" value="$_GET["filter"]"/><br/>
16     <input type="radio" name="filtertype" value="any" $(check any)>$(l10n filter_all)</input>
17     <input type="radio" name="filtertype" value="name" $(check name)>$(l10n filter_name)</input>
18     <input type="radio" name="filtertype" value="street" $(check street)>$(l10n filter_street)</input>
19     <input type="radio" name="filtertype" value="zip" $(check zip)>$(l10n filter_zip)</input>
20     <input type="radio" name="filtertype" value="telephone" $(check telephone)>$(l10n filter_phone)</input>
21     <input type="radio" name="filtertype" value="birth" $(check birth)>$(l10n filter_birthyear)</input>
22     <input type="radio" name="filtertype" value="course" $(check course)>$(l10n filter_course)</input><br/>
23     <button type="submit" name="action" value="new_filter">$(l10n filter_apply)</button>
24     <button type="submit" name="action" value="del_filter">$(l10n filter_cancel)</button>
25   </div>
26 </form>
27 </div>
28
29 <div class="newcard">
30 <h2>Neuer Eintrag</h2>
31 <form action="actions/newcard.cgi" method="POST">
32   <span class="label">Name:</span>
33   <input type="text" name="name"/>
34   <button type="submit">Anlegen</button>
35 </form>
36 </div>
37
38 <div class="cardlist">
39 $(listcards |while read card; do
40   id="$(basename "$card")"
41   if [ "$_GET[\"edit\"]" = "$id" ]; then cat <<x_EOF
42   <div id="${id}" class="card">
43     <form action="/?action=update_attendee" method="POST">
44       <input type="hidden" name="card" value="${id}"/>
45       $(edit_attendee "$id")
46       <br /><select name="newfield">
47         <option value="" disabled="disabled" selected="selected">$(l10n edit_addfieldtext)</option>
48         $(for f in $VCF_FIELDS; do echo "<option value=\"$f\">$(l10n $f)</option>"; done)
49       </select>
50       <button type="submit" name="action" value="addfield">$(l10n edit_addfield)</button>
51       <br /><button type="submit" name="action" value="update">$(l10n edit_update)</button>
52       <br /><button type="submit" name="action" value="cancel">$(l10n edit_cancel)</button>
53     </form>
54   </div>
55 x_EOF
56   else cat <<x_EOF
57   <div id="${id}" class="card">
58     <p class="control"><a href="?page=attendees&edit=${id}#${id}">$(l10n edit)</a></p>
59     $(view_attendee "$id")
60   </div>
61 x_EOF
62   fi
63 done)
64 </div>
65
66 EOF
67
68 # vi:set filetype=html: