Merge branch 'devel' of dev.sourcefabric.org:airtime into devel

This commit is contained in:
Martin Konecny 2012-05-20 22:49:05 -04:00
commit f4d0c1f9e6
4 changed files with 82 additions and 73 deletions

View file

@ -7,8 +7,7 @@ class Application_Form_GeneralPreferences extends Zend_Form_SubForm
public function init() public function init()
{ {
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true; $isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
$this->isSaas = $isSaas; $this->isSaas = $isSaas;
Logging::log($this->isSaas==true?"true":"false");
$this->setDecorators(array( $this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences_general.phtml', "isSaas" => $isSaas)) array('ViewScript', array('viewScript' => 'form/preferences_general.phtml', "isSaas" => $isSaas))

View file

@ -2,7 +2,7 @@
class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
{ {
public function init() public function init()
{ {
$defaultFade = Application_Model_Preference::GetDefaultTransitionFade(); $defaultFade = Application_Model_Preference::GetDefaultTransitionFade();
@ -85,6 +85,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
$m_mount = Application_Model_StreamSetting::GetMasterLiveSteamMountPoint(); $m_mount = Application_Model_StreamSetting::GetMasterLiveSteamMountPoint();
$l_port = Application_Model_StreamSetting::GetDJLiveSteamPort(); $l_port = Application_Model_StreamSetting::GetDJLiveSteamPort();
$l_mount = Application_Model_StreamSetting::GetDJLiveSteamMountPoint(); $l_mount = Application_Model_StreamSetting::GetDJLiveSteamMountPoint();
$isSaas = Application_Model_Preference::GetPlanLevel() == 'disabled'?false:true;
$master_dj_connection_url = Application_Model_Preference::GetMasterDJSourceConnectionURL(); $master_dj_connection_url = Application_Model_Preference::GetMasterDJSourceConnectionURL();
$live_dj_connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL(); $live_dj_connection_url = Application_Model_Preference::GetLiveDJSourceConnectionURL();
@ -100,7 +101,7 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
} }
$this->setDecorators(array( $this->setDecorators(array(
array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url)) array('ViewScript', array('viewScript' => 'form/preferences_livestream.phtml', 'master_dj_connection_url'=>$master_dj_connection_url, 'live_dj_connection_url'=>$live_dj_connection_url, 'isSaas' => $isSaas))
)); ));
} }
@ -149,4 +150,4 @@ class Application_Form_LiveStreamingPreferences extends Zend_Form_SubForm
return $isValid; return $isValid;
} }
} }

View file

@ -1764,7 +1764,6 @@ class Application_Model_Show {
for( $i = 0; $i < $numberOfRows; ++$i ){ for( $i = 0; $i < $numberOfRows; ++$i ){
//Find the show that is within the current time. //Find the show that is within the current time.
$rows[$i]['type'] = 'show';
if ((strtotime($rows[$i]['starts']) <= $timeNowAsMillis) && (strtotime($rows[$i]['ends']) >= $timeNowAsMillis)){ if ((strtotime($rows[$i]['starts']) <= $timeNowAsMillis) && (strtotime($rows[$i]['ends']) >= $timeNowAsMillis)){
if ( $i - 1 >= 0){ if ( $i - 1 >= 0){
$results['previousShow'][0] = array( $results['previousShow'][0] = array(
@ -1776,7 +1775,7 @@ class Application_Model_Show {
"end_timestamp"=>$rows[$i-1]['end_timestamp'], "end_timestamp"=>$rows[$i-1]['end_timestamp'],
"starts"=>$rows[$i-1]['starts'], "starts"=>$rows[$i-1]['starts'],
"ends"=>$rows[$i-1]['ends'], "ends"=>$rows[$i-1]['ends'],
"type"=>$rows[$i-1]['type']); "type"=>"show");
} }
$results['currentShow'][0] = $rows[$i]; $results['currentShow'][0] = $rows[$i];
@ -1791,7 +1790,7 @@ class Application_Model_Show {
"end_timestamp"=>$rows[$i+1]['end_timestamp'], "end_timestamp"=>$rows[$i+1]['end_timestamp'],
"starts"=>$rows[$i+1]['starts'], "starts"=>$rows[$i+1]['starts'],
"ends"=>$rows[$i+1]['ends'], "ends"=>$rows[$i+1]['ends'],
"type"=>$rows[$i+1]['type']); "type"=>"show");
} }
break; break;
@ -1811,7 +1810,7 @@ class Application_Model_Show {
"end_timestamp"=>$rows[$i]['end_timestamp'], "end_timestamp"=>$rows[$i]['end_timestamp'],
"starts"=>$rows[$i]['starts'], "starts"=>$rows[$i]['starts'],
"ends"=>$rows[$i]['ends'], "ends"=>$rows[$i]['ends'],
"type"=>$rows[$i]['type']); "type"=>"show");
break; break;
} }
} }
@ -1826,7 +1825,7 @@ class Application_Model_Show {
"end_timestamp"=>$rows[$previousShowIndex]['end_timestamp'], "end_timestamp"=>$rows[$previousShowIndex]['end_timestamp'],
"starts"=>$rows[$previousShowIndex]['starts'], "starts"=>$rows[$previousShowIndex]['starts'],
"ends"=>$rows[$previousShowIndex]['ends'], "ends"=>$rows[$previousShowIndex]['ends'],
"type"=>$rows[$previousShowIndex]['type']); "type"=>"show");
} }
return $results; return $results;

