mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-19 19:09:13 -04:00
Add a user_menu method to the Admin_View and then use this method to get the
user menu. Since the information displayed is identical in both admin and theme views, it makes sense to combine the generation to it is done in a common location.
This commit is contained in:
@@ -36,6 +36,8 @@ class Admin_View_Core extends Gallery_View {
|
||||
$this->sidebar = "";
|
||||
$this->set_global("theme", $this);
|
||||
$this->set_global("user", identity::active_user());
|
||||
$this->set_global("page_type", "admin");
|
||||
$this->set_global("page_subtype", $name);
|
||||
}
|
||||
|
||||
public function admin_menu() {
|
||||
@@ -44,6 +46,14 @@ class Admin_View_Core extends Gallery_View {
|
||||
return $menu->render();
|
||||
}
|
||||
|
||||
public function user_menu() {
|
||||
$menu = Menu::factory("root")
|
||||
->css_id("g-login-menu")
|
||||
->css_class("g-inline ui-helper-clear-fix");
|
||||
module::event("user_menu", $menu, $this);
|
||||
return $menu->render();
|
||||
}
|
||||
|
||||
/**
|
||||
* Print out any site wide status information.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user