123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- $user = $vars['entity'];
- $actions = elgg_extract('action', $vars['menu'], null);
- $main = elgg_extract('default', $vars['menu'], null);
- $admin = elgg_extract('admin', $vars['menu'], null);
- echo '<ul class="elgg-menu elgg-menu-hover">';
- // name and username
- $name_link = elgg_view('output/url', array(
- 'href' => $user->getURL(),
- 'text' => "<span class=\"elgg-heading-basic\">$user->name</span>@$user->username",
- 'is_trusted' => true,
- ));
- echo "<li>$name_link</li>";
- // actions
- if (elgg_is_logged_in() && $actions) {
- echo '<li>';
- echo elgg_view('navigation/menu/elements/section', array(
- 'class' => "elgg-menu elgg-menu-hover-actions",
- 'items' => $actions,
- ));
- echo '</li>';
- }
- // main
- if ($main) {
- echo '<li>';
-
- echo elgg_view('navigation/menu/elements/section', array(
- 'class' => 'elgg-menu elgg-menu-hover-default',
- 'items' => $main,
- ));
-
- echo '</li>';
- }
- // admin
- if (elgg_is_admin_logged_in() && $admin) {
- echo '<li>';
-
- echo elgg_view('navigation/menu/elements/section', array(
- 'class' => 'elgg-menu elgg-menu-hover-admin',
- 'items' => $admin,
- ));
-
- echo '</li>';
- }
- echo '</ul>';
|