tazpanel rev 439

index.cgi: restore header in the file viewer; network.cgi: show both disabled start/stop/restart buttons for user.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Apr 07 04:12:24 2015 +0300 (2015-04-07)
parents 3b7af62b1a2e
children f09ef19be78d
files index.cgi network.cgi
line diff
     1.1 --- a/index.cgi	Tue Apr 07 03:50:06 2015 +0300
     1.2 +++ b/index.cgi	Tue Apr 07 04:12:24 2015 +0300
     1.3 @@ -174,18 +174,19 @@
     1.4  
     1.5  			cat <<EOT
     1.6  <section>
     1.7 +	<header>
     1.8 +		<span data-icon="text">$file</span>
     1.9  EOT
    1.10  			[ -w "$file" ] && cat <<EOT
    1.11 -	<header>
    1.12 -		<span data-icon="text">$file</span>
    1.13  		<form>
    1.14  			<input type="hidden" name="file" value="$file"/>
    1.15  			<button name="action" value="edit" data-icon="edit">$(gettext 'Edit')</button><!--
    1.16  			-->$(file_is_modified $file button)
    1.17  		</form>
    1.18 -	</header>
    1.19  EOT
    1.20  			cat <<EOT
    1.21 +	</header>
    1.22 +
    1.23  	<div>
    1.24  		<pre>
    1.25  EOT
     2.1 --- a/network.cgi	Tue Apr 07 03:50:06 2015 +0300
     2.2 +++ b/network.cgi	Tue Apr 07 04:12:24 2015 +0300
     2.3 @@ -579,21 +579,23 @@
     2.4  			stop_disabled='disabled'
     2.5  		fi
     2.6  
     2.7 +		if [ ! -w /etc/network.conf ]; then
     2.8 +			start_disabled='disabled'; stop_disabled='disabled'
     2.9 +		fi
    2.10 +
    2.11  		cat <<EOT
    2.12  <h2>$(gettext 'Networking')</h2>
    2.13  
    2.14  <p>$(gettext 'Manage network connections and services')</p>
    2.15  
    2.16  <form action="index.cgi" id="indexform"></form>
    2.17 -EOT
    2.18 -		[ -w /etc/network.conf ] && cat <<EOT
    2.19 +
    2.20  <form id="mainform"><!--
    2.21  	--><button name="start"   data-icon="start"   $start_disabled>$(gettext 'Start'  )</button><!--
    2.22  	--><button name="stop"    data-icon="stop"    $stop_disabled >$(gettext 'Stop'   )</button><!--
    2.23  	--><button name="restart" data-icon="restart" $stop_disabled >$(gettext 'Restart')</button>
    2.24  </form>
    2.25 -EOT
    2.26 -		cat <<EOT
    2.27 +
    2.28  <div class="float-right"><!--
    2.29  	-->$(gettext 'Configuration:')<!--
    2.30  	--><button form="indexform" name="file" value="/etc/network.conf" data-icon="conf">network.conf</button><!--