mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-08-06 07:01:30 -04:00
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!
This commit is contained in:
@@ -42,4 +42,21 @@ class Admin_View_Core extends View {
|
||||
public function display($page_name, $view_class="View") {
|
||||
return new $view_class($page_name);
|
||||
}
|
||||
|
||||
public function admin_menu() {
|
||||
$menu = new Menu(true);
|
||||
core_menu::admin($menu, $this);
|
||||
|
||||
foreach (module::installed() as $module) {
|
||||
if ($module->name == "core") {
|
||||
continue;
|
||||
}
|
||||
$class = "{$module->name}_menu";
|
||||
if (method_exists($class, "admin")) {
|
||||
call_user_func_array(array($class, "admin"), array(&$menu, $this));
|
||||
}
|
||||
}
|
||||
|
||||
print $menu;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user