work in progress

This commit is contained in:
Robbt 2018-12-11 21:14:35 -05:00
parent efec7af21c
commit 1b48f91dbd
3 changed files with 10 additions and 9 deletions

View File

@ -223,7 +223,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
{
// load type
$out = CcBlockQuery::create()->findPk($p_blockId);
if ($out->getDbType() == "static") {
if ($out->getDbType() == "dynamic") {
$blockType = 0;
} else {
$blockType = 1;
@ -233,8 +233,9 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$spType->setLabel(_('Type:'))
->setDecorators(array('viewHelper'))
->setMultiOptions(array(
'static' => _('Static'),
'dynamic' => _('Dynamic')
'dynamic' => _('Dynamic'),
'static' => _('Static')
))
->setValue($blockType);
$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->setIgnore(true);
if ($blockType == 0) {
$generate->setLabel(_('Generate'));
$generate->setLabel(_('Preview'));
}
else {
$generate->setLabel(_('Preview'));
$generate->setLabel(_('Generate'));
}
$generate->setDecorators(array('viewHelper'));
$this->addElement($generate);

View File

@ -75,7 +75,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
/**
* 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
*/
protected $type;
@ -151,7 +151,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
{
$this->name = '';
$this->length = '00:00:00';
$this->type = 'static';
$this->type = 'dynamic';
}
/**
@ -494,7 +494,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
return false;
}
if ($this->type !== 'static') {
if ($this->type !== 'dynamic') {
return false;
}

View File

@ -299,7 +299,7 @@ CREATE TABLE "cc_block"
"creator_id" INTEGER,
"description" VARCHAR(512),
"length" interval DEFAULT '00:00:00',
"type" VARCHAR(7) DEFAULT 'static',
"type" VARCHAR(7) DEFAULT 'dynamic',
PRIMARY KEY ("id")
);