new add show html.

This commit is contained in:
Naomi 2011-02-09 18:10:46 -05:00
parent eab3675c74
commit d210a36358
9 changed files with 120 additions and 64 deletions

View file

@ -331,24 +331,10 @@ class ScheduleController extends Zend_Controller_Action
public function editShowAction()
{
$formWhat = new Application_Form_AddShowWhat();
$formWhat->removeDecorator('DtDdWrapper');
$formWho = new Application_Form_AddShowWho();
$formWho->removeDecorator('DtDdWrapper');
$formWhen = new Application_Form_AddShowWhen();
$formWhen->removeDecorator('DtDdWrapper');
$formRepeats = new Application_Form_AddShowRepeats();
$formRepeats->removeDecorator('DtDdWrapper');
$formStyle = new Application_Form_AddShowStyle();
$formStyle->removeDecorator('DtDdWrapper');
$showInstanceId = $this->_getParam('id');
$showInstance = new ShowInstance($showInstanceId);
$this->view->what = $formWhat;
//$this->view->when = $formWhen;
//$this->view->repeats = $formRepeats;
$this->view->who = $formWho;
$this->view->style = $formStyle;
$this->view->dialog = $this->view->render('schedule/edit-show.phtml');
$show = new Show($showInstance->getShowId());
}

View file

@ -11,16 +11,44 @@ class Show {
public function getName() {
$show = CcShowQuery::create()->findPK($this->_showId);
return $show->getDbName();
}
public function setName($name) {
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbName($name);
}
public function getDescription() {
$show = CcShowQuery::create()->findPK($this->_showId);
return $show->getDbDescription();
}
public function setDescription($description) {
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbDescription($description);
}
public function getColor() {
$show = CcShowQuery::create()->findPK($this->_showId);
return $show->getDbColor();
}
public function setColor($color) {
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbColor($color);
}
public function getBackgroundColor() {
$show = CcShowQuery::create()->findPK($this->_showId);
return $show->getDbBackgroundColor();
}
public function setBackgroundColor($backgroundColor) {
$show = CcShowQuery::create()->findPK($this->_showId);
$show->setDbBackgroundColor($backgroundColor);
}
//end dates are non inclusive.
public static function addShow($data) {

View file

@ -10,5 +10,5 @@
</label>
<?php $i=$i+1 ?>
<?php endforeach; ?>
<?php echo $this->formErrors($this->element->getMessages()) ?>
<?php if($this->element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?>
</dd>

View file

@ -9,8 +9,5 @@
$this->element->getAttribs()
) ?>
<?php if($this->element->hasErrors()) {
echo $this->formErrors($this->element->getMessages());
}
?>
<?php if($this->element->hasErrors()) { echo $this->formErrors($this->element->getMessages());} ?>
</dd>

View file

@ -1,31 +1,29 @@
<div class="wrapper" id="content">
<form method="post" action="">
<div id="schedule-add-show" class="tabs ui-widget ui-widget-content block-shadow alpha-block padded">
<ul>
<li><a href="#schedule-show-what"><span>What</span></a></li>
<li><a href="#schedule-show-when"><span>When</span></a></li>
<li><a href="#schedule-show-who"><span>Who</span></a></li>
<li><a href="#schedule-show-style"><span>Style</span></a></li>
</ul>
<div class="button-bar">
<button id="add-show-submit" class="right-floated">Add this show</button></div>
<div class="clear"></div>
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<div id="schedule-show-when">
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<div id="schedule-show-who">
<?php echo $this->who ?>
</div>
<div id="schedule-show-style">
<?php echo $this->style ?>
</div>
</div>
</form>
<form method="post" action="">
<div id="schedule-add-show" class="tabs ui-widget ui-widget-content block-shadow alpha-block padded">
<div class="button-bar">
<button id="add-show-submit" class="right-floated">Add this show</button>
</div>
<div class="clear"></div>
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>When</h3>
<div id="schedule-show-when" class="collapsible-content">
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Who</h3>
<div id="schedule-show-who" class="collapsible-content">
<?php echo $this->who ?>
</div>
<h3 class="collapsible-header"><span class="arrow-icon"></span>Style</h3>
<div id="schedule-show-style" class="collapsible-content">
<?php echo $this->style ?>
</div>
</div>
</form>
<div id="fullcalendar_show_display" class="ui-widget-content block-shadow omega-block padded"></div>
</div>

View file

@ -2,10 +2,6 @@
<div id="schedule-show-what">
<?php echo $this->what ?>
</div>
<div id="schedule-show-when">
<?php echo $this->when ?>
<?php echo $this->repeats ?>
</div>
<div id="schedule-show-who">
<?php echo $this->who ?>
</div>