tazpanel rev 32
add doc/ with index.cgi to generate translated help and doc + use absolute path in xHTML and config
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Tue Apr 05 05:51:38 2011 +0200 (2011-04-05) |
parents | 253219c1f9fe |
children | fa59528e8bdf |
files | index.cgi lib/libtazpanel styles/default/header.html tazpanel.conf |
line diff
1.1 --- a/index.cgi Tue Apr 05 05:10:57 2011 +0200 1.2 +++ b/index.cgi Tue Apr 05 05:51:38 2011 +0200 1.3 @@ -23,13 +23,14 @@ 1.4 if ifconfig | grep -A 1 $i | grep -q inet; then 1.5 ip=`ifconfig | grep -A 1 $i | grep inet | \ 1.6 awk '{ print $2 }' | cut -d ":" -f 2` 1.7 - echo "<td>connected</td> <td>$ip</td>" 1.8 + echo "<td>connected</td><td>$ip</td>" 1.9 else 1.10 - echo "<td>-</td>" 1.11 + echo "<td>----</td><td>----</td>" 1.12 fi 1.13 } 1.14 1.15 -# Catch network interface 1.16 +# Catch network interface (network is splited this function and above 1.17 +# must go in lib/libtazpanel 1.18 list_network_interfaces() { 1.19 table_start 1.20 cat << EOT
2.1 --- a/lib/libtazpanel Tue Apr 05 05:10:57 2011 +0200 2.2 +++ b/lib/libtazpanel Tue Apr 05 05:51:38 2011 +0200 2.3 @@ -18,11 +18,11 @@ 2.4 # 2.5 2.6 xhtml_header() { 2.7 - cat $HEADER | sed s/'- %TITLE%'/"$TITLE"/ 2.8 + cat ${PANEL}$HEADER | sed s/'- %TITLE%'/"$TITLE"/ 2.9 } 2.10 2.11 xhtml_footer() { 2.12 - cat $FOOTER 2.13 + cat ${PANEL}$FOOTER 2.14 } 2.15 2.16 table_start() {
3.1 --- a/styles/default/header.html Tue Apr 05 05:10:57 2011 +0200 3.2 +++ b/styles/default/header.html Tue Apr 05 05:51:38 2011 +0200 3.3 @@ -3,23 +3,23 @@ 3.4 <head> 3.5 <title>Tazpanel - %TITLE%</title> 3.6 <meta charset="utf-8" /> 3.7 - <link rel="shortcut icon" href="styles/default/favicon.ico" /> 3.8 - <link rel="stylesheet" type="text/css" href="styles/default/style.css" /> 3.9 + <link rel="shortcut icon" href="/styles/default/favicon.ico" /> 3.10 + <link rel="stylesheet" type="text/css" href="/styles/default/style.css" /> 3.11 </head> 3.12 <body> 3.13 3.14 <div id="toolbar"> 3.15 <div id="icons"> 3.16 - <a href="./"><img src="styles/default/images/help.png" /></a> 3.17 + <a href="/doc/"><img src="/styles/default/images/help.png" /></a> 3.18 </div> 3.19 <div id="menu"> 3.20 - <a href="./">Panel</a> 3.21 - <a href="pkgs.cgi">Packages</a> 3.22 - <a href="live.cgi">Live</a> 3.23 - <a href="index.cgi?boot">Boot</a> 3.24 - <a href="index.cgi?users">Users</a> 3.25 - <a href="index.cgi?network">Network</a> 3.26 - <a href="index.cgi?hardware">Hardware</a> 3.27 + <a href="/">Panel</a> 3.28 + <a href="/pkgs.cgi">Packages</a> 3.29 + <a href="/live.cgi">Live</a> 3.30 + <a href="/index.cgi?boot">Boot</a> 3.31 + <a href="/index.cgi?users">Users</a> 3.32 + <a href="/index.cgi?network">Network</a> 3.33 + <a href="/index.cgi?hardware">Hardware</a> 3.34 </div> 3.35 </div> 3.36
4.1 --- a/tazpanel.conf Tue Apr 05 05:10:57 2011 +0200 4.2 +++ b/tazpanel.conf Tue Apr 05 05:51:38 2011 +0200 4.3 @@ -5,10 +5,10 @@ 4.4 PANEL="/var/www/tazpanel" 4.5 STYLE="default" 4.6 4.7 -# Path to images and xHTML skel 4.8 -IMAGES="styles/$STYLE/images" 4.9 -HEADER="styles/$STYLE/header.html" 4.10 -FOOTER="styles/$STYLE/footer.html" 4.11 +# Absolute path to images and xHTML skel from $PANEL 4.12 +IMAGES="/styles/$STYLE/images" 4.13 +HEADER="/styles/$STYLE/header.html" 4.14 +FOOTER="/styles/$STYLE/footer.html" 4.15 4.16 # Display some debug message 4.17 DEBUG="0"