X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=courses%2Flist.sh;h=aeafc8b4d96ec0292f28b73c0d469b4e41abafab;hp=a0eb6d16ef61318c8e45ee114964d1ef0a0e0d65;hb=c804cffce30c171a5ed7aabfd26040787ef23bd1;hpb=057ad3bc6e2d4c7bcc5d93047b0426e7e608d25a diff --git a/courses/list.sh b/courses/list.sh index a0eb6d1..aeafc8b 100755 --- a/courses/list.sh +++ b/courses/list.sh @@ -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