starting to populate with the template.
This commit is contained in:
parent
ecb2f81211
commit
c7b5592fa9
|
@ -207,6 +207,26 @@ class Application_Service_HistoryService
|
|||
Logging::info($e);
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public function populateTemplateItem($values) {
|
||||
|
||||
$template = $this->getItemTemplate();
|
||||
$historyRecord = new CcPlayoutHistory();
|
||||
|
||||
$timezoneUTC = new DateTimeZone("UTC");
|
||||
$timezoneLocal = new DateTimeZone($this->timezone);
|
||||
|
||||
$dateTime = new DateTime($values["starts"], $timezoneLocal);
|
||||
$dateTime->setTimezone($timezoneLocal);
|
||||
$historyRecord->setDbStarts($dateTime->format("Y-m-d H:i:s"));
|
||||
|
||||
$dateTime = new DateTime($result["ends"], $timezoneUTC);
|
||||
$dateTime->setTimezone($timezoneUTC);
|
||||
$historyRecord->setDbEnds($dateTime->format("Y-m-d H:i:s"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public function createPlayedItem($data) {
|
||||
|
@ -245,6 +265,7 @@ class Application_Service_HistoryService
|
|||
$history_id->setRequired(true);
|
||||
|
||||
if ($form->isValid($data)) {
|
||||
$history_id->setIgnore(true);
|
||||
$values = $form->getValues();
|
||||
|
||||
Logging::info("edited list item");
|
||||
|
@ -326,8 +347,8 @@ class Application_Service_HistoryService
|
|||
$fields = array();
|
||||
|
||||
//array index is the position of the item in the history template table.
|
||||
$fields[] = array("name" => "start", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
|
||||
$fields[] = array("name" => "end", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
|
||||
$fields[] = array("name" => "starts", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
|
||||
$fields[] = array("name" => "ends", "type" => TEMPLATE_DATETIME, "isFileMd" => false);
|
||||
$fields[] = array("name" => MDATA_KEY_TITLE, "type" => TEMPLATE_STRING, "isFileMd" => true); //these fields can be populated from an associated file.
|
||||
$fields[] = array("name" => MDATA_KEY_CREATOR, "type" => TEMPLATE_STRING, "isFileMd" => true);
|
||||
|
||||
|
|
|
@ -58,7 +58,8 @@ var AIRTIME = (function(AIRTIME) {
|
|||
|
||||
if (oConfig.sExtends == "pdf") {
|
||||
this.fnSetText( oFlash,
|
||||
"title:"+ this.fnGetTitle(oConfig) +"\n"+
|
||||
//"title:"+ this.fnGetTitle(oConfig) +"\n"+
|
||||
"title: Testing the Title Out\n"+
|
||||
"message:"+ oConfig.sPdfMessage +"\n"+
|
||||
"colWidth:"+ this.fnCalcColRatios(oConfig) +"\n"+
|
||||
"orientation:"+ oConfig.sPdfOrientation +"\n"+
|
||||
|
|
Loading…
Reference in New Issue