tazpanel view help.cgi @ rev 225

Added tag 1.2.2 for changeset 71b4d133679e
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sat Feb 18 23:23:38 2012 +0100 (2012-02-18)
parents dce3e66c3ba4
children aa12dc99e177
line source
1 #!/bin/sh
2 #
3 # help.cgi - Display TazPanel doc and README.
4 #
5 # Copyright (C) 2011 SliTaz GNU/Linux - BSD License
6 #
8 # Common functions from libtazpanel
9 . lib/libtazpanel
10 get_config
11 header
13 # ENTER will search but user may search for a button, so put one.
14 search_form() {
15 cat << EOT
16 <div class="search">
17 <form method="get" action="$SCRIPT_NAME">
18 <p>
19 <input type="text" name="manual" size="20">
20 <input type="submit" value="`gettext "Manual"`">
21 </p>
22 </form>
23 </div>
24 EOT
25 }
27 # Cat translated help content
28 TITLE="- Help \&amp; Doc"
30 xhtml_header
31 search_form
33 if [ "$(GET manual)" ]; then
34 echo '<pre>'
35 man $(GET manual)
36 echo '</pre>'
37 else
38 if [ -d doc ]; then
39 cat doc/tazpanel.html
40 else
41 cat /usr/share/doc/tazpanel/tazpanel.html
42 fi
44 echo '<h3>README</h3>'
45 echo '<pre>'
46 cat $PANEL/README
47 echo '</pre>'
49 fi
51 xhtml_footer
52 exit 0