]>
src.bluestatic.org Git - bugdar.git/blob - includes/class_admin_navigation.php
2 /*=====================================================================*\
3 || ###################################################################
4 || # Bugdar [#]version[#]
5 || # Copyright ©2002-[#]year[#] Blue Static
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.
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
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 \*=====================================================================*/
23 * Navigation Link System
25 * A static class whose methods are called to generate the common navigation
26 * links for the Admin CP.
29 * @copyright Copyright ©2002 - [#]year[#], Blue Static
36 // ###################################################################
38 * All the different locations under the "Options" tab
42 function optionsPages ()
44 global $navigator , $lang ;
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' );
53 // ###################################################################
55 * Adding a new language
59 function languagesAdd ()
61 global $navigator , $lang ;
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' );
67 // ###################################################################
73 * @param integer Language ID
75 function languagesEdit ( $id )
77 global $navigator , $lang ;
79 NavLinks
:: languagesAdd ();
80 $navigator- > add_component ( 'link' , 'options-languages-edit' , 'options-languages' , $lang- > string ( 'Edit Language' ), 'language.php?do=edit&languageid=' . $id );
81 $navigator- > add_component ( 'link' , 'options-languages-reload' , 'options-languages' , $lang- > string ( 'Reload XML' ), 'language.php?do=reload&languageid=' . $id );
82 $navigator- > add_component ( 'link' , 'options-languages-delete' , 'options-languages' , $lang- > string ( 'Delete' ), 'language.php?do=delete&languageid=' . $id );
85 // ###################################################################
87 * Adding a new user help item
91 function userhelpAdd ()
93 global $navigator , $lang ;
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' );
99 // ###################################################################
101 * Adding a new product
105 function productsAdd ()
107 global $navigator , $lang ;
109 $navigator- > add_component ( 'section' , 'products' , 'products' , $lang- > string ( 'Products' ), null );
110 $navigator- > add_component ( 'link' , 'products-manage' , 'products' , $lang- > string ( 'Manage Products' ), 'product.php' );
111 $navigator- > add_component ( 'link' , 'products-add' , 'products' , $lang- > string ( 'Add New Product' ), 'product.php?do=addproduct' );
114 // ###################################################################
120 * @param integer Product ID
122 function productsEdit ( $id )
124 global $navigator , $lang ;
126 NavLinks
:: productsAdd ();
127 $navigator- > add_component ( 'section' , 'products-edit' , 'products' , $lang- > string ( 'Edit Product' ), null );
128 $navigator- > add_component ( 'link' , 'products-edit' , 'products-edit' , $lang- > string ( 'Edit Product' ), 'product.php?do=editproduct&productid=' . $id );
129 $navigator- > add_component ( 'link' , 'products-edit-version' , 'products-edit' , $lang- > string ( 'Add New Version' ), 'product.php?do=addversion&productid=' . $id );
130 $navigator- > add_component ( 'link' , 'products-edit-delete' , 'products-edit' , $lang- > string ( 'Delete Product' ), 'product.php?do=deleteproduct&productid=' . $id );
133 // ###################################################################
139 function fieldsPages ()
141 global $navigator , $lang ;
143 $navigator- > add_component ( 'section' , 'fields-pages' , 'fields' , $lang- > string ( 'Fields' ), null );
144 $navigator- > add_component ( 'link' , 'fields-pages-fields' , 'fields-pages' , $lang- > string ( 'Custom Fields' ), 'field.php' );
145 $navigator- > add_component ( 'link' , 'fields-pages-priorities' , 'fields-pages' , $lang- > string ( 'Priorities' ), 'priority.php' );
146 $navigator- > add_component ( 'link' , 'fields-pages-resolutions' , 'fields-pages' , $lang- > string ( 'Resolutions' ), 'resolution.php' );
147 $navigator- > add_component ( 'link' , 'fields-pages-severities' , 'fields-pages' , $lang- > string ( 'Severities' ), 'severity.php' );
148 $navigator- > add_component ( 'link' , 'fields-pages-statuses' , 'fields-pages' , $lang- > string ( 'Statuses' ), 'status.php' );
149 $navigator- > add_component ( 'link' , 'fields-pages-autoactions' , 'fields-pages' , $lang- > string ( 'Automatic Actions' ), 'autoaction.php' );
152 // ###################################################################
154 * Adding an new custom field
160 global $navigator , $lang ;
162 $navigator- > add_component ( 'section' , 'fields' , 'fields' , $lang- > string ( 'Custom Fields' ), null );
163 $navigator- > add_component ( 'link' , 'fields-add' , 'fields' , $lang- > string ( 'Add New Custom Field' ), 'field.php?do=add' );
166 // ###################################################################
168 * Edit a custom field
172 * @param integer Field ID
174 function fieldsEdit ( $id )
176 global $navigator , $lang ;
178 NavLinks
:: fieldsAdd ();
179 $navigator- > add_component ( 'link' , 'fields-delete' , 'fields' , $lang- > string ( 'Delete' ), 'field.php?do=delete&fieldid=' . $id );
182 // ###################################################################
184 * Adding an new priority
188 function prioritiesAdd ()
190 global $navigator , $lang ;
192 $navigator- > add_component ( 'section' , 'priorities' , 'fields' , $lang- > string ( 'Priorities' ), null );
193 $navigator- > add_component ( 'link' , 'priorities-add' , 'priorities' , $lang- > string ( 'Add New Priority' ), 'priority.php?do=add' );
196 // ###################################################################
202 * @param integer Priority ID
204 function prioritiesEdit ( $id )
206 global $navigator , $lang ;
208 NavLinks
:: prioritiesAdd ();
209 $navigator- > add_component ( 'link' , 'priorities-delete' , 'priorities' , $lang- > string ( 'Delete' ), 'priority.php?do=delete&priorityid=' . $id );
212 // ###################################################################
214 * Adding an new resolution
218 function resolutionsAdd ()
220 global $navigator , $lang ;
222 $navigator- > add_component ( 'section' , 'resolutions' , 'fields' , $lang- > string ( 'Resolutions' ), null );
223 $navigator- > add_component ( 'link' , 'resolutions-add' , 'resolutions' , $lang- > string ( 'Add New Resolution' ), 'resolution.php?do=add' );
226 // ###################################################################
232 * @param integer Resolution ID
234 function resolutionsEdit ( $id )
236 global $navigator , $lang ;
238 NavLinks
:: resolutionsAdd ();
239 $navigator- > add_component ( 'link' , 'resolutions-delete' , 'resolutions' , $lang- > string ( 'Delete' ), 'resolution.php?do=delete&resolutionid=' . $id );
242 // ###################################################################
244 * Adding an new severity
248 function severitiesAdd ()
250 global $navigator , $lang ;
252 $navigator- > add_component ( 'section' , 'severities' , 'fields' , $lang- > string ( 'Severities' ), null );
253 $navigator- > add_component ( 'link' , 'severities-add' , 'severities' , $lang- > string ( 'Add New Severity' ), 'severity.php?do=add' );
256 // ###################################################################
262 * @param integer Severity ID
264 function severitiesEdit ( $id )
266 global $navigator , $lang ;
268 NavLinks
:: severitiesAdd ();
269 $navigator- > add_component ( 'link' , 'severities-delete' , 'severities' , $lang- > string ( 'Delete' ), 'severity.php?do=delete&severityid=' . $id );
272 // ###################################################################
274 * Adding an new status
278 function statusesAdd ()
280 global $navigator , $lang ;
282 $navigator- > add_component ( 'section' , 'statuses' , 'fields' , $lang- > string ( 'Severities' ), null );
283 $navigator- > add_component ( 'link' , 'statuses-add' , 'statuses' , $lang- > string ( 'Add New Status' ), 'status.php?do=add' );
286 // ###################################################################
292 * @param integer Status ID
294 function statusesEdit ( $id )
296 global $navigator , $lang ;
298 NavLinks
:: statusesAdd ();
299 $navigator- > add_component ( 'link' , 'statuses-delete' , 'statuses' , $lang- > string ( 'Delete' ), 'status.php?do=delete&statusid=' . $id );
302 // ###################################################################
304 * Adding an new auto action
308 function autoactionsAdd ()
310 global $navigator , $lang ;
312 $navigator- > add_component ( 'section' , 'autoactions' , 'fields' , $lang- > string ( 'Automatic Actions' ), null );
313 $navigator- > add_component ( 'link' , 'autoactions-add' , 'autoactions' , $lang- > string ( 'Add New Automatic Action' ), 'autoaction.php?do=add' );
316 // ###################################################################
318 * Edit an auto action
322 * @param integer Action ID
324 function autoactionsEdit ( $id )
326 global $navigator , $lang ;
328 NavLinks
:: autoactionsAdd ();
329 $navigator- > add_component ( 'link' , 'autoactions-delete' , 'autoactions' , $lang- > string ( 'Delete' ), 'autoaction.php?do=delete&actionid=' . $id );
332 // ###################################################################
338 function usersPages ()
340 global $navigator , $lang ;
342 $navigator- > add_component ( 'section' , 'users-pages' , 'users' , $lang- > string ( 'Users & Permissions' ), null );
343 $navigator- > add_component ( 'link' , 'users-pages-users' , 'users-pages' , $lang- > string ( 'Users' ), 'user.php' );
344 $navigator- > add_component ( 'link' , 'users-pages-usergroups' , 'users-pages' , $lang- > string ( 'Usergroups' ), 'usergroup.php' );
345 $navigator- > add_component ( 'link' , 'users-pages-permissions' , 'users-pages' , $lang- > string ( 'Usergroup Permissions' ), 'permission.php' );
348 // ###################################################################
356 global $navigator , $lang ;
358 $navigator- > add_component ( 'section' , 'users' , 'users' , $lang- > string ( 'Users' ), null );
359 $navigator- > add_component ( 'link' , 'users-add' , 'users' , $lang- > string ( 'Add New User' ), 'user.php?do=add' );
362 // ###################################################################
368 * @param integer User ID
370 function usersEdit ( $id )
372 global $navigator , $lang ;
374 NavLinks
:: usersAdd ();
375 $navigator- > add_component ( 'link' , 'users-delete' , 'users' , $lang- > string ( 'Delete' ), 'user.php?do=delete&userid=' . $id );
378 // ###################################################################
380 * Add a new usergroup
384 function usergroupsAdd ()
386 global $navigator , $lang ;
388 $navigator- > add_component ( 'section' , 'usergroups' , 'users' , $lang- > string ( 'Usergroups' ), null );
389 $navigator- > add_component ( 'link' , 'usergroups-add' , 'usergroups' , $lang- > string ( 'Add New Usergroup' ), 'usergroup.php?do=add' );
392 // ###################################################################
398 * @param integer User ID
400 function usergroupsEdit ( $id )
402 global $navigator , $lang ;
404 NavLinks
:: usergroupsAdd ();
405 $navigator- > add_component ( 'link' , 'usergroups-delete' , 'usergroups' , $lang- > string ( 'Delete' ), 'usergroup.php?do=delete&userid=' . $id );
409 /*=====================================================================*\
410 || ###################################################################
413 || ###################################################################
414 \*=====================================================================*/