示例#1
0
<?php

/*
Global Tools
This will be the top bar across the site when logged in.
It will contain global admin buttons like Users, Page Settings, and the Breadcrumb.
These are mostly links to independent modules. 
*/
?>

<?php 
$buttons = aTools::getGlobalButtons();
$page = aTools::getCurrentPage();
$pageEdit = $page && $page->userHasPrivilege('edit') || empty($page);
$cmsAdmin = $sf_user->hasCredential('cms_admin');
$thisPage = $page && !$page->admin && ($cmsAdmin || $pageEdit);
?>

<?php 
use_helper('I18N');
?>

<div id="a-global-toolbar">
  <?php 
// All logged in users, including guests with no admin abilities, need access to the
?>
  <?php 
// logout button. But if you have no legitimate admin roles, you shouldn't see the
?>
  <?php 
// apostrophe or the global buttons