tazbug rev 51

Improve bug listing
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jan 06 16:58:23 2014 +0000 (2014-01-06)
parents 02a11d8d636e
children 3acb15d87d6e
files web/bugs.cgi web/style.css
line diff
     1.1 --- a/web/bugs.cgi	Sun Jan 05 09:10:27 2014 +0000
     1.2 +++ b/web/bugs.cgi	Mon Jan 06 16:58:23 2014 +0000
     1.3 @@ -247,6 +247,7 @@
     1.4  list_bugs() {
     1.5  	bug="$1"
     1.6  	echo "<h3>$(eval_gettext '$bug Bug')</h3>"
     1.7 +	echo "<pre>"
     1.8  	for pr in critical standard
     1.9  	do
    1.10  		for bug in $(fgrep -H "$1" $bugdir/*/bug.conf | cut -d ":" -f 1)
    1.11 @@ -254,14 +255,15 @@
    1.12  			. $bug
    1.13  			id=$(basename $(dirname $bug))
    1.14  			if [ "$PRIORITY" == "$pr" ]; then
    1.15 +				[ -f "${PEOPLE}/${CREATOR}/account.conf" ] && \
    1.16 +					. ${PEOPLE}/${CREATOR}/account.conf
    1.17  				cat << EOT
    1.18 -<pre>
    1.19 -$(gettext 'Bug title  :') <strong>$BUG</strong> <a href="?id=$id">$(gettext 'Show')</a>
    1.20 -$(gettext 'ID - Date  :') $id - $DATE
    1.21 -$(gettext 'Creator    :') <a href="?user=$CREATOR">$CREATOR</a>
    1.22 -</pre>
    1.23 +<a href="?user=$USER">$(get_gravatar "$MAIL" 24)</a> \
    1.24 +ID: $id  <strong><a href="?id=$id">$BUG</a></strong> \
    1.25 +<span class="date">$DATE</span>
    1.26  EOT
    1.27  			fi
    1.28 +			unset CREATOR USER MAIL
    1.29  		done
    1.30  	done
    1.31  }
    1.32 @@ -283,13 +285,14 @@
    1.33  		MAIL="default"
    1.34  	fi
    1.35  	cat << EOT
    1.36 -<h2>$(eval_gettext 'Bug $id')</h2>
    1.37 +<h2>$(eval_gettext 'Bug $id: $STATUS')</h2>
    1.38  <form method="get" action="$WEB_URL">
    1.39  
    1.40  <p>
    1.41 -	$(get_gravatar $MAIL 32)
    1.42 -	<strong>$STATUS</strong>
    1.43 -	$BUG - $DATE -
    1.44 +	$(get_gravatar $MAIL 32) <strong>$BUG</strong>
    1.45 +</p>
    1.46 +<p>
    1.47 +	$(gettext "Date:") $DATE -
    1.48  	$(eval_gettext 'Priority $PRIORITY') -
    1.49  	$(eval_ngettext '$msgs message' '$msgs messages' $msgs)
    1.50  </p>
    1.51 @@ -604,6 +607,7 @@
    1.52  		html_header
    1.53  		user_box
    1.54  		list_bugs CLOSED
    1.55 +		echo "</pre>"
    1.56  		html_footer ;;
    1.57  	*\ login\ *)
    1.58  		# The login page
    1.59 @@ -621,7 +625,6 @@
    1.60  			rm -f "$sessions/$user"
    1.61  			js_unset_cookie 'auth'
    1.62  			js_redirection_to "$WEB_URL"
    1.63 -
    1.64  		fi ;;
    1.65  	*\ user\ *)
    1.66  		# User profile
    1.67 @@ -812,6 +815,7 @@
    1.68  </div>
    1.69  EOT
    1.70  		list_bugs OPEN
    1.71 +		echo "</pre>"
    1.72  		html_footer ;;
    1.73  esac
    1.74  
     2.1 --- a/web/style.css	Sun Jan 05 09:10:27 2014 +0000
     2.2 +++ b/web/style.css	Mon Jan 06 16:58:23 2014 +0000
     2.3 @@ -127,8 +127,11 @@
     2.4  	padding: 10px;
     2.5  }
     2.6  
     2.7 +pre img { margin: 4px 4px 4px 0px; }
     2.8 +
     2.9  .error { color: red; }
    2.10  .ok { color: green; }
    2.11 +.date { color: #666; font-size: 96%; }
    2.12  
    2.13  /* Progress bar */
    2.14