Merge pull request #489 from xabispacebiker/reconditioning-interface-personal-block

Reconditioning interface personal block
This commit is contained in:
Lucas Bickel 2018-06-30 11:08:14 +02:00 committed by GitHub
commit cc18596384
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 35 deletions

View File

@ -26,7 +26,8 @@ $pages[] = array(
'uri' => '/', 'uri' => '/',
'resource' => '', 'resource' => '',
'class' => '<i class="icon-globe icon-white"></i>', 'class' => '<i class="icon-globe icon-white"></i>',
'pages' => array() 'pages' => array(),
'visible' => false
); );
$pages[] = array( $pages[] = array(
'label' => _('Calendar'), 'label' => _('Calendar'),
@ -77,26 +78,28 @@ $pages[] = array(
array( array(
'label' => _('General'), 'label' => _('General'),
'module' => 'default', 'module' => 'default',
'controller' => 'preference' 'controller' => 'preference',
'resource' => 'preference'
), ),
array( array(
'label' => _('My Profile'), 'label' => _('My Profile'),
'controller' => 'user', 'controller' => 'user',
'action' => 'edit-user', 'action' => 'edit-user',
'resource' => 'user' 'resource' => 'usersettings'
), ),
array( array(
'label' => _('Users'), 'label' => _('Users'),
'module' => 'default', 'module' => 'default',
'controller' => 'user', 'controller' => 'user',
'action' => 'add-user', 'action' => 'add-user',
'resource' => 'user' 'resource' => 'user'
), ),
array( array(
'label' => _('Streams'), 'label' => _('Streams'),
'module' => 'default', 'module' => 'default',
'controller' => 'preference', 'controller' => 'preference',
'action' => 'stream-setting' 'action' => 'stream-setting',
'resource' => 'preference'
), ),
array( array(
'label' => _('Status'), 'label' => _('Status'),
@ -220,4 +223,4 @@ $container = new Zend_Navigation($pages);
$container->id = "nav"; $container->id = "nav";
//store it in the registry: //store it in the registry:
Zend_Registry::set('Zend_Navigation', $container); Zend_Registry::set('Zend_Navigation', $container);

View File

@ -92,6 +92,14 @@ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
<div id="nav"> <div id="nav">
<?php echo $this->navigation()->menu(); ?> <?php echo $this->navigation()->menu(); ?>
</div> </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> <script>
<?php <?php

View File

@ -1,5 +1,18 @@
<ol class="navigation"> <ol class="navigation">
<?php foreach ($this->container as $page) : ?> <?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)) : ?> <?php if($this->navigation()->accept($page)) : ?>
<li class="top <?php if($page->isActive(true)){echo 'active';} ?>"> <li class="top <?php if($page->isActive(true)){echo 'active';} ?>">
<?php if($page->hasPages()) : ?> <?php if($page->hasPages()) : ?>
@ -29,4 +42,4 @@
</li> </li>
<?php endif; ?> <?php endif; ?>
<?php endforeach; ?> <?php endforeach; ?>
</ol> </ol>

View File

@ -1,5 +1,7 @@
<div id="master-panel"> <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="now-playing-block">
<div class="text-row"><strong><?php echo _("Previous:"); ?></strong> <span id='previous'></span> <span id='prev-length'></span></div> <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"> <div class="now-playing-info song">
@ -54,14 +56,6 @@
<li class="time" id="time"></li> <li class="time" id="time"></li>
<li class="time-zone"><span id="time-zone"></span></li> <li class="time-zone"><span id="time-zone"></span></li>
</ul> </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> </div>
<div id="jquery_jplayer_1" class="jp-jplayer" style="width:0px; height:0px;"></div> <div id="jquery_jplayer_1" class="jp-jplayer" style="width:0px; height:0px;"></div>

View File

@ -88,21 +88,26 @@ select {
background-color: #242424; background-color: #242424;
} }
/* Fix for Firefox */ div.logo-container
.logo { {
position: absolute; position: absolute;
float: left; width: 150px;
left: 26px; height: 100px;
top: 30px; text-align: center;
width: 100px; }
height: 42px; img.logo
{
max-width: 100%;
max-height: 100%;
padding: 1em;
box-sizing: border-box;
} }
/* Version Notification Starts*/ /* Version Notification Starts*/
#version-icon { #version-icon {
position:absolute; position:absolute;
top:68px; top:68px;
right: 196px; right: 10px;
height:35px; height:35px;
width:35px; width:35px;
z-index:1000; z-index:1000;
@ -391,16 +396,7 @@ select {
padding:0 12px 0 0; padding:0 12px 0 0;
background:url(images/masterpanel_spacer.png) no-repeat right 0; background:url(images/masterpanel_spacer.png) no-repeat right 0;
} }
.time-info-block {
-webkit-flex: 0 150px;
-moz-flex: 0 150px;
-ms-flex: 0 150px;
-o-flex: 0 150px;
flex: 0 150px;
/*position: absolute;*/
/*top: 0;*/
/*right: 0;*/
}
ol.navigation { ol.navigation {
padding: 0; padding: 0;
margin: 0; margin: 0;