tazpanel annotate help.cgi @ rev 382
Added tag 1.7.1 for changeset b5a8dc2e1374
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Jan 06 00:46:21 2014 +0100 (2014-01-06) |
parents | fdfc6b494539 |
children | 106b85c1951c |
rev | line source |
---|---|
pankso@112 | 1 #!/bin/sh |
pankso@112 | 2 # |
pankso@112 | 3 # help.cgi - Display TazPanel doc and README. |
pankso@112 | 4 # |
pankso@379 | 5 # Copyright (C) 2011-2014 SliTaz GNU/Linux - BSD License |
pankso@112 | 6 # |
pankso@112 | 7 |
pankso@112 | 8 # Common functions from libtazpanel |
pankso@112 | 9 . lib/libtazpanel |
pankso@112 | 10 get_config |
pascal@200 | 11 header |
pascal@200 | 12 |
pascal@200 | 13 # ENTER will search but user may search for a button, so put one. |
pascal@200 | 14 search_form() { |
pascal@200 | 15 cat << EOT |
pascal@200 | 16 <div class="search"> |
pascal@200 | 17 <form method="get" action="$SCRIPT_NAME"> |
pascal@200 | 18 <p> |
pascal@200 | 19 <input type="text" name="manual" size="20"> |
al@303 | 20 <input type="submit" class="radius" value="$(gettext 'Manual')"> |
pascal@200 | 21 </p> |
pascal@200 | 22 </form> |
pascal@200 | 23 </div> |
pascal@200 | 24 EOT |
pascal@200 | 25 } |
pankso@112 | 26 |
pankso@112 | 27 # Cat translated help content |
al@303 | 28 TITLE=$(gettext 'TazPanel - Help & Doc') |
pankso@112 | 29 |
pankso@112 | 30 xhtml_header |
pascal@200 | 31 search_form |
pankso@112 | 32 |
pascal@200 | 33 if [ "$(GET manual)" ]; then |
pascal@200 | 34 echo '<pre>' |
pascal@200 | 35 man $(GET manual) |
pascal@200 | 36 echo '</pre>' |
pankso@112 | 37 else |
pascal@200 | 38 if [ -d doc ]; then |
pascal@200 | 39 cat doc/tazpanel.html |
pascal@200 | 40 else |
pascal@200 | 41 cat /usr/share/doc/tazpanel/tazpanel.html |
pascal@200 | 42 fi |
pascal@200 | 43 |
al@303 | 44 # cat << EOT |
al@303 | 45 #<h3>README</h3> |
al@303 | 46 #<pre>$(cat $PANEL/README)</pre> |
al@303 | 47 #EOT |
al@303 | 48 cat $PANEL/README.html |
pascal@200 | 49 |
pankso@112 | 50 fi |
pankso@112 | 51 |
pankso@112 | 52 xhtml_footer |
pankso@112 | 53 exit 0 |