From 3643bc408e45653267afe7860490ebbd3fd71b99 Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 2 Dec 2013 15:20:02 +0000 Subject: [PATCH] ordering for courses, default ordering for attendees svn path=/trunk/; revision=32 --- pages/attendees.sh | 2 ++ pages/courses.sh | 14 ++++++++++++++ templates/courses.css.sh | 18 ++++++++++++++++-- templates/courses.html.sh | 16 ++++++++++++++++ templates/text_courses.sh | 5 +++++ 5 files changed, 53 insertions(+), 2 deletions(-) diff --git a/pages/attendees.sh b/pages/attendees.sh index 32f651b..a8a22c7 100755 --- a/pages/attendees.sh +++ b/pages/attendees.sh @@ -1,5 +1,7 @@ #!/bin/sh +[ -z "$_GET[\"order\"]" ] && _GET["order"]=firstname + listcards() { case "$_GET[\"filtertype\"]" in any) diff --git a/pages/courses.sh b/pages/courses.sh index 9610ec2..c0aab02 100755 --- a/pages/courses.sh +++ b/pages/courses.sh @@ -1,10 +1,24 @@ #!/bin/sh +[ -z "$_GET[\"order\"]" ] && _GET["order"]=DOW + listcourses() { case "$_GET[\"filtertype\"]" in *) ls -1 ${_DATA}/ical/*ics 2>/dev/null ;; esac |case "$_GET[\"order\"]" in + DOW) + while read file; do + icstime="$(sed -rn 's:^DTSTART\:(TZID=.*\:)?([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z?\r$:\2-\3-\4 \5\:\6\:\7:p' "$file")" + echo "$(date -d "$icstime" "+%u %H%M%S")\t$file" + done + ;; + TOD) + while read file; do + icstime="$(sed -rn 's:^DTSTART\:(TZID=.*\:)?([0-9]{4})([0-9]{2})([0-9]{2})T([0-9]{2})([0-9]{2})([0-9]{2})Z?\r$:\2-\3-\4 \5\:\6\:\7:p' "$file")" + echo "$(date -d "$icstime" +%H%M%S)\t$file" + done + ;; *) sed -r 's:^.*$:x\t&:' ;; diff --git a/templates/courses.css.sh b/templates/courses.css.sh index a0fdb03..fb98be5 100644 --- a/templates/courses.css.sh +++ b/templates/courses.css.sh @@ -1,15 +1,29 @@ cat < + + +
diff --git a/templates/text_courses.sh b/templates/text_courses.sh index 540cd76..74b8805 100755 --- a/templates/text_courses.sh +++ b/templates/text_courses.sh @@ -27,6 +27,11 @@ item_name[edit_dtscal]="✓" item_name[edit]="Bearbeiten" item_name[ics_export]="ICal exportieren" +item_name[sort_order]="Sortierung" +item_name[order_DOW]="Wochentag" +item_name[order_TOD]="Uhrzeit" +item_name[order_apply]="Sortieren" + item_name[t_every]="Alle" item_name[t_eternal]="ewig" item_name[t_times]="mal" -- 2.39.2