From: Paul Hänsch Date: Sun, 10 Jan 2021 23:02:31 +0000 (+0100) Subject: removed obsolete html templates X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=d4701244b73cd8741cba4599adfe80280783039b;p=lobster removed obsolete html templates --- diff --git a/courses/edit_course.template.sh b/courses/edit_course.template.sh deleted file mode 100755 index 0e1cd73..0000000 --- a/courses/edit_course.template.sh +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright 2014 Paul Hänsch -# -# This file is part of Confetti. -# -# Confetti is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Confetti is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Confetti. If not, see . - -SUP_FIELDS=(SUMMARY COMMENT) -[ -z "$values[UID]" ] && values[UID]="$(uuidgenerator)" - -dtstart="$values[DTSTART]" -[ -z "$dtstart" ] && dtstart=$(date +%Y%m%dT%H%M%S) - -echo "$dtstart" |case "$dtstart" in - *Z) - sed -rn 's:^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z$:\1-\2-\3 \4\:\5\:\6 UTC:p' - ;; - TZID*) - sed -rn 's:^TZID=(.+)\:([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})$:TZ="\1" \2-\3-\4 \5\:\6\:\7:p' - ;; - *) - sed -rn 's:^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})$:\1-\2-\3 \4\:\5\:\6:p' - ;; -esac |read dts_date - -dts_year=$(date -d "$dts_date" +%Y) -dts_month=$(date -d "$dts_date" +%m) -dts_dom=$(date -d "$dts_date" +%d) -dts_dow=$(date -d "$dts_date" +%u) -dts_weekday=$(date -d "$dts_date" +%A) -dts_hour=$(date -d "$dts_date" +%H) -dts_min=$(date -d "$dts_date" +%M) -dts_sec=$(date -d "$dts_date" +%S) - -rrule="$values[RRULE]" -rr_int="$(echo $rrule |sed -rn 's:^.*INTERVAL=([0-9]+)(;.*)?$:\1:p')" -rr_count="$(echo $rrule |sed -rn 's:^.*COUNT=([0-9]+)(;.*)?$:\1:p')" -rr_freq="$(echo $rrule |sed -rn 's:^.*FREQ=(YEARLY|MONTHLY|WEEKLY|DAILY)(;.*)?$:\1:p')" -rr_uyear="$(echo $rrule |sed -rn 's:^.*UNTIL=([0-9]{4})([0-9]{2})([0-9]{2})T[0-9]{6}Z(;.*)?$:\1:p')" -rr_umonth="$(echo $rrule |sed -rn 's:^.*UNTIL=([0-9]{4})([0-9]{2})([0-9]{2})T[0-9]{6}Z(;.*)?$:\2:p')" -rr_uday="$(echo $rrule |sed -rn 's:^.*UNTIL=([0-9]{4})([0-9]{2})([0-9]{2})T[0-9]{6}Z(;.*)?$:\3:p')" -if [ -n "$rr_count" ]; then - rr_limit=COUNT -elif [ -n "$rr_uyear" ]; then - rr_limit=UNTIL -else - rr_limit=ETERN -fi - -echo '
' -echo '
' -echo '' -echo '
' -echo '

'$(l10n SUMMARY)'

' -echo ' ' -echo '

'$(l10n COMMENT)'

' -for n in COMMENT COMMENT{0..10}; do [ -n "$values[$n]" ] &&\ - echo ' ' -done - -echo '
' -echo '

'$(l10n DTSTART)'

' -echo ' ' -echo ' ' -echo '
' -for wd in mon tue wed thu fri sat sun; do - echo -n ''$(date -d $wd +%a)'' -done -fdom=$(date -d ${dts_year}-${dts_month}-1 +%u) -while [ "$fdom" -gt 1 ]; do - echo -n '' - fdom=$(($fdom - 1)) -done -cnt=$(date -d ${dts_year}-${dts_month}-1 +%s) -while [ "$(date -d @$cnt +%m)" = "$dts_month" ]; do - dn=$(date -d @$cnt +%d) - echo -n '' - cnt=$(($cnt + 86400)) -done -echo '
' -echo ' '$(l10n time)':' -echo ' :' - -echo '
' -echo '

'$(l10n RRULE)'

' -echo ' ' -echo ' '$(l10n t_every)'' -echo ' ' -echo ' ' -echo ' ' -echo ' '$(l10n t_eternal)'
' -echo '
' -echo ' ' -echo ' '$(l10n t_times)'' -echo ' ' -echo ' '$(l10n t_until)'' -echo ' ' -echo ' ' -echo ' ' - -echo '
' -echo '

'$(l10n course_attendance)'

