tazpanel rev 434
boot.cgi: user support
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Apr 06 20:48:48 2015 +0200 (2015-04-06) |
parents | 73305834575f |
children | a686450b8e9e |
files | boot.cgi hardware.cgi index.cgi styles/default/header.html |
line diff
1.1 --- a/boot.cgi Mon Apr 06 19:06:05 2015 +0200 1.2 +++ b/boot.cgi Mon Apr 06 20:48:48 2015 +0200 1.3 @@ -345,7 +345,11 @@ 1.4 <form> 1.5 <button name="log" data-icon="logs" >$(gettext 'Boot logs' )</button> 1.6 <button name="daemons" data-icon="daemons">$(gettext 'Manage daemons')</button> 1.7 +EOT 1.8 + [ -w /boot/grub/menu.lst ] && cat <<EOT 1.9 <button name="grub" data-icon="grub" >$(gettext 'Boot loader' )</button> 1.10 +EOT 1.11 + cat <<EOT 1.12 </form> 1.13 1.14 1.15 @@ -373,7 +377,11 @@ 1.16 $(gettext 'Local startup commands') 1.17 <form action="index.cgi"> 1.18 <input type="hidden" name="file" value="/etc/init.d/local.sh"/> 1.19 +EOT 1.20 + [ -w /etc/init.d/local.sh ] && cat <<EOT 1.21 <button name="action" value="edit" data-icon="edit">$(gettext 'Edit')</button> 1.22 +EOT 1.23 + cat <<EOT 1.24 </form> 1.25 </header> 1.26 <pre>$(cat /etc/init.d/local.sh | syntax_highlighter sh)</pre>
2.1 --- a/hardware.cgi Mon Apr 06 19:06:05 2015 +0200 2.2 +++ b/hardware.cgi Mon Apr 06 20:48:48 2015 +0200 2.3 @@ -223,13 +223,13 @@ 2.4 <p>$(gettext 'Manage your computer hardware')</p> 2.5 2.6 <form><!-- 2.7 - --><button name="modules" data-icon="modules">$(gettext 'Kernel modules')</button> 2.8 EOT 2.9 [ "$REMOTE_USER" == "root" ] && cat <<EOT 2.10 - <button name="detect" data-icon="detect" >$(gettext 'Detect PCI/USB')</button> 2.11 - <button name="tazx" data-icon="tazx" >$(gettext 'Auto-install Xorg video driver')</button> 2.12 + --><button name="detect" data-icon="detect" >$(gettext 'Detect PCI/USB')</button><!-- 2.13 + --><button name="tazx" data-icon="tazx" >$(gettext 'Auto-install Xorg video driver')</button><!-- 2.14 EOT 2.15 cat <<EOT 2.16 + --><button name="modules" data-icon="modules">$(gettext 'Kernel modules')</button> 2.17 </form> 2.18 2.19 EOT
3.1 --- a/index.cgi Mon Apr 06 19:06:05 2015 +0200 3.2 +++ b/index.cgi Mon Apr 06 20:48:48 2015 +0200 3.3 @@ -609,9 +609,13 @@ 3.4 <p>$(gettext 'SliTaz administration and configuration Panel')<p> 3.5 3.6 <form class="nogap"><!-- 3.7 +EOT 3.8 + [ "$REMOTE_USER" == "root" ] && cat <<EOT 3.9 --><button name="terminal" data-icon="terminal">$(gettext 'Terminal' )</button><!-- 3.10 - --><button name="top" data-icon="proc" >$(gettext 'Process activity')</button><!-- 3.11 - --><button name="report" data-icon="report" >$(gettext 'Create a report' )</button> 3.12 + --><button name="report" data-icon="report" >$(gettext 'Create a report' )</button><!-- 3.13 +EOT 3.14 + cat <<EOT 3.15 + --><button name="top" data-icon="proc" >$(gettext 'Process activity')</button> 3.16 </form> 3.17 3.18 <section>
4.1 --- a/styles/default/header.html Mon Apr 06 19:06:05 2015 +0200 4.2 +++ b/styles/default/header.html Mon Apr 06 20:48:48 2015 +0200 4.3 @@ -44,7 +44,11 @@ 4.4 <span>$(gettext 'Boot')</span> 4.5 <menu> 4.6 <li><a data-icon="info" href="/boot.cgi">$(gettext 'Summary')</a></li> 4.7 +EOT 4.8 + [ -w /boot/grub/menu.lst ] && cat <<EOT 4.9 <li><a data-icon="grub" href="/boot.cgi?grub">$(gettext 'Boot loader')</a></li> 4.10 +EOT 4.11 +cat << EOT 4.12 <li><a data-icon="logs" href="/boot.cgi?log">$(gettext 'Boot logs')</a> 4.13 <menu> 4.14 <li><a data-icon="" href="/boot.cgi?log=kernel">$(gettext 'Kernel messages')</a></li>