tazpanel rev 444

index.cgi: show diff for users
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Apr 08 14:49:59 2015 +0200 (2015-04-08)
parents 169f1ccfb613
children 08526cd36495
files index.cgi
line diff
     1.1 --- a/index.cgi	Wed Apr 08 15:32:20 2015 +0300
     1.2 +++ b/index.cgi	Wed Apr 08 14:49:59 2015 +0200
     1.3 @@ -177,13 +177,22 @@
     1.4  	<header>
     1.5  		<span data-icon="text">$file</span>
     1.6  EOT
     1.7 -			[ -w "$file" ] && cat <<EOT
     1.8 +			if [ -w "$file" ]; then
     1.9 +				cat <<EOT
    1.10  		<form>
    1.11  			<input type="hidden" name="file" value="$file"/>
    1.12  			<button name="action" value="edit" data-icon="edit">$(_ 'Edit')</button><!--
    1.13  			-->$(file_is_modified $file button)
    1.14  		</form>
    1.15  EOT
    1.16 +			elif [ -r "$file" ]; then
    1.17 +				cat <<EOT
    1.18 +		<form>
    1.19 +			<input type="hidden" name="file" value="$file"/>
    1.20 +			$(file_is_modified $file button)
    1.21 +		</form>
    1.22 +EOT
    1.23 +			fi
    1.24  			cat <<EOT
    1.25  	</header>
    1.26