tazbug diff web/bugs.cgi @ rev 138

Last fixes and improvemnt before using new tazbug storage on Tank
author Christophe Lincoln <pankso@slitaz.org>
date Wed Feb 22 15:43:58 2017 +0100 (2017-02-22)
parents f07cd117feed
children 3a17904702fc
line diff
     1.1 --- a/web/bugs.cgi	Wed Feb 22 14:59:49 2017 +0100
     1.2 +++ b/web/bugs.cgi	Wed Feb 22 15:43:58 2017 +0100
     1.3 @@ -323,7 +323,7 @@
     1.4  </pre>
     1.5  EOT
     1.6  	if [ "$PKGS" ] && [ -x "$plugins/packages/packages.cgi" ]; then
     1.7 -		echo "<p>"
     1.8 +		echo "<p style='vertical-align: middle;'>"
     1.9  		echo "<strong>$(gettext 'Affected package(s):')</strong>"
    1.10  		for pkg in $PKGS; do
    1.11  			echo "<a href='?pkg=$pkg'>$pkg</a>"
    1.12 @@ -572,7 +572,7 @@
    1.13  	[ "$size" ] || size=48
    1.14  	url="http://www.gravatar.com/avatar"
    1.15  	md5=$(md5crypt $email)
    1.16 -	echo "<img src=\"$url/$md5?d=identicon&amp;s=$size\" alt=\"\" />"
    1.17 +	echo "<img src='$url/$md5?d=identicon&amp;s=$size' alt='' />"
    1.18  }
    1.19  
    1.20  # Create a new user in AUTH_FILE and PEOPLE
    1.21 @@ -684,6 +684,7 @@
    1.22  		fi
    1.23  		echo '</pre>'
    1.24  		html_footer ;;
    1.25 +		
    1.26  	*\ closed\ *)
    1.27  		# Show all closed bugs.
    1.28  		header
    1.29 @@ -692,6 +693,7 @@
    1.30  		list_bugs "closed"
    1.31  		echo "</pre>"
    1.32  		html_footer ;;
    1.33 +		
    1.34  	*\ login\ *)
    1.35  		# The login page
    1.36  		[ "$(GET error)" ] && \
    1.37 @@ -701,6 +703,7 @@
    1.38  		user_box
    1.39  		login_page
    1.40  		html_footer ;;
    1.41 +		
    1.42  	*\ logout\ *)
    1.43  		header
    1.44  		html_header
    1.45 @@ -709,6 +712,7 @@
    1.46  			js_unset_cookie 'auth'
    1.47  			js_redirection_to "$script"
    1.48  		fi ;;
    1.49 +		
    1.50  	*\ user\ *)
    1.51  		# User profile. Use the users plugin for more functions
    1.52  		last="$(cat $PEOPLE/"$(GET user)"/last)"
    1.53 @@ -725,6 +729,7 @@
    1.54  </pre>
    1.55  EOT
    1.56  		html_footer ;;
    1.57 +		
    1.58  	*\ newbug\ *)
    1.59  		# Create a bug from web interface.
    1.60  		header
    1.61 @@ -736,6 +741,7 @@
    1.62  			echo "<p>$(gettext 'You must be logged in to post a new bug')</p>"
    1.63  		fi
    1.64  		html_footer ;;
    1.65 +		
    1.66  	*\ addbug\ *)
    1.67  		# Save a new bug
    1.68  		header
    1.69 @@ -744,6 +750,7 @@
    1.70  			new_bug
    1.71  			js_redirection_to "$script?id=$id"
    1.72  		fi ;;
    1.73 +		
    1.74  	*\ editbug\ *)
    1.75  		# Edit existing bug
    1.76  		header
    1.77 @@ -753,16 +760,17 @@
    1.78  		user_box
    1.79  		edit_bug
    1.80  		html_footer ;;
    1.81 +		
    1.82  	*\ savebug\ *)
    1.83 -		header
    1.84 -		html_header
    1.85  		if check_auth; then
    1.86  			save_bug
    1.87  			js_redirection_to "$script?id=$id"
    1.88  		fi ;;
    1.89 +		
    1.90  	*\ id\ *)
    1.91  		header
    1.92  		html_header
    1.93 +		user_box
    1.94  		id="$(GET id)"
    1.95  		[ "$(GET close)" ] && close_bug
    1.96  		[ "$(GET open)" ] && open_bug
    1.97 @@ -770,9 +778,9 @@
    1.98  		[ "$(GET msg)" ] && new_msg
    1.99  		[ "$(GET delmsg)" ] && rm -f $bugdir/$id/msg.$(GET delmsg)
   1.100  		msgs=$(fgrep MSG= $bugdir/$id/msg.* | wc -l)
   1.101 -		user_box
   1.102  		bug_page
   1.103  		html_footer ;;
   1.104 +		
   1.105  	*\ signup\ *)
   1.106  		# Signup
   1.107  		header