will display in the UI what is scheduled in a show when you add things.

This commit is contained in:
naomiaro 2011-01-12 19:40:05 -05:00
parent 4d8f28f3fd
commit ad869e0f7f
5 changed files with 37 additions and 11 deletions

View File

@ -156,6 +156,9 @@ class ScheduleController extends Zend_Controller_Action
$show->scheduleShow($start, array($plId));
$this->view->showContent = $show->getShowContent($start);
$this->view->chosen = $this->view->render('schedule/scheduled-content.phtml');
unset($this->view->showContent);
}
else {

View File

@ -305,18 +305,19 @@ class Show {
$items[$pl_counter]["pl_name"] = $row["name"];
$items[$pl_counter]["pl_creator"] = $row["creator"];
$items[$pl_counter]["pl_description"] = $row["description"];
$items[$pl_counter]["pl_description"] = $row["description"];
$items[$pl_counter]["pl_group"] = $row["group_id"];
$sql = "SELECT SUM(clip_length) FROM cc_schedule WHERE group_id = '{$currGroupId}'";
$sql = "SELECT SUM(clip_length) FROM cc_schedule WHERE group_id = '{$currGroupId}'";
$length = $CC_DBC->GetOne($sql);
$items[$pl_counter]["pl_length"] = $length;
}
$f_counter = $f_counter + 1;
$items[$pl_counter][$f_counter]["f_name"] = $row["track_title"];
$items[$pl_counter][$f_counter]["f_artist"] = $row["artist_name"];
$items[$pl_counter][$f_counter]["f_length"] = $row["length"];
$items[$pl_counter]["pl_content"][$f_counter]["f_name"] = $row["track_title"];
$items[$pl_counter]["pl_content"][$f_counter]["f_artist"] = $row["artist_name"];
$items[$pl_counter]["pl_content"][$f_counter]["f_length"] = $row["length"];
}
return $items;

View File

@ -1,2 +0,0 @@
<h3>First header</h3>
<div>First content</div>

View File

@ -0,0 +1,24 @@
<?php if(count($this->showContent) > 0) : ?>
<?php foreach($this->showContent as $pl) : ?>
<li id="g_<?php echo $pl["pl_group"] ?>" class="ui-widget-content">
<h3>
<div>
<span><?php echo $pl["pl_name"] ?></span>
<span><?php echo $pl["pl_length"] ?></span>
</div>
<div><?php echo $pl["pl_creator"] ?></div>
<div><?php echo $pl["pl_description"] ?></div>
</h3>
<div>
<?php foreach($pl["pl_content"] as $file) : ?>
<div>
<span><?php echo $file["f_name"] ?></span>
<span><?php echo $file["f_length"] ?></span>
</div>
<div><?php echo $file["f_artist"] ?></div>
<?php endforeach; ?>
</div>
</li>
<?php endforeach; ?>
<?php endif; ?>

View File

@ -194,14 +194,14 @@ function makeScheduleDialog(dialog, show) {
url = '/Schedule/schedule-show/format/json';
//$("#schedule_playlist_chosen")
// .append(ui.helper);
$.post(url,
{plId: pl_id, start: start_date, end: end_date, showId: show.id},
function(json){
var x;
$("#schedule_playlist_chosen")
.empty()
.append(json.chosen);
});
}