work in progress
This commit is contained in:
parent
efec7af21c
commit
1b48f91dbd
|
@ -223,7 +223,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
{
|
{
|
||||||
// load type
|
// load type
|
||||||
$out = CcBlockQuery::create()->findPk($p_blockId);
|
$out = CcBlockQuery::create()->findPk($p_blockId);
|
||||||
if ($out->getDbType() == "static") {
|
if ($out->getDbType() == "dynamic") {
|
||||||
$blockType = 0;
|
$blockType = 0;
|
||||||
} else {
|
} else {
|
||||||
$blockType = 1;
|
$blockType = 1;
|
||||||
|
@ -233,8 +233,9 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
$spType->setLabel(_('Type:'))
|
$spType->setLabel(_('Type:'))
|
||||||
->setDecorators(array('viewHelper'))
|
->setDecorators(array('viewHelper'))
|
||||||
->setMultiOptions(array(
|
->setMultiOptions(array(
|
||||||
'static' => _('Static'),
|
'dynamic' => _('Dynamic'),
|
||||||
'dynamic' => _('Dynamic')
|
'static' => _('Static')
|
||||||
|
|
||||||
))
|
))
|
||||||
->setValue($blockType);
|
->setValue($blockType);
|
||||||
$this->addElement($spType);
|
$this->addElement($spType);
|
||||||
|
@ -491,10 +492,10 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
|
||||||
$generate->setAttrib('title', _('Generate playlist content and save criteria'));
|
$generate->setAttrib('title', _('Generate playlist content and save criteria'));
|
||||||
$generate->setIgnore(true);
|
$generate->setIgnore(true);
|
||||||
if ($blockType == 0) {
|
if ($blockType == 0) {
|
||||||
$generate->setLabel(_('Generate'));
|
$generate->setLabel(_('Preview'));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$generate->setLabel(_('Preview'));
|
$generate->setLabel(_('Generate'));
|
||||||
}
|
}
|
||||||
$generate->setDecorators(array('viewHelper'));
|
$generate->setDecorators(array('viewHelper'));
|
||||||
$this->addElement($generate);
|
$this->addElement($generate);
|
||||||
|
|
|
@ -75,7 +75,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the type field.
|
* The value for the type field.
|
||||||
* Note: this column has a database default value of: 'static'
|
* Note: this column has a database default value of: 'dynamic'
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $type;
|
protected $type;
|
||||||
|
@ -151,7 +151,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
|
||||||
{
|
{
|
||||||
$this->name = '';
|
$this->name = '';
|
||||||
$this->length = '00:00:00';
|
$this->length = '00:00:00';
|
||||||
$this->type = 'static';
|
$this->type = 'dynamic';
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -494,7 +494,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->type !== 'static') {
|
if ($this->type !== 'dynamic') {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -299,7 +299,7 @@ CREATE TABLE "cc_block"
|
||||||
"creator_id" INTEGER,
|
"creator_id" INTEGER,
|
||||||
"description" VARCHAR(512),
|
"description" VARCHAR(512),
|
||||||
"length" interval DEFAULT '00:00:00',
|
"length" interval DEFAULT '00:00:00',
|
||||||
"type" VARCHAR(7) DEFAULT 'static',
|
"type" VARCHAR(7) DEFAULT 'dynamic',
|
||||||
PRIMARY KEY ("id")
|
PRIMARY KEY ("id")
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue