CC-4599: Calendar: Add an icon to indicate show is not fully booked
-done but a new icon is needed
This commit is contained in:
parent
771b9b9412
commit
82da4dcfe8
4 changed files with 29 additions and 0 deletions
|
@ -1801,6 +1801,8 @@ SQL;
|
||||||
|
|
||||||
$options["show_empty"] = (array_key_exists($show['instance_id'],
|
$options["show_empty"] = (array_key_exists($show['instance_id'],
|
||||||
$content_count)) ? 0 : 1;
|
$content_count)) ? 0 : 1;
|
||||||
|
|
||||||
|
$options["show_partial_filled"] = $showInstance->showPartialFilled();
|
||||||
|
|
||||||
$events[] = &self::makeFullCalendarEvent($show, $options,
|
$events[] = &self::makeFullCalendarEvent($show, $options,
|
||||||
$startsDT, $endsDT, $startsEpochStr, $endsEpochStr);
|
$startsDT, $endsDT, $startsEpochStr, $endsEpochStr);
|
||||||
|
|
|
@ -687,6 +687,22 @@ SQL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function showPartialFilled()
|
||||||
|
{
|
||||||
|
$sql = <<<SQL
|
||||||
|
SELECT time_filled > '00:00:00'
|
||||||
|
AND time_filled < ends - starts
|
||||||
|
AND file_id IS null AS partial_filled
|
||||||
|
FROM cc_show_instances
|
||||||
|
WHERE id = :instance_id
|
||||||
|
SQL;
|
||||||
|
|
||||||
|
$res = Application_Common_Database::prepareAndExecute($sql,
|
||||||
|
array(':instance_id' => $this->_instanceId), 'all');
|
||||||
|
|
||||||
|
return $res[0]["partial_filled"];
|
||||||
|
}
|
||||||
|
|
||||||
public function showEmpty()
|
public function showEmpty()
|
||||||
{
|
{
|
||||||
$sql = <<<SQL
|
$sql = <<<SQL
|
||||||
|
|
|
@ -1981,6 +1981,9 @@ span.errors.sp-errors{
|
||||||
.small-icon.show-empty {
|
.small-icon.show-empty {
|
||||||
background:url(images/icon_alert_cal_alt.png) no-repeat 0 0;
|
background:url(images/icon_alert_cal_alt.png) no-repeat 0 0;
|
||||||
}
|
}
|
||||||
|
.small-icon.show-partial-filled {
|
||||||
|
background:url(images/icon_alert_cal_alt.png) no-repeat 0 0;
|
||||||
|
}
|
||||||
.medium-icon {
|
.medium-icon {
|
||||||
display:block;
|
display:block;
|
||||||
width:25px;
|
width:25px;
|
||||||
|
|
|
@ -258,12 +258,20 @@ function eventRender(event, element, view) {
|
||||||
$(element)
|
$(element)
|
||||||
.find(".fc-event-time")
|
.find(".fc-event-time")
|
||||||
.before('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
.before('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||||
|
} else if (event.show_partial_filled === true) {
|
||||||
|
$(element)
|
||||||
|
.find(".fc-event-time")
|
||||||
|
.before('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
|
||||||
}
|
}
|
||||||
} else if (view.name === 'month') {
|
} else if (view.name === 'month') {
|
||||||
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
if (event.show_empty === 1 && event.record === 0 && event.rebroadcast === 0) {
|
||||||
$(element)
|
$(element)
|
||||||
.find(".fc-event-title")
|
.find(".fc-event-title")
|
||||||
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is empty")+'" class="small-icon show-empty"></span>');
|
||||||
|
} else if (event.show_partial_filled === true) {
|
||||||
|
$(element)
|
||||||
|
.find(".fc-event-title")
|
||||||
|
.after('<span id="'+event.id+'" title="'+$.i18n._("Show is partially filled")+'" class="small-icon show-partial-filled"></span>');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue