]> git.plutz.net Git - confetti/blob - templates/courses.html.sh
stylebug, make "+"-field appear next to newfield button in edit attendee
[confetti] / templates / courses.html.sh
1 # Copyright 2014 Paul Hänsch
2 #
3 # This file is part of Confetti.
4
5 # Confetti is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU Affero General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9
10 # Confetti is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU Affero General Public License for more details.
14
15 # You should have received a copy of the GNU Affero General Public License
16 # along with Confetti.  If not, see <http://www.gnu.org/licenses/>. 
17
18 edit="$_GET[\"edit\"]"
19
20 check_order(){
21   [ "$_GET[\"order\"]" = "$1" ] && echo 'checked="checked"'
22 }
23
24 cat <<EOF
25 <div class="sort">
26   <form class="search" action="/" method="GET">
27     <input type="hidden" name="page" value="courses"/>
28     <input type="hidden" name="edit" value="$edit"/>
29     <span class="label">$(l10n sort_order):</span>
30     <input type="radio" name="order" value="DOW" $(check_order DOW)>$(l10n order_DOW)</input>
31     <input type="radio" name="order" value="TOD" $(check_order TOD)>$(l10n order_TOD)</input>
32     <br>
33     <button type="submit" name="" value="">$(l10n order_apply)</button>
34   </form>
35 </div>
36
37 <div class="newcourse">
38   <form action="?action=new_course" method="POST">
39     <button type="submit">$(l10n newcourse)</button>
40   </form>
41 </div>
42
43 <div class="courselist">
44 $(
45 [ -f "ical/$edit" -o -f "temp/$edit" ] && edit_course "$edit"
46 if [ "$?" = 0 ]; then
47   listcourses |grep -v "$edit"
48 else
49   listcourses
50 fi |while read card; do
51   view_course "$card"
52 done
53 )
54 </div>
55 EOF
56
57 # vi:set filetype=html: