X-Git-Url: https://git.plutz.net/?p=confetti;a=blobdiff_plain;f=templates%2Fedit_course.sh;h=0e1cd7367dd1a9c49dc1610531fffb3a21a13f6b;hp=cab321315e49ee30d6c9f085910d7f5797d6b6a4;hb=af7ea29c5a4a36bce464f2b9b80ea448cbbf7ec9;hpb=c195881a2389862d4bfcd2fd55ca868f7a20b8e8 diff --git a/templates/edit_course.sh b/templates/edit_course.sh index cab3213..0e1cd73 100755 --- a/templates/edit_course.sh +++ b/templates/edit_course.sh @@ -1,6 +1,22 @@ +# 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]="$(dbus-uuidgen)" +[ -z "$values[UID]" ] && values[UID]="$(uuidgenerator)" dtstart="$values[DTSTART]" [ -z "$dtstart" ] && dtstart=$(date +%Y%m%dT%H%M%S) @@ -42,19 +58,18 @@ else fi echo '
' -echo '
' +echo '' echo '' echo '
' -echo ' '$(l10n SUMMARY)'' +echo '

'$(l10n SUMMARY)'

' echo ' ' -echo ' '$(l10n COMMENT)'' +echo '

'$(l10n COMMENT)'

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

'$(l10n DTSTART)'

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

'$(l10n RRULE)'

' +echo ' ' +echo ' '$(l10n t_every)'' echo ' ' for f in DAILY WEEKLY MONTHLY YEARLY; do echo ' ' done -echo '
' +echo '
' +echo ' ' echo ' '$(l10n t_eternal)'
' +echo '
' echo ' ' echo ' '$(l10n t_times)'
' +echo ' '$(l10n t_times)'
' +echo ' ' echo ' '$(l10n t_until)'' echo ' ' for ud in {01..31}; do echo ' ' done -echo ' ' -echo '
' +echo ' ' -echo '
' -echo ' ' -echo ' '$aname'' +done + +echo '
' +echo ' ' -echo ' ' -echo ' ' -echo ' ' +echo ' ' +echo ' ' +echo ' ' +echo ' ' echo '
' echo '' echo '
'