CC-3452: Live Stream: DJs assigned to the show and Program Managers should be
able to control switches and able to kick out connection - refactoring code
This commit is contained in:
parent
04c2c2f920
commit
559acfd5a1
|
@ -13,11 +13,10 @@
|
|||
<?php echo $this->versionNotify();
|
||||
$sss = $this->SourceSwitchStatus();
|
||||
$scs = $this->SourceConnectionStatus();
|
||||
$isPermissionAllowed = $this->IsPermissionAllowed();
|
||||
?>
|
||||
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
||||
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
|
||||
"scheduled_play_switch"=>$sss['scheduled_play'], "isPermissionAllowed"=>$isPermissionAllowed)) ?>
|
||||
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
|
||||
|
||||
<?php $partial = array('menu.phtml', 'default');
|
||||
$this->navigation()->menu()->setPartial($partial); ?>
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
<?php echo $this->versionNotify();
|
||||
$sss = $this->SourceSwitchStatus();
|
||||
$scs = $this->SourceConnectionStatus();
|
||||
$isPermissionAllowed = $this->IsPermissionAllowed();
|
||||
?>
|
||||
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
||||
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
|
||||
"scheduled_play_switch"=>$sss['scheduled_play'], "isPermissionAllowed"=>$isPermissionAllowed)) ?>
|
||||
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
|
||||
<?php $partial = array('menu.phtml', 'default');
|
||||
$this->navigation()->menu()->setPartial($partial); ?>
|
||||
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
<?php echo $this->versionNotify();
|
||||
$sss = $this->SourceSwitchStatus();
|
||||
$scs = $this->SourceConnectionStatus();
|
||||
$isPermissionAllowed = $this->IsPermissionAllowed();
|
||||
?>
|
||||
<?php echo $this->partial('partialviews/header.phtml', array("user" => $this->loggedInAs(), "is_trial"=>$this->isTrial(), "trial_remain"=> $this->trialRemaining(),
|
||||
"live_dj_switch"=>$sss['live_dj'], "live_dj_connection"=>$scs['live_dj'], "master_dj_switch"=>$sss['master_dj'], "master_dj_connection"=>$scs['master_dj'],
|
||||
"scheduled_play_switch"=>$sss['scheduled_play'], "isPermissionAllowed"=>$isPermissionAllowed)) ?>
|
||||
"scheduled_play_switch"=>$sss['scheduled_play'])) ?>
|
||||
|
||||
<?php $partial = array('menu.phtml', 'default');
|
||||
$this->navigation()->menu()->setPartial($partial); ?>
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
class Airtime_View_Helper_IsPermissionAllowed extends Zend_View_Helper_Abstract
|
||||
{
|
||||
public function IsPermissionAllowed()
|
||||
{
|
||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||
$user = new Application_Model_User($userInfo->id);
|
||||
|
||||
$show = Application_Model_Show::GetCurrentShow();
|
||||
$show_id = isset($show['id'])?$show['id']:0;
|
||||
if($user->canSchedule($show_id)){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue