# 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')

-
+
@@ -730,9 +747,9 @@ new_bug js_redirection_to "$script?id=$count" fi ;; - *\ edit\ *) + *\ editbug\ *) # Edit existing bug - id="$(GET edit)" + id="$(GET editbug)" header html_header user_box @@ -893,13 +910,21 @@

$(gettext "Latest Bugs")

EOT - # List last 3 bugs + # List last 5 bugs echo "
"
-		for lb in $(ls ${bugdir} | sort -r -n | head -n 3)
+		for lb in $(ls ${bugdir} | sort -r -n | head -n 5)
 		do
 			list_bug ${lb}
 		done
 		echo "
" + # List last 3 messages + echo "

$(gettext "Latest Messages")

" + echo "
"
+		for msg in $(ls -t ${bugdir}/*/msg.* | head -n 3)
+		do
+			list_msg ${msg}
+		done
+		echo "
" list_bugs OPEN echo "
" html_footer ;; diff -r 5102774d2794 -r 1a43d9e16913 web/plugins/pkgs/pkgs.cgi --- a/web/plugins/pkgs/pkgs.cgi Fri Feb 10 18:12:00 2017 +0100 +++ b/web/plugins/pkgs/pkgs.cgi Fri Feb 10 19:24:09 2017 +0100 @@ -1,6 +1,6 @@ #!/bin/sh # -# TazBug Plugin - List packages +# TazBug Plugin - Buggy packages plugins # if [ "$(GET packages)" ] || [ "$(GET pkg)" ]; then diff -r 5102774d2794 -r 1a43d9e16913 web/plugins/users/users.cgi --- a/web/plugins/users/users.cgi Fri Feb 10 18:12:00 2017 +0100 +++ b/web/plugins/users/users.cgi Fri Feb 10 19:24:09 2017 +0100 @@ -1,6 +1,6 @@ #!/bin/sh # -# TinyCM/TazBug Plugin - Users Admin +# TinyCM/TazBug Plugin - Users profile and admin # case " $(GET) " in diff -r 5102774d2794 -r 1a43d9e16913 web/style.css --- a/web/style.css Fri Feb 10 18:12:00 2017 +0100 +++ b/web/style.css Fri Feb 10 19:24:09 2017 +0100 @@ -116,9 +116,8 @@ max-width: 720px; } -#newbug textarea, #edit textarea { width: 490px; height: 180px; } +#newbug textarea, #editbug textarea { width: 490px; height: 180px; } -/* #edit textarea { width: 100%; height: 240px; } */ .box, pre, #login, #account-info { background-color: #f8f8f8;