r883: - Updating the Admin CP navigation system
[bugdar.git] / includes / class_admin_navigation.php
1 <?php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Iris Studios, Inc.
6 || #
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
10 || #
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 || # more details.
15 || #
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
21
22 /**
23 * Navigation Link System
24 *
25 * A static class whose methods are called to generate the common navigation
26 * links for the Admin CP.
27 *
28 * @author Iris Studios, Inc.
29 * @copyright Copyright ©2002 - [#]year[#], Iris Studios, Inc.
30 * @version $Revision$
31 * @package Bugdar
32 *
33 */
34 class NavLinks
35 {
36 // ###################################################################
37 /**
38 * All the different locations under the "Options" tab
39 *
40 * @access public
41 */
42 function optionsPages()
43 {
44 global $navigator, $lang;
45
46 $navigator->add_component('section', 'options-pages', 'options', $lang->string('Options'), null);
47 $navigator->add_component('link', 'options-pages-home', 'options-pages', $lang->string('Home'), 'index.php');
48 $navigator->add_component('link', 'options-pages-settings', 'options-pages', $lang->string('Bugdar Settings'), 'setting.php');
49 $navigator->add_component('link', 'options-pages-languages', 'options-pages', $lang->string('Languages'), 'language.php');
50 $navigator->add_component('link', 'options-pages-userhelp', 'options-pages', $lang->string('User Help Items'), 'userhelp.php');
51 }
52
53 // ###################################################################
54 /**
55 * Adding a new language
56 *
57 * @access public
58 */
59 function languagesAdd()
60 {
61 global $navigator, $lang;
62
63 $navigator->add_component('section', 'options-languages', 'options', $lang->string('Languages'), null);
64 $navigator->add_component('link', 'options-languages-add', 'options-languages', $lang->string('Add New Language'), 'language.php?do=add');
65 }
66
67 // ###################################################################
68 /**
69 * Edit a language
70 *
71 * @access public
72 *
73 * @param integer Language ID
74 */
75 function languagesEdit($id)
76 {
77 global $navigator, $lang;
78
79 NavLinks::languagesAdd();
80 $navigator->add_component('link', 'options-languages-edit', 'options-languages', $lang->string('Edit Language'), 'language.php?do=edit&amp;languageid=' . $id);
81 $navigator->add_component('link', 'options-languages-reload', 'options-languages', $lang->string('Reload XML'), 'language.php?do=reload&amp;languageid=' . $id);
82 $navigator->add_component('link', 'options-languages-delete', 'options-languages', $lang->string('Delete'), 'language.php?do=delete&amp;languageid=' . $id);
83 }
84
85 // ###################################################################
86 /**
87 * Adding a new user help item
88 *
89 * @access public
90 */
91 function userhelpAdd()
92 {
93 global $navigator, $lang;
94
95 $navigator->add_component('section', 'options-userhelp', 'options', $lang->string('User Help Items'), null);
96 $navigator->add_component('link', 'options-userhelp-add', 'options-userhelp', $lang->string('Add New Item'), 'userhelp.php?do=add');
97 }
98 }
99
100 /*=====================================================================*\
101 || ###################################################################
102 || # $HeadURL$
103 || # $Id$
104 || ###################################################################
105 \*=====================================================================*/
106 ?>