tazpanel rev 472

boot.cgi: change look of "System logs" page; index.cgi: return "Diff" button back.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu Apr 30 02:25:59 2015 +0300 (2015-04-30)
parents 4ad87af96a43
children 12e726724a74
files boot.cgi index.cgi styles/default/base.css
line diff
     1.1 --- a/boot.cgi	Wed Apr 29 00:29:46 2015 +0300
     1.2 +++ b/boot.cgi	Thu Apr 30 02:25:59 2015 +0300
     1.3 @@ -38,11 +38,22 @@
     1.4  		logtype="$(GET syslog)"
     1.5  		[ "${logtype:-syslog}" == "syslog" ] && logtype=messages
     1.6  		xhtml_header
     1.7 +
     1.8 +		cat <<EOT
     1.9 +<section>
    1.10 +	<header>
    1.11 +		$(_ 'System logs')
    1.12 +EOT
    1.13 +
    1.14  		[ -w /etc/syslog.conf ] && cat <<EOT
    1.15 -<a href="index.cgi?file=/etc/syslog.conf&amp;action=edit" data-img="conf"></a>syslog.conf
    1.16 +		<form action="index.cgi">
    1.17 +			<input type="hidden" name="file" value="/etc/syslog.conf"/>
    1.18 +			<button name="action" value="edit" data-icon="edit">syslog.conf</button>
    1.19 +		</form>
    1.20  EOT
    1.21 +
    1.22  		cat <<EOT
    1.23 -<h2>$(_ 'System logs')</h2>
    1.24 +	</header>
    1.25  
    1.26  <ul id="tabs">
    1.27  EOT
    1.28 @@ -56,14 +67,13 @@
    1.29  		cat <<EOT
    1.30  </ul>
    1.31  
    1.32 -<section>
    1.33 -	<div>
    1.34 -		<pre>$(syntax_highlighter kernel < /var/log/$logtype | \
    1.35 -					   loghead /var/log/$logtype)</pre>
    1.36 -	</div>
    1.37 +	<pre style="overflow-x: auto">$(syntax_highlighter kernel < /var/log/$logtype | \
    1.38 +		loghead /var/log/$logtype)</pre>
    1.39  </section>
    1.40  EOT
    1.41  		;;
    1.42 +
    1.43 +
    1.44  	*\ log\ *)
    1.45  		unset actboot actslim actxlog actkernel colors
    1.46  		case "$(GET log)" in
    1.47 @@ -94,7 +104,7 @@
    1.48  
    1.49  <section>
    1.50  	<div>
    1.51 -		<pre$colors>$output</pre>
    1.52 +		<pre$colors style="overflow-x: auto">$output</pre>
    1.53  	</div>
    1.54  </section>
    1.55  EOT
    1.56 @@ -513,7 +523,7 @@
    1.57  		cat <<EOT
    1.58  		</form>
    1.59  	</header>
    1.60 -	<pre>$(cat /etc/init.d/local.sh | syntax_highlighter sh)</pre>
    1.61 +	<pre><code class="language-bash">$(cat /etc/init.d/local.sh | htmlize)</code></pre>
    1.62  </section>
    1.63  EOT
    1.64  		;;
     2.1 --- a/index.cgi	Wed Apr 29 00:29:46 2015 +0300
     2.2 +++ b/index.cgi	Thu Apr 30 02:25:59 2015 +0300
     2.3 @@ -180,16 +180,14 @@
     2.4  EOT
     2.5  			if [ -w "$file" ]; then
     2.6  				cat <<EOT
     2.7 -		<span class="float-right">
     2.8 -			<button onclick='editFile()' id="edit_button" data-icon="edit">$(_ 'Edit')</button>
     2.9 -			<button onclick='saveFile("$file", "$title")' id="save_button" 
    2.10 -				data-icon="save" style="display:none">$(_ 'Save')</button>
    2.11 -		</span>
    2.12 -		<!--form>
    2.13 +		<form>
    2.14  			<input type="hidden" name="file" value="$file"/>
    2.15 -			<button name="action" value="edit" data-icon="edit">$(_ 'Edit')</button><!--
    2.16 +			<button onclick='editFile(); return false' id="edit_button" 
    2.17 +				data-icon="edit">$(_ 'Edit')</button><!--
    2.18 +			--><button onclick='saveFile("$file", "$title"); return false' id="save_button" 
    2.19 +				data-icon="save" style="display:none">$(_ 'Save')</button><!--
    2.20  			-->$(file_is_modified $file button)
    2.21 -		</form-->
    2.22 +		</form>
    2.23  EOT
    2.24  			elif [ -r "$file" ]; then
    2.25  				cat <<EOT
     3.1 --- a/styles/default/base.css	Wed Apr 29 00:29:46 2015 +0300
     3.2 +++ b/styles/default/base.css	Thu Apr 30 02:25:59 2015 +0300
     3.3 @@ -121,7 +121,6 @@
     3.4  
     3.5  /* Clicking this layer close menu */
     3.6  #noMenu {
     3.7 -	position: fixed;
     3.8  	position: absolute; top: 63px; bottom: 0; left: 0; right: 0;
     3.9  	background-color: transparent;
    3.10  	display: none;