summaryrefslogtreecommitdiff
path: root/modules/user/helpers
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-12-18 07:32:34 +0000
committerBharat Mediratta <bharat@menalto.com>2008-12-18 07:32:34 +0000
commitc67234974d578cacfd354b103e1f166e8ea2c426 (patch)
tree208c16cc8a8d43e60e69b497cfe193d97f885974 /modules/user/helpers
parentaed68bfa9f68bfbc5df09135bec371b98a579671 (diff)
Refactor site admin menu into a theme function and build the menus in
the various modules. In the process, rename xxx_menu::site_navigation() to just xxx_menu::site(). And add xxx_menu::admin(). The menus are the same as before, but I changed the HTML to be consistent with the way that we do it in the regular site, and this broke the superfish styles. I don't know how to fix this.. help me Chad!
Diffstat (limited to 'modules/user/helpers')
-rw-r--r--modules/user/helpers/user_menu.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/modules/user/helpers/user_menu.php b/modules/user/helpers/user_menu.php
index 886a873a..654a0d89 100644
--- a/modules/user/helpers/user_menu.php
+++ b/modules/user/helpers/user_menu.php
@@ -18,7 +18,7 @@
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
*/
class user_menu_Core {
- public static function site_navigation($menu, $theme) {
+ public static function site($menu, $theme) {
$user = user::active();
if (!$user->guest) {
$menu->get("admin_menu")->append(
@@ -28,4 +28,20 @@ class user_menu_Core {
->url(url::site("users/form/edit/$user->id")));
}
}
+
+ public static function admin($menu, $theme) {
+ $menu->get("users_groups_menu")
+ ->append(Menu::factory("link")
+ ->id("list_users")
+ ->label(_("List Users"))
+ ->url(url::site("admin/users")))
+ ->append(Menu::factory("link")
+ ->id("create_user")
+ ->label(_("Create new user"))
+ ->url("#"))
+ ->append(Menu::factory("link")
+ ->id("edit_user")
+ ->label(_("Edit user"))
+ ->url("#"));
+ }
}