Skip to content
Snippets Groups Projects
Commit d9f139bd authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Add support in portal to add login info to the right of the tabbar

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1356 44740490-163a-0410-bde0-09ae8108e29a
parent 7cb975f2
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ function portal_hook_htmlinject(&$hookinfo) { ...@@ -32,7 +32,7 @@ function portal_hook_htmlinject(&$hookinfo) {
// Header // Header
$hookinfo['pre'][0] = ' $hookinfo['pre'][0] = '
<div id="portalmenu"> <div id="portalmenu">
<ul class="ui-tabs-nav">' . $portal->getMenu($hookinfo['page']) . '</ul> ' . $portal->getMenu($hookinfo['page']) . '
<div id="portalcontent" class="ui-tabs-panel" style="display: block;">'; <div id="portalcontent" class="ui-tabs-panel" style="display: block;">';
// Footer // Footer
......
...@@ -29,6 +29,12 @@ class sspmod_portal_Portal { ...@@ -29,6 +29,12 @@ class sspmod_portal_Portal {
return FALSE; return FALSE;
} }
function getLoginInfo($t, $thispage) {
$info = array('info' => '', 'template' => $t, 'thispage' => $thispage);
SimpleSAML_Module::callHooks('portalLoginInfo', $info);
return $info['info'];
}
function getMenu($thispage) { function getMenu($thispage) {
$config = SimpleSAML_Configuration::getInstance(); $config = SimpleSAML_Configuration::getInstance();
...@@ -39,7 +45,16 @@ class sspmod_portal_Portal { ...@@ -39,7 +45,16 @@ class sspmod_portal_Portal {
#echo($thispage); #echo($thispage);
#echo('<pre>'); print_r($this->pages); exit; #echo('<pre>'); print_r($this->pages); exit;
$text = '<ul>'; $logininfo = $this->getLoginInfo($t, $thispage);
#echo $logininfo; exit;
$text = '';
if (!empty($logininfo)) {
$text .= '<div class="logininfo" style="float: right">' . $logininfo . '</div>';
}
$text .= '<ul class="ui-tabs-nav">';
foreach($this->pages AS $pageid => $page) { foreach($this->pages AS $pageid => $page) {
if (isset($tabset) && !in_array($pageid, $tabset, TRUE)) continue; if (isset($tabset) && !in_array($pageid, $tabset, TRUE)) continue;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment