summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
7bd4ca5)
svn path=/trunk/; revision=151
+list_categories() {
+ catfile="${_DATA}/mappings/categories"
+ sort -u "$catfile"
+}
+
listcards() {
case "${_GET[filtertype]}" in
any)
listcards() {
case "${_GET[filtertype]}" in
any)
check_a() {
egrep -q "^${1}.${id}$" "$_DATA/mappings/attendance" && setchecked
}
check_a() {
egrep -q "^${1}.${id}$" "$_DATA/mappings/attendance" && setchecked
}
+check_c() {
+ for n in CATEGORIES CATEGORIES{0..100}; do
+ if [ -n "${values[$n]+x}" ]; then
+ [ "${values[$n]}" = "$1" ] && setchecked && break
+ else
+ break
+ fi
+ done
+}
+
teltype() {
cat <<-EOF
<select class="item phonetype" name="phonetype">
teltype() {
cat <<-EOF
<select class="item phonetype" name="phonetype">
printf '<label><input type="checkbox" name="attendance" value="%s" %s/>%s</label>' \
"$(attribsafe "$each")" "$(check_a "$each")" "$(htmlsafe "$cname")"
done)
printf '<label><input type="checkbox" name="attendance" value="%s" %s/>%s</label>' \
"$(attribsafe "$each")" "$(check_a "$each")" "$(htmlsafe "$cname")"
done)
+ <h3>$(l10n CATEGORIES)</h3>
+ $(list_categories |while read each; do
+ printf '<label><input type="checkbox" name="CATEGORIES" value="%s" %s/>%s</label>' \
+ "$(attribsafe "$each")" "$(check_c "$each")" "$(htmlsafe "$each")"
+ done)
</div>
END_HTML
elif [ "$PROFILE" = medical ]; then
</div>
END_HTML
elif [ "$PROFILE" = medical ]; then
cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")"
printf ' <li><a class="item attendance" href="?p=courses#%s">%s</a></li>' "$each" "$(htmlsafe $cname)"
done
cname="$(sed -rn 's:^SUMMARY\:(.*)$:\1:p' "$_DATA/ical/$each")"
printf ' <li><a class="item attendance" href="?p=courses#%s">%s</a></li>' "$each" "$(htmlsafe $cname)"
done
+ printf '</ul>'
+ list_items CATEGORIES
+ printf '</div>'
+
elif [ "$PROFILE" = medical ]; then
list_items ADR
list_items URL
elif [ "$PROFILE" = medical ]; then
list_items ADR
list_items URL