]> git.plutz.net Git - confetti/blobdiff - courses/list.sh
stubs for course lists
[confetti] / courses / list.sh
index a0eb6d16ef61318c8e45ee114964d1ef0a0e0d65..aeafc8b4d96ec0292f28b73c0d469b4e41abafab 100755 (executable)
@@ -3,21 +3,21 @@
 . "${_EXEC}"/pdiread.sh
 
 edit_card(){
-  local cardfile="$_DATA/vcard/$1" 
-  local tempfile card
+  local coursefile="$_DATA/courses/$1" 
+  local tempfile course
 
   . $_EXEC/session_lock.sh
 
-  if ! tempfile="$(CHECK_SLOCK "$cardfile")"; then
-    printf '[div .message %s]' "$(l10n "This card is not set up for editing within this session.")"
+  if ! tempfile="$(CHECK_SLOCK "$coursefile")"; then
+    printf '[div .message %s]' "$(l10n "This course is not set up for editing within this session.")"
   else
-    card="$(pdi_load "$tempfile")"
+    course="$(pdi_load "$tempfile")"
     cat <<-EOF
-       [form .card #${cardfile##*/} action="/cards/update_card.sh" method="POST"
+       [form .course #${coursefile##*/} action="/cards/update_course.sh" method="POST"
          [input type="hidden" name="tid" value="$(transid ${tempfile})"]
          [div .section .basic $(
-           edit_item "$card" N GENDER
-           [ "$(pdi_count "$card" NICKNAME)" -gt 0 ] \
+           edit_item "$course" N GENDER
+           [ "$(pdi_count "$course" NICKNAME)" -gt 0 ] \
            && edit_item "$card" NICKNAME
            edit_item "$card" BDAY
            edit_item "$card" X-ZACK-JOINDATE
@@ -88,10 +88,12 @@ print_course(){
                  "$each" \
                  "$(pdi_value "$(pdi_load "$_DATA/ical/$each")" SUMMARY |unescape |HTML)"
         done)]
-        $(cal_item "$card" CATEGORIES)
       ]
       [div .control
-        [a .item href="" $(l10n edit)]
+        [a .item href="/courses/edit_course.sh?course=${coursefile##*/}" $(l10n edit)]
+        [a .item href="/courses/export_pdf.sh?course=${coursefile##*/}" target="blank" $(l10n courselist)]
+        [a .item href="/courses/export_ical.sh?course=${coursefile##*/}" $(l10n ics_export)]
+        [a .item href="mailto:zack@vuesch.org?bcc=$(course_mail "${coursefile##*/}")" $(l10n course_mail)]
       ]
     ]
        EOF