t_oclock) printf "Uhr";;
"Mon Tue Wed Thu Fri Sat Sun") printf "Mo Di Mi Do Fr Sa So";;
+ "January February March April May June July August September October November December")
+ printf "Januar Februar März April Mai Juni Juli August September Oktober November Dezember";;
*) printf %s "$word";;
esac
[div .section .recur . $(
edit_item "$course" RRULE
)]
- [div .section .select_attendance . $(
+ [div .section .attendance . $(
edit_item "$course" attendance
)]
[div .control
]
[button .item type="submit" name="action" value="addfield" . $(l10n edit_addfield) --]
[button .item type="submit" name="action" value="update" . $(l10n edit_update)]
- [button .item type="submit" name="action" value="delete" . $(l10n edit_delete)]
[button .item type="submit" name="action" value="cancel" . $(l10n edit_cancel)]
- ]'
+ [div .item .delete label="$(l10n edit_delete)"
+ [input type="checkbox" #delete]
+ [label for="delete" $(l10n edit_delete)]
+ [button type="submit" name="action" value="delete" $(l10n edit_delete)]
+ ]
+ ]
]
EOF
fi
w_sort_courses(){
cat <<-EOF
[form .sort .search action="?" method="GET"
- [span .label $(l10n sort_order):]
- [radio "order" "DOW" $(check $order DOW) $(l10n order_DOW)]
- [radio "order" "TOD" $(check $order TOD) $(l10n order_TOD)]
+ [fieldset .order [legend $(l10n sort_order):]
+ [radio "order" "DOW" $(check $order DOW) $(l10n order_DOW)]
+ [radio "order" "TOD" $(check $order TOD) $(l10n order_TOD)]
+ ]
[submit "" "" $(l10n order_apply)]
]
EOF
;;
DTSTART)
printf '[span .text .DTSTART %s %s ]' \
- "$(date -d "$(pdi_value "$course" DTSTART |cal_date)" '+%A %B %d, %Y - %H:%M')" \
+ "$(LANG=de_DE.UTF-8 date -d "$(pdi_value "$course" DTSTART |cal_date)" '+%A, %d. %B %Y - %H:%M')" \
"$(l10n t_oclock)"
;;
RRULE)
done 2>/dev/null
)]
]
- [span .DTSTIME $(l10n time):]
+ [label .DTSTIME $(l10n time):]
[input type="number" name="DTS_HOUR" value="$hhstart" min="0" max="23"]:[input type="number" name="DTS_MINUTE" value="$mmstart" min="0" max="59"]
EOF
;;
printf ' [option value="%s" %s . %s]\n' "$f" "$(selected $f "$rr_freq")" "$(l10n $f)"
done)
]]
- [span .item [input type="radio" name="RRULE_LIMIT" value="ETERN" $(checked "$rr_limit" ETERN) . $(l10n t_eternal)][br]]
- [span .item
- [input type="radio" name="RRULE_LIMIT" value="COUNT" $(checked "$rr_limit" COUNT)]
- [input type="number" .RRULE .COUNT name="RRULE_COUNT" placeholder="#N" value="${rr_count:-1}" min="1"] $(l10n t_times)
+ [label .item [input type="radio" name="RRULE_LIMIT" value="ETERN" $(checked "$rr_limit" ETERN)] $(l10n t_eternal)]
+ [label .item
+ [input type="radio" name="RRULE_LIMIT" value="COUNT" $(checked "$rr_limit" COUNT)]
+ [input type="number" .RRULE .COUNT name="RRULE_COUNT" placeholder="#N" value="${rr_count:-1}" min="1"] $(l10n t_times)
]
- [span .item
- [input type="radio" name="RRULE_LIMIT" value="UNTIL" $(checked "$rr_limit" UNTIL) . $(l10n t_until)]
- [input type="number" .RRULE .UYEAR name="RRULE_UYEAR" placeholder="$(l10n YYYY)" value="${rr_uyear:-$ystart}" min="$ystart"]
- [input type="number" .RRULE .UMONTH name="RRULE_UMONTH" placeholder="$(l10n MM)" value="${rr_umonth:-$mstart}" min="1" max="12"]
- [input type="number" .RRULE .UDAY name="RRULE_UDAY" placeholder="$(l10n DD)" value="${rr_uday:-$dstart}" min="1" max="31"]
+ [label .item
+ [input type="radio" name="RRULE_LIMIT" value="UNTIL" $(checked "$rr_limit" UNTIL)] $(l10n t_until)
+ [input type="number" .RRULE .UYEAR name="RRULE_UYEAR" placeholder="$(l10n YYYY)" value="${rr_uyear:-$ystart}" min="$ystart"]
+ [input type="number" .RRULE .UMONTH name="RRULE_UMONTH" placeholder="$(l10n MM)" value="${rr_umonth:-$mstart}" min="1" max="12"]
+ [input type="number" .RRULE .UDAY name="RRULE_UDAY" placeholder="$(l10n DD)" value="${rr_uday:-$dstart}" min="1" max="31"]
]
EOF
;;
;;
attendance)
printf '[h3 %s]' "$(l10n course_attendance)"
+ printf '[div .attendance\n'
for vcf in "$_DATA"/vcard/*.vcf; do
fn="$(pdi_value "$(pdi_load "$vcf")" FN)"
printf '%s/%s\n' "${vcf##*/}" "$fn"
done \
| sort -t/ -k2 \
| while IFS=/ read -r vcf fn; do
- printf '[label [input type="checkbox" .item name="attendance" value="%s" %s] %s]' \
- "$vcf" "$(grep -qxF "${coursefile##*/} $vcf" "$_DATA/mappings/attendance" && printf 'checked="checked"')" "$fn"
+ printf '[span .item [input type="checkbox" id="att%s" name="attendance" value="%s" %s][label for="att%s" . %s]]' \
+ "$vcf" "$vcf" "$(grep -qxF "${coursefile##*/} $vcf" "$_DATA/mappings/attendance" && printf 'checked="checked"')" "$vcf" "$fn"
done
+ printf ']'
;;
SUMMARY)
printf '[h3 %s]' "$(l10n "$item")"
i, em { font-style: italic; }
b, strong { font-weight: bolder; }
ul, ol { margin-left: 1.125em; }
+table th { font-weight: bold; }
h1, h2, h3 {
font-weight: bold;
input[type=radio], input[type=checkbox] {
vertical-align: baseline;
}
+input[type=number] { text-align: right; padding-right: 0; }
button, input[type=button],
.control a {
margin-top: .5em; margin-bottom: .5em;
}
+body.courses form .order { display: inline-block; margin-right: 2em;}
+
/* ============ LIST ITEMS, Generic ============= */
float: right;
font-size: .75em;
line-height: 1;
- max-width: .75em; height: .875em; overflow: hidden;
+ max-width: 1.75em; height: 1.125em; overflow: hidden;
color: #FBB; background-color: #444;
margin: 0; padding: .125em .5em 0 .5em;
border-radius: 4pt 4pt 0 0;
form .control .item.newfield select { width: calc(100% - 2.5em); }
form .control .item.delete { bottom: .125em; right: .25em; }
}
+
+/* ======= LIST ITEMS, Courses ======= */
+
+form.course .dtstart input[name=DTS_YEAR],
+form.course .dtstart select[name=DTS_MONTH] { width: calc(50% - 1.25em); }
+form.course .dtstart input[name=DTS_YEAR] { margin-right: -.375em; }
+form.course .dtstart table { width: 100%; margin: 1em 0; }
+form.course .dtstart table td { text-align: right; -border: .5pt solid; }
+form.course .dtstart table input[type=radio] { display: none; }
+form.course .dtstart table input[type=radio] + label {
+ display: block;
+ width: 100%;
+ margin: 0; padding: 0 3pt;
+}
+form.course .dtstart table input[type=radio]:checked + label {
+ font-weight: bold;
+ padding: 0 2pt;
+ box-shadow: .125em .125em .25em;
+}
+
+form.course .dtstart label.DTSTIME {
+ display: inline-block;
+ font-weight: bold;
+ margin: 0;
+ width: calc(100% - 7.875em);
+}
+form.course .dtstart input[name=DTS_HOUR],
+form.course .dtstart input[name=DTS_MINUTE] {
+ vertical-align: baseline;
+ width: 3.5em;
+ margin-bottom: 0;
+}
+
+form.course .recur .item { white-space: nowrap; }
+form.course .recur .item > * { margin-bottom: 0; vertical-align: baseline; }
+form.course .recur input[name=RRULE_INTERVAL],
+form.course .recur input[name=RRULE_COUNT],
+form.course .recur input[name=RRULE_UMONTH],
+form.course .recur input[name=RRULE_UDAY] { width: 3.5em; }
+form.course .recur input[name=RRULE_UYEAR] { width: 4.5em; }
+form.course .recur input[name=RRULE_UYEAR],
+form.course .recur input[name=RRULE_UMONTH],
+form.course .recur input[name=RRULE_UDAY] {
+ margin-right: -.375em;
+}
+
+form.course .attendance div.attendance {
+ max-height: 16em;
+ overflow-y: scroll;
+}
+form.course .attendance label {
+ display: inline-block;
+ max-width: calc(100% - 2em);
+ vertical-align: top;
+ margin-bottom: 0;
+}
+form.course .attendance input { margin-top: .375em; }