Merge pull request #489 from xabispacebiker/reconditioning-interface-personal-block
Reconditioning interface personal block
This commit is contained in:
commit
cc18596384
5 changed files with 49 additions and 35 deletions
|
@ -26,7 +26,8 @@ $pages[] = array(
|
|||
'uri' => '/',
|
||||
'resource' => '',
|
||||
'class' => '<i class="icon-globe icon-white"></i>',
|
||||
'pages' => array()
|
||||
'pages' => array(),
|
||||
'visible' => false
|
||||
);
|
||||
$pages[] = array(
|
||||
'label' => _('Calendar'),
|
||||
|
@ -77,26 +78,28 @@ $pages[] = array(
|
|||
array(
|
||||
'label' => _('General'),
|
||||
'module' => 'default',
|
||||
'controller' => 'preference'
|
||||
'controller' => 'preference',
|
||||
'resource' => 'preference'
|
||||
),
|
||||
array(
|
||||
'label' => _('My Profile'),
|
||||
'controller' => 'user',
|
||||
'action' => 'edit-user',
|
||||
'resource' => 'user'
|
||||
'resource' => 'usersettings'
|
||||
),
|
||||
array(
|
||||
'label' => _('Users'),
|
||||
'module' => 'default',
|
||||
'controller' => 'user',
|
||||
'action' => 'add-user',
|
||||
'resource' => 'user'
|
||||
'resource' => 'user'
|
||||
),
|
||||
array(
|
||||
'label' => _('Streams'),
|
||||
'module' => 'default',
|
||||
'controller' => 'preference',
|
||||
'action' => 'stream-setting'
|
||||
'action' => 'stream-setting',
|
||||
'resource' => 'preference'
|
||||
),
|
||||
array(
|
||||
'label' => _('Status'),
|
||||
|
@ -220,4 +223,4 @@ $container = new Zend_Navigation($pages);
|
|||
$container->id = "nav";
|
||||
|
||||
//store it in the registry:
|
||||
Zend_Registry::set('Zend_Navigation', $container);
|
||||
Zend_Registry::set('Zend_Navigation', $container);
|
|
@ -92,6 +92,14 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|||
<div id="nav">
|
||||
<?php echo $this->navigation()->menu(); ?>
|
||||
</div>
|
||||
|
||||
<div class="btn-group">
|
||||
<a href="<?php echo $this->baseUrl . '/login/logout'; ?>">
|
||||
<button id="add_media_btn" class="btn btn-small dashboard-btn btn-danger">
|
||||
<span><?php echo _("Logout") ?></span>
|
||||
</button>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
<?php
|
||||
|
|
|
@ -1,5 +1,18 @@
|
|||
<ol class="navigation">
|
||||
<?php foreach ($this->container as $page) : ?>
|
||||
<?php
|
||||
// Host users do not have access to the General Preferences
|
||||
// therefor we need to manually change the page parameters
|
||||
// to point to the first allowed item in the Preferences
|
||||
// which is 'My Profile' page
|
||||
$user = Application_Model_User::getCurrentUser();
|
||||
$isHost = $user->isUserType(array(UTYPE_HOST));
|
||||
if ($isHost && $page->getTitle() === 'Settings') {
|
||||
$page->set('resource', 'usersettings');
|
||||
$page->set('controller', 'user');
|
||||
$page->set('action','edit-user');
|
||||
}
|
||||
?>
|
||||
<?php if($this->navigation()->accept($page)) : ?>
|
||||
<li class="top <?php if($page->isActive(true)){echo 'active';} ?>">
|
||||
<?php if($page->hasPages()) : ?>
|
||||
|
@ -29,4 +42,4 @@
|
|||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ol>
|
||||
</ol>
|
|
@ -1,5 +1,7 @@
|
|||
<div id="master-panel">
|
||||
<img class="logo" src="/css/images/airtime_logo_med2.png">
|
||||
<div class="logo-container">
|
||||
<img class="logo" src="data:image/png;base64,<?php echo Application_Model_Preference::GetStationLogo(); ?>" />
|
||||
</div>
|
||||
<div class="now-playing-block">
|
||||
<div class="text-row"><strong><?php echo _("Previous:"); ?></strong> <span id='previous'></span> <span id='prev-length'></span></div>
|
||||
<div class="now-playing-info song">
|
||||
|
@ -54,14 +56,6 @@
|
|||
<li class="time" id="time"></li>
|
||||
<li class="time-zone"><span id="time-zone"></span></li>
|
||||
</ul>
|
||||
<div class="personal-block solo">
|
||||
<ol>
|
||||
<li>
|
||||
<a id="current-user" href=<?php echo $this->baseUrl . "/user/edit-user"?>><span class="name"><?php echo $this->escape($this->loggedInAs()); ?></span></a>
|
||||
| <a href=<?php echo $this->baseUrl . "/login/logout"?>><?php echo _("Logout")?></a>
|
||||
</li>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="jquery_jplayer_1" class="jp-jplayer" style="width:0px; height:0px;"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue