Elgg  Version 1.9
header.php
Go to the documentation of this file.
1 <?php
5 $admin_title = elgg_get_site_entity()->name . ' ' . elgg_echo('admin');
6 
7 $view_site = elgg_view('output/url', array(
8  'href' => elgg_get_site_url(),
9  'text' => elgg_echo('admin:view_site'),
10  'is_trusted' => true,
11 ));
12 
13 if (elgg_get_config('elgg_maintenance_mode', null)) {
14  $view_site .= ' ('
15  . elgg_view('output/url', array(
16  'href' => 'admin/administer_utilities/maintenance',
17  'text' => elgg_echo('admin:administer_utilities:maintenance'),
18  'class' => 'elgg-maintenance-mode-warning',
19  ))
20  . ')';
21 }
22 
23 $logout = elgg_view('output/url', array(
24  'href' => 'action/logout',
25  'text' => elgg_echo('logout'),
26  'is_trusted' => true,
27 ));
28 ?>
29 <h1 class="elgg-heading-site">
30  <a href="<?php echo elgg_get_site_url(); ?>admin">
31  <?php echo $admin_title; ?>
32  </a>
33 </h1>
34 <ul class="elgg-menu-user">
35  <li><?php echo elgg_echo('admin:loggedin', array(elgg_get_logged_in_user_entity()->name)); ?></li>
36  <li><?php echo $view_site; ?></li>
37  <li><?php echo $logout; ?></li>
38 </ul>
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
elgg_get_site_entity($site_guid=0)
Get an ElggSite entity (default is current site)
Definition: sites.php:18
ul
Definition: admin.php:44
$admin_title
Elgg admin header.
Definition: header.php:5
$view_site
Definition: header.php:7
h1
Definition: admin.php:85
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:43
if(elgg_get_config('elgg_maintenance_mode', null)) $logout
Definition: header.php:23
elgg_get_site_url($site_guid=0)
Get the URL for the current (or specified) site.
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
elgg menu user li
Definition: admin.php:203
a
Definition: admin.php:97
elgg_get_logged_in_user_entity()
Return the current logged in user, or null if no user is logged in.
Definition: sessions.php:32