r1131 + welcome the first revision of main help page
authorDenis Ovsienko <infrastation@yandex.ru>
Tue, 4 Sep 2007 21:04:39 +0000 (21:04 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Tue, 4 Sep 2007 21:04:39 +0000 (21:04 +0000)
inc/config.php
inc/interface.php
inc/navigation.php
inc/pagehandlers.php
inc/pagetitles.php
pix/help.png [new file with mode: 0644]

index c578cdf..4ee4cf2 100644 (file)
@@ -91,6 +91,9 @@ $image['config']['height'] = 200;
 $image['reports']['path'] = 'pix/report.png';
 $image['reports']['width'] = 218;
 $image['reports']['height'] = 200;
+$image['help']['path'] = 'pix/help.png';
+$image['help']['width'] = 218;
+$image['help']['height'] = 200;
 $image['reserve']['path'] = 'pix/stop.png';
 $image['reserve']['width'] = 16;
 $image['reserve']['height'] = 16;
index 9c78a40..fc345c1 100644 (file)
@@ -40,6 +40,10 @@ function renderIndex ()
                                                <h1><a href='<? echo $root; ?>?page=reports'>Reports<br>
                                                <? printImageHREF ('reports'); ?></a></h1>
                                        </td>
+                                       <td>
+                                               <h1><a href='<? echo $root; ?>?page=help'>Help<br>
+                                               <? printImageHREF ('help'); ?></a></h1>
+                                       </td>
                                </tr>
                        </table>
                        </div>
@@ -2896,4 +2900,9 @@ function renderVLANMembership ($object_id = 0)
        }
 }
 
+function renderHelpContents ()
+{
+       echo 'Hello there. All existing help snippets scattered across other tabs are going to be gathered here. Soon.';
+}
+
 ?>
index 35b5f0f..351def0 100644 (file)
@@ -171,6 +171,11 @@ $page['reports']['handler'] = 'handler_reports';
 $page['reports']['parent'] = 'index';
 $tab['reports']['default'] = 'View';
 
+$page['help']['title'] = 'static_title';
+$page['help']['handler'] = 'handler_help';
+$page['help']['parent'] = 'index';
+$tab['help']['default'] = 'Contents';
+
 // This function returns array if page numbers leading to the target page
 // plus page number of target page itself. The first element is the target
 // page number and the last element is the index page number.
index 80322e1..cfad665 100644 (file)
@@ -362,4 +362,16 @@ function handler_reports ($tabno)
        }
 }
 
+function handler_help ($tabno)
+{
+       switch ($tabno)
+       {
+               case 'default':
+                       renderHelpContents();
+                       break;
+               default:
+                       showError ("Invalid tab '${tabno}' requested in handler_help().");
+       }
+}
+
 ?>
index b2e79cf..e774f0f 100644 (file)
@@ -184,6 +184,9 @@ function static_title ($pageno)
                case 'reports':
                        $ret['name'] = 'Reports';
                        break;
+               case 'help':
+                       $ret['name'] = 'Help';
+                       break;
                default:
                        $ret['name'] = 'UNKNOWN';
                        break;
diff --git a/pix/help.png b/pix/help.png
new file mode 100644 (file)
index 0000000..975f729
Binary files /dev/null and b/pix/help.png differ