# HG changeset patch
# User Christophe Lincoln
# Date 1486751049 -3600
# Node ID 1a43d9e1691305966f711a6a5aaec47daf5cd9dd
# Parent 5102774d2794ebdc9597519c30032307cb929f12
List last messages on main page
diff -r 5102774d2794 -r 1a43d9e16913 web/bugs.cgi
--- a/web/bugs.cgi Fri Feb 10 18:12:00 2017 +0100
+++ b/web/bugs.cgi Fri Feb 10 19:24:09 2017 +0100
@@ -241,7 +241,7 @@
. ${PEOPLE}/${CREATOR}/account.conf
cat << EOT
$(get_gravatar "$MAIL" 24) \
-ID: $id $BUG $DATE
+ID: $id $BUG - $DATE
EOT
unset CREATOR USER MAIL
}
@@ -262,7 +262,7 @@
. ${PEOPLE}/${CREATOR}/account.conf
cat << EOT
$(get_gravatar "$MAIL" 24) \
-ID: $id $BUG $DATE
+ID: $id $BUG - $DATE
EOT
fi
unset CREATOR USER MAIL
@@ -270,6 +270,22 @@
done
}
+# Usage: list_msg path
+list_msg() {
+ msg="$1"
+ dir=$(dirname $msg)
+ id=$(basename $dir)
+ . ${msg}
+ [ -f "${PEOPLE}/${USER}/account.conf" ] && \
+ . ${PEOPLE}/${USER}/account.conf
+ cat << EOT
+$(get_gravatar "$MAIL" 24) \
+ID: Bug $id - $DATE
+$MSG
+EOT
+ unset CREATOR USER MAIL
+}
+
# Stripped down Wiki parser for bug desc and messages which are simply
# displayed in
wiki_parser() {
@@ -294,6 +310,7 @@
$(gettext "Date:") $DATE -
+ $(gettext "Creator:") $CREATOR -
$(eval_gettext 'Priority $PRIORITY') -
$(eval_ngettext '$msgs message' '$msgs messages' $msgs)
@@ -312,7 +329,7 @@
# Only original user and admin can edit a bug
if [ "$user" == "$CREATOR" ] || admin_user; then
cat << EOT
-$(gettext "Edit bug")
+$(gettext "Edit bug")
EOT
fi
else
@@ -463,7 +480,7 @@
fi
cat << EOT
$(eval_gettext 'Edit Bug $bug')
-