tazpanel rev 539

html header cache: change title as well as sub-title
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Aug 31 11:09:25 2015 +0300 (2015-08-31)
parents 082b622cb781
children 551a881b8292
files lib/libtazpanel styles/default/header.html
line diff
     1.1 --- a/lib/libtazpanel	Sun Aug 30 23:46:37 2015 +0300
     1.2 +++ b/lib/libtazpanel	Mon Aug 31 11:09:25 2015 +0300
     1.3 @@ -260,7 +260,6 @@
     1.4  
     1.5  	# Cache header
     1.6  	if [ ! -f "$header" ]; then
     1.7 -		SUBTITLE='@@SUBTITLE@@'
     1.8  		. ${PANEL}$HEADER > "$header"
     1.9  		cat >> "$header" <<EOT
    1.10  <script type="text/javascript">
    1.11 @@ -269,7 +268,7 @@
    1.12  </script>
    1.13  EOT
    1.14  	fi
    1.15 -	sed "s|@@SUBTITLE@@|$subtitle|" "$header"
    1.16 +	sed "s|@@TITLE@@|$TITLE|; s|@@SUBTITLE@@|$subtitle|" "$header"
    1.17  
    1.18  	# Show debug output
    1.19  	if [ "$DEBUG" -eq 1 ]; then
     2.1 --- a/styles/default/header.html	Sun Aug 30 23:46:37 2015 +0300
     2.2 +++ b/styles/default/header.html	Mon Aug 31 11:09:25 2015 +0300
     2.3 @@ -35,8 +35,8 @@
     2.4  <div id="confirmBreak" style="display:none">$(_ 'Confirm break')</div>
     2.5  
     2.6  <header>
     2.7 -	<h1 data-icon="tazpanel">$TITLE </h1>
     2.8 -	<div>$SUBTITLE</div>
     2.9 +	<h1 data-icon="tazpanel">@@TITLE@@ </h1>
    2.10 +	<div>@@SUBTITLE@@</div>
    2.11  </header>
    2.12  
    2.13  <nav id="toolbar">
    2.14 @@ -55,7 +55,7 @@
    2.15     <span>$(_ 'Network')</span>
    2.16     <menu>
    2.17      <li><a data-icon="info" href="network.cgi">$(_ 'Summary')</a></li>
    2.18 -    <li><a data-icon="conf" href="index.cgi?file=/etc/network.conf&action=edit">$(_ 'Config file')</a></li>
    2.19 +    <li><a data-icon="conf" href="index.cgi?file=/etc/network.conf&amp;action=edit">$(_ 'Config file')</a></li>
    2.20      <li><a data-icon="eth"  href="network.cgi?eth">$(_ 'Ethernet')</a></li>
    2.21      <li><a data-icon="wifi" href="network.cgi?wifi">$(_ 'Wireless')</a></li>
    2.22      $(extra_menu network)