CC-1985 : Automatic rebroadcast of recorded content
added url column to cc_shows table, logic to show/hide form components for rebroadcast
This commit is contained in:
parent
20f3c49dcb
commit
e3e8f10021
16 changed files with 529 additions and 60 deletions
|
@ -64,8 +64,7 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$formRepeats->removeDecorator('DtDdWrapper');
|
$formRepeats->removeDecorator('DtDdWrapper');
|
||||||
$formStyle->removeDecorator('DtDdWrapper');
|
$formStyle->removeDecorator('DtDdWrapper');
|
||||||
$formRecord->removeDecorator('DtDdWrapper');
|
$formRecord->removeDecorator('DtDdWrapper');
|
||||||
$formAbsoluteRebroadcast->removeDecorator('DtDdWrapper');
|
|
||||||
$formRebroadcast->removeDecorator('DtDdWrapper');
|
|
||||||
|
|
||||||
$this->view->what = $formWhat;
|
$this->view->what = $formWhat;
|
||||||
$this->view->when = $formWhen;
|
$this->view->when = $formWhen;
|
||||||
|
@ -368,6 +367,7 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$this->view->rr = $formRecord;
|
$this->view->rr = $formRecord;
|
||||||
$this->view->absoluteRebroadcast = $formAbsoluteRebroadcast;
|
$this->view->absoluteRebroadcast = $formAbsoluteRebroadcast;
|
||||||
$this->view->rebroadcast = $formRebroadcast;
|
$this->view->rebroadcast = $formRebroadcast;
|
||||||
|
|
||||||
$what = $formWhat->isValid($data);
|
$what = $formWhat->isValid($data);
|
||||||
$when = $formWhen->isValid($data);
|
$when = $formWhen->isValid($data);
|
||||||
if($when) {
|
if($when) {
|
||||||
|
@ -386,8 +386,11 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
|
|
||||||
$who = $formWho->isValid($data);
|
$who = $formWho->isValid($data);
|
||||||
$style = $formStyle->isValid($data);
|
$style = $formStyle->isValid($data);
|
||||||
|
$record = $formRecord->isValid($data);
|
||||||
|
$rebroadAb = $formAbsoluteRebroadcast->isValid($data);
|
||||||
|
$rebroad = $formRebroadcast->isValid($data);
|
||||||
|
|
||||||
if ($what && $when && $repeats && $who && $style) {
|
if ($what && $when && $repeats && $who && $style && $record && $rebroadAb && $rebroad) {
|
||||||
|
|
||||||
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
$userInfo = Zend_Auth::getInstance()->getStorage()->read();
|
||||||
$user = new User($userInfo->id);
|
$user = new User($userInfo->id);
|
||||||
|
@ -405,6 +408,9 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$formRepeats->reset();
|
$formRepeats->reset();
|
||||||
$formRepeats->populate(array('add_show_end_date' => date("Y-m-d")));
|
$formRepeats->populate(array('add_show_end_date' => date("Y-m-d")));
|
||||||
$formStyle->reset();
|
$formStyle->reset();
|
||||||
|
$formRecord->reset();
|
||||||
|
$formAbsoluteRebroadcast->reset();
|
||||||
|
$formRebroadcast->reset();
|
||||||
|
|
||||||
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
$this->view->newForm = $this->view->render('schedule/add-show-form.phtml');
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,31 +5,177 @@ class Application_Form_AddShowAbsoluteRebroadcastDates extends Zend_Form_SubForm
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
|
//$this->setDisableLoadDefaultDecorators(true);
|
||||||
|
|
||||||
|
$this->setDecorators(array(
|
||||||
|
array('ViewScript', array('viewScript' => 'form/add-show-rebroadcast-absolute.phtml'))
|
||||||
|
));
|
||||||
|
|
||||||
// Add start date element
|
// Add start date element
|
||||||
$this->addElement('text', 'add_show_rebroadcast_absolute_date_1', array(
|
$this->addElement('text', 'add_show_rebroadcast_absolute_date_1', array(
|
||||||
'label' => 'Rebroadcast Date:',
|
'label' => 'Rebroadcast Date:',
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'value' => date("Y-m-d"),
|
'value' => '',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(
|
'validators' => array(
|
||||||
'NotEmpty',
|
'NotEmpty',
|
||||||
array('date', false, array('YYYY-MM-DD'))
|
array('date', false, array('YYYY-MM-DD'))
|
||||||
)
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
|
||||||
// Add start time element
|
// Add start time element
|
||||||
$this->addElement('text', 'add_show_rebroadcast_absolute_time_1', array(
|
$this->addElement('text', 'add_show_rebroadcast_absolute_time_1', array(
|
||||||
'label' => 'Rebroadcast Time:',
|
'label' => 'Rebroadcast Time:',
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'value' => '0:00',
|
'value' => '',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(
|
'validators' => array(
|
||||||
'NotEmpty',
|
'NotEmpty',
|
||||||
array('date', false, array('HH:mm'))
|
array('date', false, array('HH:mm'))
|
||||||
)
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// Add start date element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_absolute_date_2', array(
|
||||||
|
'label' => 'Rebroadcast Date:',
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('YYYY-MM-DD'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
// Add start time element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_absolute_time_2', array(
|
||||||
|
'label' => 'Rebroadcast Time:',
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('HH:mm'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Add start date element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_absolute_date_3', array(
|
||||||
|
'label' => 'Rebroadcast Date:',
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('YYYY-MM-DD'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
// Add start time element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_absolute_time_3', array(
|
||||||
|
'label' => 'Rebroadcast Time:',
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('HH:mm'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Add start date element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_absolute_date_4', array(
|
||||||
|
'label' => 'Rebroadcast Date:',
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('YYYY-MM-DD'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
// Add start time element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_absolute_time_4', array(
|
||||||
|
'label' => 'Rebroadcast Time:',
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('HH:mm'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Add start date element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_absolute_date_5', array(
|
||||||
|
'label' => 'Rebroadcast Date:',
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('YYYY-MM-DD'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
|
||||||
|
// Add start time element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_absolute_time_5', array(
|
||||||
|
'label' => 'Rebroadcast Time:',
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('HH:mm'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -5,33 +5,164 @@ class Application_Form_AddShowRebroadcastDates extends Zend_Form_SubForm
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
//Add type select
|
$this->setDecorators(array(
|
||||||
|
array('ViewScript', array('viewScript' => 'form/add-show-rebroadcast.phtml'))
|
||||||
|
));
|
||||||
|
|
||||||
|
//Add date select
|
||||||
$this->addElement('select', 'add_show_rebroadcast_date_1', array(
|
$this->addElement('select', 'add_show_rebroadcast_date_1', array(
|
||||||
'label' => 'Rebroadcast Day:',
|
'required' => false,
|
||||||
'required' => true,
|
|
||||||
'class' => ' input_select',
|
'class' => ' input_select',
|
||||||
'multiOptions' => array(
|
'multiOptions' => array(
|
||||||
"0 days" => "+0 days ",
|
"" => "",
|
||||||
"1 day" => "+1 day ",
|
"0 days" => "+0 days",
|
||||||
|
"1 day" => "+1 day",
|
||||||
"2 days" => "+2 days",
|
"2 days" => "+2 days",
|
||||||
"3 days" => "+3 days"
|
"3 days" => "+3 days"
|
||||||
),
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
));
|
));
|
||||||
|
|
||||||
// Add start time element
|
// Add start time element
|
||||||
$this->addElement('text', 'add_show_start_time_1', array(
|
$this->addElement('text', 'add_show_rebroadcast_time_1', array(
|
||||||
'label' => 'Rebroadcast Time:',
|
|
||||||
'class' => 'input_text',
|
'class' => 'input_text',
|
||||||
'required' => true,
|
'required' => false,
|
||||||
'value' => '0:00',
|
'value' => '',
|
||||||
'filters' => array('StringTrim'),
|
'filters' => array('StringTrim'),
|
||||||
'validators' => array(
|
'validators' => array(
|
||||||
'NotEmpty',
|
'NotEmpty',
|
||||||
array('date', false, array('HH:mm'))
|
array('date', false, array('HH:mm'))
|
||||||
)
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
//Add date select
|
||||||
|
$this->addElement('select', 'add_show_rebroadcast_date_2', array(
|
||||||
|
'required' => false,
|
||||||
|
'class' => ' input_select',
|
||||||
|
'multiOptions' => array(
|
||||||
|
"" => "",
|
||||||
|
"0 days" => "+0 days",
|
||||||
|
"1 day" => "+1 day",
|
||||||
|
"2 days" => "+2 days",
|
||||||
|
"3 days" => "+3 days"
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Add start time element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_time_2', array(
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('HH:mm'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
//Add date select
|
||||||
|
$this->addElement('select', 'add_show_rebroadcast_date_3', array(
|
||||||
|
'required' => false,
|
||||||
|
'class' => ' input_select',
|
||||||
|
'multiOptions' => array(
|
||||||
|
"" => "",
|
||||||
|
"0 days" => "+0 days",
|
||||||
|
"1 day" => "+1 day",
|
||||||
|
"2 days" => "+2 days",
|
||||||
|
"3 days" => "+3 days"
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Add start time element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_time_3', array(
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('HH:mm'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
//Add date select
|
||||||
|
$this->addElement('select', 'add_show_rebroadcast_date_4', array(
|
||||||
|
'required' => false,
|
||||||
|
'class' => ' input_select',
|
||||||
|
'multiOptions' => array(
|
||||||
|
"" => "",
|
||||||
|
"0 days" => "+0 days",
|
||||||
|
"1 day" => "+1 day",
|
||||||
|
"2 days" => "+2 days",
|
||||||
|
"3 days" => "+3 days"
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Add start time element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_time_4', array(
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('HH:mm'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
//Add date select
|
||||||
|
$this->addElement('select', 'add_show_rebroadcast_date_5', array(
|
||||||
|
'required' => false,
|
||||||
|
'class' => ' input_select',
|
||||||
|
'multiOptions' => array(
|
||||||
|
"" => "",
|
||||||
|
"0 days" => "+0 days",
|
||||||
|
"1 day" => "+1 day",
|
||||||
|
"2 days" => "+2 days",
|
||||||
|
"3 days" => "+3 days"
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
|
));
|
||||||
|
|
||||||
|
// Add start time element
|
||||||
|
$this->addElement('text', 'add_show_rebroadcast_time_5', array(
|
||||||
|
'class' => 'input_text',
|
||||||
|
'required' => false,
|
||||||
|
'value' => '',
|
||||||
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array(
|
||||||
|
'NotEmpty',
|
||||||
|
array('date', false, array('HH:mm'))
|
||||||
|
),
|
||||||
|
'decorators' => array(
|
||||||
|
'ViewHelper'
|
||||||
|
)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,14 @@ class Application_Form_AddShowWhat extends Zend_Form_SubForm
|
||||||
'validators' => array('NotEmpty')
|
'validators' => array('NotEmpty')
|
||||||
));
|
));
|
||||||
|
|
||||||
$nameInput = $this->getElement('add_show_name');
|
// Add URL element
|
||||||
|
$this->addElement('text', 'add_show_url', array(
|
||||||
$nameInput->setDecorators(array(array('ViewScript', array(
|
'label' => 'Show URL:',
|
||||||
'viewScript' => 'form/add-show-block.phtml',
|
'class' => 'input_text',
|
||||||
'class' => 'block-display'
|
'required' => false,
|
||||||
))));
|
'filters' => array('StringTrim'),
|
||||||
|
'validators' => array('NotEmpty')
|
||||||
|
));
|
||||||
|
|
||||||
// Add the description element
|
// Add the description element
|
||||||
$this->addElement('textarea', 'add_show_description', array(
|
$this->addElement('textarea', 'add_show_description', array(
|
||||||
|
|
|
@ -5,6 +5,10 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
|
||||||
|
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//$this->setDisableLoadDefaultDecorators(true);
|
||||||
|
//$this->removeDecorator('DtDdWrapper');
|
||||||
|
|
||||||
// Add start date element
|
// Add start date element
|
||||||
$this->addElement('text', 'add_show_start_date', array(
|
$this->addElement('text', 'add_show_start_date', array(
|
||||||
'label' => 'Date Start:',
|
'label' => 'Date Start:',
|
||||||
|
|
|
@ -111,6 +111,7 @@ class Show {
|
||||||
$show = new CcShow();
|
$show = new CcShow();
|
||||||
$show->setDbName($data['add_show_name']);
|
$show->setDbName($data['add_show_name']);
|
||||||
$show->setDbDescription($data['add_show_description']);
|
$show->setDbDescription($data['add_show_description']);
|
||||||
|
$show->setDbUrl($data['add_show_url']);
|
||||||
$show->setDbColor($data['add_show_color']);
|
$show->setDbColor($data['add_show_color']);
|
||||||
$show->setDbBackgroundColor($data['add_show_background_color']);
|
$show->setDbBackgroundColor($data['add_show_background_color']);
|
||||||
$show->save();
|
$show->save();
|
||||||
|
@ -174,7 +175,7 @@ class Show {
|
||||||
}
|
}
|
||||||
|
|
||||||
//adding rows to cc_show_rebroadcast
|
//adding rows to cc_show_rebroadcast
|
||||||
if($repeat_type != -1) {
|
if($data['add_show_record'] && $data['add_show_rebroadcast'] && $repeat_type != -1) {
|
||||||
|
|
||||||
for($i=1; $i<=1; $i++) {
|
for($i=1; $i<=1; $i++) {
|
||||||
|
|
||||||
|
@ -185,9 +186,9 @@ class Show {
|
||||||
$showRebroad->save();
|
$showRebroad->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else if($data['add_show_record'] && $data['add_show_rebroadcast'] && $repeat_type == -1){
|
||||||
|
|
||||||
for($i=1; $i<=1; $i++) {
|
for($i=1; $i<=5; $i++) {
|
||||||
|
|
||||||
if($data['add_show_rebroadcast_absolute_date_'.$i]) {
|
if($data['add_show_rebroadcast_absolute_date_'.$i]) {
|
||||||
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ class CcShowTableMap extends TableMap {
|
||||||
// columns
|
// columns
|
||||||
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
$this->addPrimaryKey('ID', 'DbId', 'INTEGER', true, null, null);
|
||||||
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
|
$this->addColumn('NAME', 'DbName', 'VARCHAR', true, 255, '');
|
||||||
|
$this->addColumn('URL', 'DbUrl', 'VARCHAR', false, 255, '');
|
||||||
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
|
$this->addColumn('DESCRIPTION', 'DbDescription', 'VARCHAR', false, 512, null);
|
||||||
$this->addColumn('COLOR', 'DbColor', 'VARCHAR', false, 6, null);
|
$this->addColumn('COLOR', 'DbColor', 'VARCHAR', false, 6, null);
|
||||||
$this->addColumn('BACKGROUND_COLOR', 'DbBackgroundColor', 'VARCHAR', false, 6, null);
|
$this->addColumn('BACKGROUND_COLOR', 'DbBackgroundColor', 'VARCHAR', false, 6, null);
|
||||||
|
|
|
@ -37,6 +37,13 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
*/
|
*/
|
||||||
protected $name;
|
protected $name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the url field.
|
||||||
|
* Note: this column has a database default value of: ''
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $url;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the description field.
|
* The value for the description field.
|
||||||
* @var string
|
* @var string
|
||||||
|
@ -98,6 +105,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
public function applyDefaultValues()
|
public function applyDefaultValues()
|
||||||
{
|
{
|
||||||
$this->name = '';
|
$this->name = '';
|
||||||
|
$this->url = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -130,6 +138,16 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [url] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getDbUrl()
|
||||||
|
{
|
||||||
|
return $this->url;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [description] column value.
|
* Get the [description] column value.
|
||||||
*
|
*
|
||||||
|
@ -200,6 +218,26 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
return $this;
|
return $this;
|
||||||
} // setDbName()
|
} // setDbName()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [url] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return CcShow The current object (for fluent API support)
|
||||||
|
*/
|
||||||
|
public function setDbUrl($v)
|
||||||
|
{
|
||||||
|
if ($v !== null) {
|
||||||
|
$v = (string) $v;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->url !== $v || $this->isNew()) {
|
||||||
|
$this->url = $v;
|
||||||
|
$this->modifiedColumns[] = CcShowPeer::URL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
} // setDbUrl()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [description] column.
|
* Set the value of [description] column.
|
||||||
*
|
*
|
||||||
|
@ -274,6 +312,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->url !== '') {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// otherwise, everything was equal, so return TRUE
|
// otherwise, everything was equal, so return TRUE
|
||||||
return true;
|
return true;
|
||||||
} // hasOnlyDefaultValues()
|
} // hasOnlyDefaultValues()
|
||||||
|
@ -298,9 +340,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
|
|
||||||
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
|
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
|
||||||
$this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
|
$this->name = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
|
||||||
$this->description = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
$this->url = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
|
||||||
$this->color = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
|
$this->description = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
|
||||||
$this->background_color = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
|
$this->color = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
|
||||||
|
$this->background_color = ($row[$startcol + 5] !== null) ? (string) $row[$startcol + 5] : null;
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
|
@ -309,7 +352,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
$this->ensureConsistency();
|
$this->ensureConsistency();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $startcol + 5; // 5 = CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS).
|
return $startcol + 6; // 6 = CcShowPeer::NUM_COLUMNS - CcShowPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating CcShow object", $e);
|
throw new PropelException("Error populating CcShow object", $e);
|
||||||
|
@ -687,12 +730,15 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
return $this->getDbName();
|
return $this->getDbName();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
return $this->getDbDescription();
|
return $this->getDbUrl();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
return $this->getDbColor();
|
return $this->getDbDescription();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
return $this->getDbColor();
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
return $this->getDbBackgroundColor();
|
return $this->getDbBackgroundColor();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -720,9 +766,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
$result = array(
|
$result = array(
|
||||||
$keys[0] => $this->getDbId(),
|
$keys[0] => $this->getDbId(),
|
||||||
$keys[1] => $this->getDbName(),
|
$keys[1] => $this->getDbName(),
|
||||||
$keys[2] => $this->getDbDescription(),
|
$keys[2] => $this->getDbUrl(),
|
||||||
$keys[3] => $this->getDbColor(),
|
$keys[3] => $this->getDbDescription(),
|
||||||
$keys[4] => $this->getDbBackgroundColor(),
|
$keys[4] => $this->getDbColor(),
|
||||||
|
$keys[5] => $this->getDbBackgroundColor(),
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
@ -761,12 +808,15 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
$this->setDbName($value);
|
$this->setDbName($value);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$this->setDbDescription($value);
|
$this->setDbUrl($value);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$this->setDbColor($value);
|
$this->setDbDescription($value);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
|
$this->setDbColor($value);
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
$this->setDbBackgroundColor($value);
|
$this->setDbBackgroundColor($value);
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
|
@ -795,9 +845,10 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
|
|
||||||
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
|
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
|
||||||
if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]);
|
if (array_key_exists($keys[1], $arr)) $this->setDbName($arr[$keys[1]]);
|
||||||
if (array_key_exists($keys[2], $arr)) $this->setDbDescription($arr[$keys[2]]);
|
if (array_key_exists($keys[2], $arr)) $this->setDbUrl($arr[$keys[2]]);
|
||||||
if (array_key_exists($keys[3], $arr)) $this->setDbColor($arr[$keys[3]]);
|
if (array_key_exists($keys[3], $arr)) $this->setDbDescription($arr[$keys[3]]);
|
||||||
if (array_key_exists($keys[4], $arr)) $this->setDbBackgroundColor($arr[$keys[4]]);
|
if (array_key_exists($keys[4], $arr)) $this->setDbColor($arr[$keys[4]]);
|
||||||
|
if (array_key_exists($keys[5], $arr)) $this->setDbBackgroundColor($arr[$keys[5]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -811,6 +862,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
|
|
||||||
if ($this->isColumnModified(CcShowPeer::ID)) $criteria->add(CcShowPeer::ID, $this->id);
|
if ($this->isColumnModified(CcShowPeer::ID)) $criteria->add(CcShowPeer::ID, $this->id);
|
||||||
if ($this->isColumnModified(CcShowPeer::NAME)) $criteria->add(CcShowPeer::NAME, $this->name);
|
if ($this->isColumnModified(CcShowPeer::NAME)) $criteria->add(CcShowPeer::NAME, $this->name);
|
||||||
|
if ($this->isColumnModified(CcShowPeer::URL)) $criteria->add(CcShowPeer::URL, $this->url);
|
||||||
if ($this->isColumnModified(CcShowPeer::DESCRIPTION)) $criteria->add(CcShowPeer::DESCRIPTION, $this->description);
|
if ($this->isColumnModified(CcShowPeer::DESCRIPTION)) $criteria->add(CcShowPeer::DESCRIPTION, $this->description);
|
||||||
if ($this->isColumnModified(CcShowPeer::COLOR)) $criteria->add(CcShowPeer::COLOR, $this->color);
|
if ($this->isColumnModified(CcShowPeer::COLOR)) $criteria->add(CcShowPeer::COLOR, $this->color);
|
||||||
if ($this->isColumnModified(CcShowPeer::BACKGROUND_COLOR)) $criteria->add(CcShowPeer::BACKGROUND_COLOR, $this->background_color);
|
if ($this->isColumnModified(CcShowPeer::BACKGROUND_COLOR)) $criteria->add(CcShowPeer::BACKGROUND_COLOR, $this->background_color);
|
||||||
|
@ -876,6 +928,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
public function copyInto($copyObj, $deepCopy = false)
|
public function copyInto($copyObj, $deepCopy = false)
|
||||||
{
|
{
|
||||||
$copyObj->setDbName($this->name);
|
$copyObj->setDbName($this->name);
|
||||||
|
$copyObj->setDbUrl($this->url);
|
||||||
$copyObj->setDbDescription($this->description);
|
$copyObj->setDbDescription($this->description);
|
||||||
$copyObj->setDbColor($this->color);
|
$copyObj->setDbColor($this->color);
|
||||||
$copyObj->setDbBackgroundColor($this->background_color);
|
$copyObj->setDbBackgroundColor($this->background_color);
|
||||||
|
@ -1472,6 +1525,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
|
||||||
{
|
{
|
||||||
$this->id = null;
|
$this->id = null;
|
||||||
$this->name = null;
|
$this->name = null;
|
||||||
|
$this->url = null;
|
||||||
$this->description = null;
|
$this->description = null;
|
||||||
$this->color = null;
|
$this->color = null;
|
||||||
$this->background_color = null;
|
$this->background_color = null;
|
||||||
|
|
|
@ -26,7 +26,7 @@ abstract class BaseCcShowPeer {
|
||||||
const TM_CLASS = 'CcShowTableMap';
|
const TM_CLASS = 'CcShowTableMap';
|
||||||
|
|
||||||
/** The total number of columns. */
|
/** The total number of columns. */
|
||||||
const NUM_COLUMNS = 5;
|
const NUM_COLUMNS = 6;
|
||||||
|
|
||||||
/** The number of lazy-loaded columns. */
|
/** The number of lazy-loaded columns. */
|
||||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
@ -37,6 +37,9 @@ abstract class BaseCcShowPeer {
|
||||||
/** the column name for the NAME field */
|
/** the column name for the NAME field */
|
||||||
const NAME = 'cc_show.NAME';
|
const NAME = 'cc_show.NAME';
|
||||||
|
|
||||||
|
/** the column name for the URL field */
|
||||||
|
const URL = 'cc_show.URL';
|
||||||
|
|
||||||
/** the column name for the DESCRIPTION field */
|
/** the column name for the DESCRIPTION field */
|
||||||
const DESCRIPTION = 'cc_show.DESCRIPTION';
|
const DESCRIPTION = 'cc_show.DESCRIPTION';
|
||||||
|
|
||||||
|
@ -62,12 +65,12 @@ abstract class BaseCcShowPeer {
|
||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
private static $fieldNames = array (
|
private static $fieldNames = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbDescription', 'DbColor', 'DbBackgroundColor', ),
|
BasePeer::TYPE_PHPNAME => array ('DbId', 'DbName', 'DbUrl', 'DbDescription', 'DbColor', 'DbBackgroundColor', ),
|
||||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbDescription', 'dbColor', 'dbBackgroundColor', ),
|
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId', 'dbName', 'dbUrl', 'dbDescription', 'dbColor', 'dbBackgroundColor', ),
|
||||||
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::DESCRIPTION, self::COLOR, self::BACKGROUND_COLOR, ),
|
BasePeer::TYPE_COLNAME => array (self::ID, self::NAME, self::URL, self::DESCRIPTION, self::COLOR, self::BACKGROUND_COLOR, ),
|
||||||
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', ),
|
BasePeer::TYPE_RAW_COLNAME => array ('ID', 'NAME', 'URL', 'DESCRIPTION', 'COLOR', 'BACKGROUND_COLOR', ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'description', 'color', 'background_color', ),
|
BasePeer::TYPE_FIELDNAME => array ('id', 'name', 'url', 'description', 'color', 'background_color', ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -77,12 +80,12 @@ abstract class BaseCcShowPeer {
|
||||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
private static $fieldKeys = array (
|
private static $fieldKeys = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbDescription' => 2, 'DbColor' => 3, 'DbBackgroundColor' => 4, ),
|
BasePeer::TYPE_PHPNAME => array ('DbId' => 0, 'DbName' => 1, 'DbUrl' => 2, 'DbDescription' => 3, 'DbColor' => 4, 'DbBackgroundColor' => 5, ),
|
||||||
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbDescription' => 2, 'dbColor' => 3, 'dbBackgroundColor' => 4, ),
|
BasePeer::TYPE_STUDLYPHPNAME => array ('dbId' => 0, 'dbName' => 1, 'dbUrl' => 2, 'dbDescription' => 3, 'dbColor' => 4, 'dbBackgroundColor' => 5, ),
|
||||||
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::DESCRIPTION => 2, self::COLOR => 3, self::BACKGROUND_COLOR => 4, ),
|
BasePeer::TYPE_COLNAME => array (self::ID => 0, self::NAME => 1, self::URL => 2, self::DESCRIPTION => 3, self::COLOR => 4, self::BACKGROUND_COLOR => 5, ),
|
||||||
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'DESCRIPTION' => 2, 'COLOR' => 3, 'BACKGROUND_COLOR' => 4, ),
|
BasePeer::TYPE_RAW_COLNAME => array ('ID' => 0, 'NAME' => 1, 'URL' => 2, 'DESCRIPTION' => 3, 'COLOR' => 4, 'BACKGROUND_COLOR' => 5, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'description' => 2, 'color' => 3, 'background_color' => 4, ),
|
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'name' => 1, 'url' => 2, 'description' => 3, 'color' => 4, 'background_color' => 5, ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -156,12 +159,14 @@ abstract class BaseCcShowPeer {
|
||||||
if (null === $alias) {
|
if (null === $alias) {
|
||||||
$criteria->addSelectColumn(CcShowPeer::ID);
|
$criteria->addSelectColumn(CcShowPeer::ID);
|
||||||
$criteria->addSelectColumn(CcShowPeer::NAME);
|
$criteria->addSelectColumn(CcShowPeer::NAME);
|
||||||
|
$criteria->addSelectColumn(CcShowPeer::URL);
|
||||||
$criteria->addSelectColumn(CcShowPeer::DESCRIPTION);
|
$criteria->addSelectColumn(CcShowPeer::DESCRIPTION);
|
||||||
$criteria->addSelectColumn(CcShowPeer::COLOR);
|
$criteria->addSelectColumn(CcShowPeer::COLOR);
|
||||||
$criteria->addSelectColumn(CcShowPeer::BACKGROUND_COLOR);
|
$criteria->addSelectColumn(CcShowPeer::BACKGROUND_COLOR);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn($alias . '.ID');
|
$criteria->addSelectColumn($alias . '.ID');
|
||||||
$criteria->addSelectColumn($alias . '.NAME');
|
$criteria->addSelectColumn($alias . '.NAME');
|
||||||
|
$criteria->addSelectColumn($alias . '.URL');
|
||||||
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
$criteria->addSelectColumn($alias . '.DESCRIPTION');
|
||||||
$criteria->addSelectColumn($alias . '.COLOR');
|
$criteria->addSelectColumn($alias . '.COLOR');
|
||||||
$criteria->addSelectColumn($alias . '.BACKGROUND_COLOR');
|
$criteria->addSelectColumn($alias . '.BACKGROUND_COLOR');
|
||||||
|
|
|
@ -8,12 +8,14 @@
|
||||||
*
|
*
|
||||||
* @method CcShowQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
* @method CcShowQuery orderByDbId($order = Criteria::ASC) Order by the id column
|
||||||
* @method CcShowQuery orderByDbName($order = Criteria::ASC) Order by the name column
|
* @method CcShowQuery orderByDbName($order = Criteria::ASC) Order by the name column
|
||||||
|
* @method CcShowQuery orderByDbUrl($order = Criteria::ASC) Order by the url column
|
||||||
* @method CcShowQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
* @method CcShowQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
|
||||||
* @method CcShowQuery orderByDbColor($order = Criteria::ASC) Order by the color column
|
* @method CcShowQuery orderByDbColor($order = Criteria::ASC) Order by the color column
|
||||||
* @method CcShowQuery orderByDbBackgroundColor($order = Criteria::ASC) Order by the background_color column
|
* @method CcShowQuery orderByDbBackgroundColor($order = Criteria::ASC) Order by the background_color column
|
||||||
*
|
*
|
||||||
* @method CcShowQuery groupByDbId() Group by the id column
|
* @method CcShowQuery groupByDbId() Group by the id column
|
||||||
* @method CcShowQuery groupByDbName() Group by the name column
|
* @method CcShowQuery groupByDbName() Group by the name column
|
||||||
|
* @method CcShowQuery groupByDbUrl() Group by the url column
|
||||||
* @method CcShowQuery groupByDbDescription() Group by the description column
|
* @method CcShowQuery groupByDbDescription() Group by the description column
|
||||||
* @method CcShowQuery groupByDbColor() Group by the color column
|
* @method CcShowQuery groupByDbColor() Group by the color column
|
||||||
* @method CcShowQuery groupByDbBackgroundColor() Group by the background_color column
|
* @method CcShowQuery groupByDbBackgroundColor() Group by the background_color column
|
||||||
|
@ -43,12 +45,14 @@
|
||||||
*
|
*
|
||||||
* @method CcShow findOneByDbId(int $id) Return the first CcShow filtered by the id column
|
* @method CcShow findOneByDbId(int $id) Return the first CcShow filtered by the id column
|
||||||
* @method CcShow findOneByDbName(string $name) Return the first CcShow filtered by the name column
|
* @method CcShow findOneByDbName(string $name) Return the first CcShow filtered by the name column
|
||||||
|
* @method CcShow findOneByDbUrl(string $url) Return the first CcShow filtered by the url column
|
||||||
* @method CcShow findOneByDbDescription(string $description) Return the first CcShow filtered by the description column
|
* @method CcShow findOneByDbDescription(string $description) Return the first CcShow filtered by the description column
|
||||||
* @method CcShow findOneByDbColor(string $color) Return the first CcShow filtered by the color column
|
* @method CcShow findOneByDbColor(string $color) Return the first CcShow filtered by the color column
|
||||||
* @method CcShow findOneByDbBackgroundColor(string $background_color) Return the first CcShow filtered by the background_color column
|
* @method CcShow findOneByDbBackgroundColor(string $background_color) Return the first CcShow filtered by the background_color column
|
||||||
*
|
*
|
||||||
* @method array findByDbId(int $id) Return CcShow objects filtered by the id column
|
* @method array findByDbId(int $id) Return CcShow objects filtered by the id column
|
||||||
* @method array findByDbName(string $name) Return CcShow objects filtered by the name column
|
* @method array findByDbName(string $name) Return CcShow objects filtered by the name column
|
||||||
|
* @method array findByDbUrl(string $url) Return CcShow objects filtered by the url column
|
||||||
* @method array findByDbDescription(string $description) Return CcShow objects filtered by the description column
|
* @method array findByDbDescription(string $description) Return CcShow objects filtered by the description column
|
||||||
* @method array findByDbColor(string $color) Return CcShow objects filtered by the color column
|
* @method array findByDbColor(string $color) Return CcShow objects filtered by the color column
|
||||||
* @method array findByDbBackgroundColor(string $background_color) Return CcShow objects filtered by the background_color column
|
* @method array findByDbBackgroundColor(string $background_color) Return CcShow objects filtered by the background_color column
|
||||||
|
@ -200,6 +204,28 @@ abstract class BaseCcShowQuery extends ModelCriteria
|
||||||
return $this->addUsingAlias(CcShowPeer::NAME, $dbName, $comparison);
|
return $this->addUsingAlias(CcShowPeer::NAME, $dbName, $comparison);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the query on the url column
|
||||||
|
*
|
||||||
|
* @param string $dbUrl The value to use as filter.
|
||||||
|
* Accepts wildcards (* and % trigger a LIKE)
|
||||||
|
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
|
||||||
|
*
|
||||||
|
* @return CcShowQuery The current query, for fluid interface
|
||||||
|
*/
|
||||||
|
public function filterByDbUrl($dbUrl = null, $comparison = null)
|
||||||
|
{
|
||||||
|
if (null === $comparison) {
|
||||||
|
if (is_array($dbUrl)) {
|
||||||
|
$comparison = Criteria::IN;
|
||||||
|
} elseif (preg_match('/[\%\*]/', $dbUrl)) {
|
||||||
|
$dbUrl = str_replace('*', '%', $dbUrl);
|
||||||
|
$comparison = Criteria::LIKE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $this->addUsingAlias(CcShowPeer::URL, $dbUrl, $comparison);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the query on the description column
|
* Filter the query on the description column
|
||||||
*
|
*
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<fieldset>
|
||||||
|
<dl>
|
||||||
|
<dt id="add_show_hosts_rebroadcast_day-label" class="block-display">
|
||||||
|
<label for="add_show_rebroadcast_day" class="optional">Choose Days:</label>
|
||||||
|
</dt>
|
||||||
|
<dd id="add_show_rebroadcast_day-element" class="block-display clearfix">
|
||||||
|
<ul class="formrow-repeat">
|
||||||
|
<?php for($i=1; $i<=5; $i++): ?>
|
||||||
|
<li>
|
||||||
|
<?php echo $this->element->getElement('add_show_rebroadcast_absolute_date_'.$i) ?>
|
||||||
|
<span class="inline-text">@</span>
|
||||||
|
<?php echo $this->element->getElement('add_show_rebroadcast_absolute_time_'.$i) ?>
|
||||||
|
</li>
|
||||||
|
<?php endfor; ?>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
18
application/views/scripts/form/add-show-rebroadcast.phtml
Normal file
18
application/views/scripts/form/add-show-rebroadcast.phtml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
<fieldset>
|
||||||
|
<dl>
|
||||||
|
<dt id="add_show_hosts_rebroadcast_repeat_day-label" class="block-display">
|
||||||
|
<label for="add_show_rebroadcast_repeat_day" class="optional">Repeat Days:</label>
|
||||||
|
</dt>
|
||||||
|
<dd id="add_show_rebroadcast_repeat_day-element" class="block-display clearfix">
|
||||||
|
<ul class="formrow-repeat">
|
||||||
|
<?php for($i=1; $i<=5; $i++): ?>
|
||||||
|
<li>
|
||||||
|
<?php echo $this->element->getElement('add_show_rebroadcast_date_'.$i) ?>
|
||||||
|
<span class="inline-text">@</span>
|
||||||
|
<?php echo $this->element->getElement('add_show_rebroadcast_time_'.$i) ?>
|
||||||
|
</li>
|
||||||
|
<?php endfor; ?>
|
||||||
|
</ul>
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</fieldset>
|
0
application/views/scripts/form/add-show-what.phtml
Normal file
0
application/views/scripts/form/add-show-what.phtml
Normal file
|
@ -124,6 +124,7 @@
|
||||||
<table name="cc_show" phpName="CcShow">
|
<table name="cc_show" phpName="CcShow">
|
||||||
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
|
<column name="id" phpName="DbId" type="INTEGER" primaryKey="true" autoIncrement="true" required="true"/>
|
||||||
<column name="name" phpName="DbName" type="VARCHAR" size="255" required="true" defaultValue=""/>
|
<column name="name" phpName="DbName" type="VARCHAR" size="255" required="true" defaultValue=""/>
|
||||||
|
<column name="url" phpName="DbUrl" type="VARCHAR" size="255" required="false" defaultValue=""/>
|
||||||
<column name="description" phpName="DbDescription" type="VARCHAR" size="512" required="false"/>
|
<column name="description" phpName="DbDescription" type="VARCHAR" size="512" required="false"/>
|
||||||
<column name="color" phpName="DbColor" type="VARCHAR" size="6" required="false"/>
|
<column name="color" phpName="DbColor" type="VARCHAR" size="6" required="false"/>
|
||||||
<column name="background_color" phpName="DbBackgroundColor" type="VARCHAR" size="6" required="false"/>
|
<column name="background_color" phpName="DbBackgroundColor" type="VARCHAR" size="6" required="false"/>
|
||||||
|
|
|
@ -162,6 +162,7 @@ CREATE TABLE "cc_show"
|
||||||
(
|
(
|
||||||
"id" serial NOT NULL,
|
"id" serial NOT NULL,
|
||||||
"name" VARCHAR(255) default '' NOT NULL,
|
"name" VARCHAR(255) default '' NOT NULL,
|
||||||
|
"url" VARCHAR(255) default '',
|
||||||
"description" VARCHAR(512),
|
"description" VARCHAR(512),
|
||||||
"color" VARCHAR(6),
|
"color" VARCHAR(6),
|
||||||
"background_color" VARCHAR(6),
|
"background_color" VARCHAR(6),
|
||||||
|
|
|
@ -66,8 +66,48 @@ function setAddShowEvents() {
|
||||||
form.find("#schedule-show-when > fieldset:last").hide();
|
form.find("#schedule-show-when > fieldset:last").hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!form.find("#add_show_record").attr('checked')) {
|
||||||
|
form.find("#add_show_rebroadcast").hide();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!form.find("#add_show_rebroadcast").attr('checked')) {
|
||||||
|
form.find("#schedule-record-rebroadcast > fieldset:not(:first-child)").hide();
|
||||||
|
}
|
||||||
|
|
||||||
form.find("#add_show_repeats").click(function(){
|
form.find("#add_show_repeats").click(function(){
|
||||||
|
$(this).blur();
|
||||||
form.find("#schedule-show-when > fieldset:last").toggle();
|
form.find("#schedule-show-when > fieldset:last").toggle();
|
||||||
|
|
||||||
|
//must switch rebroadcast displays
|
||||||
|
if(form.find("#add_show_rebroadcast").attr('checked')) {
|
||||||
|
|
||||||
|
if($(this).attr('checked')){
|
||||||
|
form.find("#schedule-record-rebroadcast > fieldset:eq(1)").hide();
|
||||||
|
form.find("#schedule-record-rebroadcast > fieldset:last").show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
form.find("#schedule-record-rebroadcast > fieldset:eq(1)").show();
|
||||||
|
form.find("#schedule-record-rebroadcast > fieldset:last").hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
form.find("#add_show_record").click(function(){
|
||||||
|
$(this).blur();
|
||||||
|
form.find("#add_show_rebroadcast").toggle();
|
||||||
|
});
|
||||||
|
|
||||||
|
form.find("#add_show_rebroadcast").click(function(){
|
||||||
|
$(this).blur();
|
||||||
|
if($(this).attr('checked') && !form.find("#add_show_repeats").attr('checked')) {
|
||||||
|
form.find("#schedule-record-rebroadcast > fieldset:eq(1)").show();
|
||||||
|
}
|
||||||
|
else if($(this).attr('checked') && form.find("#add_show_repeats").attr('checked')) {
|
||||||
|
form.find("#schedule-record-rebroadcast > fieldset:last").show();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
form.find("#schedule-record-rebroadcast > fieldset:not(:first-child)").hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
form.find("#add_show_repeat_type").change(function(){
|
form.find("#add_show_repeat_type").change(function(){
|
||||||
|
@ -91,12 +131,23 @@ function setAddShowEvents() {
|
||||||
createDateInput(form.find("#add_show_start_date"), startDpSelect);
|
createDateInput(form.find("#add_show_start_date"), startDpSelect);
|
||||||
createDateInput(form.find("#add_show_end_date"), endDpSelect);
|
createDateInput(form.find("#add_show_end_date"), endDpSelect);
|
||||||
|
|
||||||
form.find("#add_show_start_time").timepicker();
|
form.find("#add_show_start_time").timepicker({
|
||||||
|
amPmText: ['', '']
|
||||||
|
});
|
||||||
form.find("#add_show_duration").timepicker({
|
form.find("#add_show_duration").timepicker({
|
||||||
amPmText: ['', ''],
|
amPmText: ['', ''],
|
||||||
defaultTime: '01:00'
|
defaultTime: '01:00'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
form.find('input[name^="add_show_rebroadcast_absolute_date"]').datepicker({
|
||||||
|
//minDate: new Date(),
|
||||||
|
dateFormat: 'yy-mm-dd'
|
||||||
|
});
|
||||||
|
form.find('input[name^="add_show_rebroadcast_absolute_time"], input[name^="add_show_rebroadcast_time"]').timepicker({
|
||||||
|
amPmText: ['', ''],
|
||||||
|
defaultTime: ''
|
||||||
|
});
|
||||||
|
|
||||||
form.find("#add_show_hosts_autocomplete").autocomplete({
|
form.find("#add_show_hosts_autocomplete").autocomplete({
|
||||||
source: findHosts,
|
source: findHosts,
|
||||||
select: autoSelect,
|
select: autoSelect,
|
||||||
|
@ -194,5 +245,10 @@ function showErrorSections() {
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
||||||
|
//setAddShowEvents();
|
||||||
|
});
|
||||||
|
|
||||||
|
$(window).load(function() {
|
||||||
|
|
||||||
setAddShowEvents();
|
setAddShowEvents();
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue