printf %s\\n "$META_TAGS" |tr , \\n |while read tag; do
[ "$tag" ] && printf ' [span .tag . %s]\n' "$(HTML "${tag#-}")"
done
+
+ if [ "${META_GROUP}" ]; then
+ printf '[div .itemlist'
+ list_meta "$_DATA/${ITEM%/*}/.index/meta" \
+ | grep -F "${CR} ${META_GROUP}" \
+ | while read_meta; do
+ file="$(printf %s\\n "$_DATA/${META_NAME}".*)"
+ [ "/${file#${_DATA}/}" = "$ITEM" ] && continue
+ name="$(HTML "/${file#${_DATA}/}")"
+
+ printf '[div .list .file
+ [a href="%s" [img src="%s?a=thumbnail"]][label . %s]
+ [span .time %i:%02imin] [span .dim %ix%i] %s
+ ]' \
+ "$name" "$name" "${name##/}" \
+ "$((META_LENGTH / 60))" "$((META_LENGTH % 60))" \
+ "$META_WIDTH" "$META_HEIGHT" \
+ "$(printf %s\\n "${META_TAGS}" \
+ | sed -r 's;^;,;; s;,+;,;g; s;,$;;;
+ :X s;,-?([^,]+)(,|$); [span .tag\n \1]\2;; tX;'
+ )"
+ done
+ printf ']'
+ fi
+
printf '
[div #editing
[form method=POST action="/?a=multitag"