' -listcards |while read card; do - cfile="$_DATA/vcard/$card" - aname=$(sed -rn 's:^N(;[^"\:]+|;"[^"]+")*\:([^;]*)(\;[^;]*)(\;[^;]*)?(\;[^;]*)?(\;[^;]*)?$:\5 \3 \4 \2 \6:p' "$cfile" \ - |sed -r 's:,: :;s:\;: :g;s: +: :g' \ - |tr -d '\r' - ) - selected=$(sed -rn "/^$id\t$card\$/{s;^.*\$;checked=\"checked\";p;q}" "${_DATA}/mappings/attendance") - echo ' ' -done - -echo '
' -echo ' ' -echo '' -echo '
' - diff --git a/courses/view_course.sh b/courses/view_course.sh deleted file mode 100755 index 23088f1..0000000 --- a/courses/view_course.sh +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2014 Paul Hänsch -# -# This file is part of Confetti. -# -# Confetti is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. -# -# Confetti is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with Confetti. If not, see . - -dtstart="$values[DTSTART]" -[ -z "$dtstart" ] && dtstart=$(date +%Y%m%dT%H%M%S) - -echo "$dtstart" |case "$dtstart" in - *Z) - sed -rn 's:^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z$:\1-\2-\3 \4\:\5\:\6 UTC:p' - ;; - TZID*) - sed -rn 's:^TZID=(.+)\:([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})$:TZ="\1" \2-\3-\4 \5\:\6\:\7:p' - ;; - *) - sed -rn 's:^([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})$:\1-\2-\3 \4\:\5\:\6:p' - ;; -esac |read dts_date - -dts_year=$(date -d "$dts_date" +%Y) -dts_month=$(date -d "$dts_date" +%m) -dts_dom=$(date -d "$dts_date" +%d) -dts_dow=$(date -d "$dts_date" +%u) -dts_weekday=$(date -d "$dts_date" +%A) -dts_hour=$(date -d "$dts_date" +%H) -dts_min=$(date -d "$dts_date" +%M) -dts_sec=$(date -d "$dts_date" +%S) - -rrule="$values[RRULE]" -rr_int="$(echo $rrule |sed -rn 's:^.*INTERVAL=([0-9]+)(;.*)?$:\1:p')" -rr_count="$(echo $rrule |sed -rn 's:^.*COUNT=([0-9]+)(;.*)?$:\1:p')" -rr_freq="$(echo $rrule |sed -rn 's:^.*FREQ=(YEARLY|MONTHLY|WEEKLY|DAILY)(;.*)?$:\1:p')" -rr_uyear="$(echo $rrule |sed -rn 's:^.*UNTIL=([0-9]{4})([0-9]{2})([0-9]{2})T[0-9]{6}Z(;.*)?$:\1:p')" -rr_umonth="$(echo $rrule |sed -rn 's:^.*UNTIL=([0-9]{4})([0-9]{2})([0-9]{2})T[0-9]{6}Z(;.*)?$:\2:p')" -rr_uday="$(echo $rrule |sed -rn 's:^.*UNTIL=([0-9]{4})([0-9]{2})([0-9]{2})T[0-9]{6}Z(;.*)?$:\3:p')" -rr_udate="$(echo $rrule |sed -rn 's:^.*UNTIL=([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z(;.*)?$:\1-\2-\3 \4\:\5\:\6:p')" -if [ -n "$rr_count" ]; then - rr_limit=COUNT -elif [ -n "$rr_uyear" ]; then - rr_limit=UNTIL -else - rr_limit=ETERN -fi - -coursemail="" - -echo '
' -echo '
' -echo '' -echo '
' -echo '

'$values[SUMMARY]'

' -echo ' '$(date -d "$dts_date" "+%A %B %d, %Y - %H:%M") $(l10n t_oclock)'' -[ "$rr_int" -eq 1 ] \ -&& echo ''$(l10n s$rr_freq)'' \ -|| echo ''$(l10n t_every) ${rr_int} $(l10n $rr_freq)'' -case "$rr_limit" in - COUNT) - m1=$(echo $rr_freq |sed -r "s:DAILY:day:g;s:WEEKLY:week:g;s:MONTHLY:month:g;s:YEARLY:year:g;") - m2=$(($rr_int * $rr_count)) - echo ''$(l10n t_until) $(date -d "$dts_date + $m2 $m1" "+%A %B %d, %Y - %H:%M")'' - ;; - UNTIL) - echo ''$(l10n t_until) $(date -d "$rr_udate" "+%A %B %d, %Y - %H:%M")'' - ;; -esac -echo '
' - -echo '
' -echo '

'$(l10n COMMENT)'

' -for n in COMMENT COMMENT{0..10}; do [ -n "$values[$n]" ] &&\ - echo '

'$(echo "$values[$n]" |sed -r "s:$:
:g" )'

' -done -echo '
' - -echo '
' -echo '

'$(l10n course_attendance)'

' -list_attendance "$id" |sort -k 2 |sed -r 's:^([^ ]+) (.*)$:\2:' -echo '
' - -echo '
' -echo ' '$(l10n edit)'' -echo ' '$(l10n courselist)'' -echo ' '$(l10n ics_export)'' -echo ' '$(l10n course_mail)'' -echo '
' -echo '' -echo '
' -echo '
' -