View file

@ -1,7 +1,7 @@
<fieldset class="padded stream-setting-global" style="margin-top: 15px"> <fieldset class="padded stream-setting-global" style="margin-top: 15px">
<legend>Input Stream Settings</legend> <legend>Input Stream Settings</legend>
<dl class="zend_form"> <dl class="zend_form">
<dt id="transition_fade-label"> <dt id="transition_fade-label">
<label class="optional" for="transition_fade"><?php echo $this->element->getElement('transition_fade')->getLabel() ?> : <label class="optional" for="transition_fade"><?php echo $this->element->getElement('transition_fade')->getLabel() ?> :
</label> </label>
</dt> </dt>
@ -43,80 +43,90 @@
</ul> </ul>
<?php endif; ?> <?php endif; ?>
</dd> </dd>
<dt id="master_harbor_input_port-label"> <?php if( !$this->isSaas ){?>
<label class="optional" for="master_harbor_input_port"><?php echo $this->element->getElement('master_harbor_input_port')->getLabel() ?> : <dt id="master_harbor_input_port-label">
</label> <label class="optional" for="master_harbor_input_port"><?php echo $this->element->getElement('master_harbor_input_port')->getLabel() ?> :
</dt> </label>
<dd id="master_harbor_input_port-element"> </dt>
<?php echo $this->element->getElement('master_harbor_input_port') ?> <dd id="master_harbor_input_port-element">
<?php if($this->element->getElement('master_harbor_input_port')->hasErrors()) : ?> <?php echo $this->element->getElement('master_harbor_input_port') ?>
<ul class='errors'> <?php if($this->element->getElement('master_harbor_input_port')->hasErrors()) : ?>
<?php foreach($this->element->getElement('master_harbor_input_port')->getMessages() as $error): ?> <ul class='errors'>
<li><?php echo $error; ?></li> <?php foreach($this->element->getElement('master_harbor_input_port')->getMessages() as $error): ?>
<?php endforeach; ?> <li><?php echo $error; ?></li>
</ul> <?php endforeach; ?>
<?php endif; ?> </ul>
</dd> <?php endif; ?>
<dt id="master_harbor_input_mount_point-label"> </dd>
<label class="optional" for="master_harbor_input_mount_point"><?php echo $this->element->getElement('master_harbor_input_mount_point')->getLabel() ?> : <dt id="master_harbor_input_mount_point-label">
</label> <label class="optional" for="master_harbor_input_mount_point"><?php echo $this->element->getElement('master_harbor_input_mount_point')->getLabel() ?> :
</dt> </label>
<dd id="master_harbor_input_mount_point-element"> </dt>
<?php echo $this->element->getElement('master_harbor_input_mount_point') ?> <dd id="master_harbor_input_mount_point-element">
<?php if($this->element->getElement('master_harbor_input_mount_point')->hasErrors()) : ?> <?php echo $this->element->getElement('master_harbor_input_mount_point') ?>
<ul class='errors'> <?php if($this->element->getElement('master_harbor_input_mount_point')->hasErrors()) : ?>
<?php foreach($this->element->getElement('master_harbor_input_mount_point')->getMessages() as $error): ?> <ul class='errors'>
<li><?php echo $error; ?></li> <?php foreach($this->element->getElement('master_harbor_input_mount_point')->getMessages() as $error): ?>
<?php endforeach; ?> <li><?php echo $error; ?></li>
</ul> <?php endforeach; ?>
<?php endif; ?> </ul>
</dd> <?php endif; ?>
</dd>
<?php } ?>
<dt id="master_dj_connection_url-label"> <dt id="master_dj_connection_url-label">
<label class="optional" for="master_dj_connection_url" style="white-space: nowrap">Master Source Connection URL: <label class="optional" for="master_dj_connection_url" style="white-space: nowrap">Master Source Connection URL:
</label> </label>
</dt> </dt>
<dd id="master_dj_connection_url-element"> <dd id="master_dj_connection_url-element">
<span id="stream_url" class="static_text"><?php echo $this->master_dj_connection_url ?></span> <a href=# id="connection_url_override" style="font-size: 12px;">override</a>&nbsp;&nbsp; <span id="stream_url" class="static_text"><?php echo $this->master_dj_connection_url ?></span>
<span class="override_help_icon"> <?php if( !$this->isSaas ){?>
</span><br> <a href=# id="connection_url_override" style="font-size: 12px;">override</a>&nbsp;&nbsp;
<span class="override_help_icon">
</span><br>
<?php } ?>
<div id="master_dj_connection_url_tb" style="display:none"><input type="text"><a href=# id="ok" style="font-size: 12px;">OK</a> <a href=# id="reset" style="font-size: 12px;">RESET</a></div> <div id="master_dj_connection_url_tb" style="display:none"><input type="text"><a href=# id="ok" style="font-size: 12px;">OK</a> <a href=# id="reset" style="font-size: 12px;">RESET</a></div>
</dd> </dd>
<dt id="dj_harbor_input_port-label"> <?php if( !$this->isSaas ){?>
<label class="optional" for="dj_harbor_input_port"><?php echo $this->element->getElement('dj_harbor_input_port')->getLabel() ?> : <dt id="dj_harbor_input_port-label">
</label> <label class="optional" for="dj_harbor_input_port"><?php echo $this->element->getElement('dj_harbor_input_port')->getLabel() ?> :
</dt> </label>
<dd id="dj_harbor_input_port-element"> </dt>
<?php echo $this->element->getElement('dj_harbor_input_port') ?> <dd id="dj_harbor_input_port-element">
<?php if($this->element->getElement('dj_harbor_input_port')->hasErrors()) : ?> <?php echo $this->element->getElement('dj_harbor_input_port') ?>
<ul class='errors'> <?php if($this->element->getElement('dj_harbor_input_port')->hasErrors()) : ?>
<?php foreach($this->element->getElement('dj_harbor_input_port')->getMessages() as $error): ?> <ul class='errors'>
<li><?php echo $error; ?></li> <?php foreach($this->element->getElement('dj_harbor_input_port')->getMessages() as $error): ?>
<?php endforeach; ?> <li><?php echo $error; ?></li>
</ul> <?php endforeach; ?>
<?php endif; ?> </ul>
</dd> <?php endif; ?>
<dt id="dj_harbor_input_mount_point-label"> </dd>
<label class="optional" for="dj_harbor_input_mount_point"><?php echo $this->element->getElement('dj_harbor_input_mount_point')->getLabel() ?> : <dt id="dj_harbor_input_mount_point-label">
</label> <label class="optional" for="dj_harbor_input_mount_point"><?php echo $this->element->getElement('dj_harbor_input_mount_point')->getLabel() ?> :
</dt> </label>
<dd id="dj_harbor_input_mount_point-element"> </dt>
<?php echo $this->element->getElement('dj_harbor_input_mount_point') ?> <dd id="dj_harbor_input_mount_point-element">
<?php if($this->element->getElement('dj_harbor_input_mount_point')->hasErrors()) : ?> <?php echo $this->element->getElement('dj_harbor_input_mount_point') ?>
<ul class='errors'> <?php if($this->element->getElement('dj_harbor_input_mount_point')->hasErrors()) : ?>
<?php foreach($this->element->getElement('dj_harbor_input_mount_point')->getMessages() as $error): ?> <ul class='errors'>
<li><?php echo $error; ?></li> <?php foreach($this->element->getElement('dj_harbor_input_mount_point')->getMessages() as $error): ?>
<?php endforeach; ?> <li><?php echo $error; ?></li>
</ul> <?php endforeach; ?>
<?php endif; ?> </ul>
</dd> <?php endif; ?>
</dd>
<?php } ?>
<dt id="live_dj_connection_url-label"> <dt id="live_dj_connection_url-label">
<label class="optional" for="live_dj_connection_url" style="white-space: nowrap">Show Source Connection URL: <label class="optional" for="live_dj_connection_url" style="white-space: nowrap">Show Source Connection URL:
</label> </label>
</dt> </dt>
<dd id="live_dj_connection_url-element"> <dd id="live_dj_connection_url-element">
<span id="stream_url" class="static_text"><?php echo $this->live_dj_connection_url ?></span> <a href=# id="connection_url_override" style="font-size: 12px;">override</a>&nbsp;&nbsp; <span id="stream_url" class="static_text"><?php echo $this->live_dj_connection_url ?></span>
<span class="override_help_icon"> <?php if( !$this->isSaas ){?>
</span><br> <a href=# id="connection_url_override" style="font-size: 12px;">override</a>&nbsp;&nbsp;
<span class="override_help_icon">
</span><br>
<?php } ?>
<div id="live_dj_connection_url_tb" style="display:none"><input type="text"><a href=# id="ok" style="font-size: 12px;">OK</a> <a href=# id="reset" style="font-size: 12px;">RESET</a></div> <div id="live_dj_connection_url_tb" style="display:none"><input type="text"><a href=# id="ok" style="font-size: 12px;">OK</a> <a href=# id="reset" style="font-size: 12px;">RESET</a></div>
</dd> </dd>
</dl> </dl>