SAAS-960 Change hint for currently playing linked show
This commit is contained in:
parent
07f02260db
commit
7f4fbf65e1
|
@ -67,6 +67,15 @@ class Application_Common_UsabilityHints
|
|||
"</a>");
|
||||
}
|
||||
} else if (self::isCurrentShowEmpty()) {
|
||||
// If the current show is linked users cannot add content to it so we have to provide a different message.
|
||||
if (self::isCurrentShowLinked()) {
|
||||
if ($userIsOnCalendarPage) {
|
||||
return _("To start broadcasting, first you need to cancel the current linked show by clicking on it and selecting 'Cancel Current Show'.");
|
||||
} else {
|
||||
return sprintf(_("Linked shows need to be filled with tracks before it starts. You need to schedule a non-linked show to start broadcasting.
|
||||
%sCreate a non-linked show now.%s"), "<a href=\"/schedule\">", "</a>");
|
||||
}
|
||||
} else {
|
||||
if ($userIsOnCalendarPage) {
|
||||
return _("To start broadcasting, click on the current show and select 'Add / Remove Content'");
|
||||
} else {
|
||||
|
@ -74,6 +83,7 @@ class Application_Common_UsabilityHints
|
|||
"<a href=\"/schedule\">",
|
||||
"</a>");
|
||||
}
|
||||
}
|
||||
} else if (!self::getCurrentShow() && self::isNextShowEmpty()) {
|
||||
if ($userIsOnCalendarPage) {
|
||||
return _("Click on the show starting next and select 'Add / Remove Content'");
|
||||
|
@ -181,4 +191,21 @@ class Application_Common_UsabilityHints
|
|||
->orderByDbStarts()
|
||||
->findOne();
|
||||
}
|
||||
|
||||
private static function isCurrentShowLinked()
|
||||
{
|
||||
$currentShow = self::getCurrentShow();
|
||||
if (!is_null($currentShow)) {
|
||||
$show = CcShowQuery::create()
|
||||
->filterByDbId($currentShow->getDbShowId())
|
||||
->findOne();
|
||||
if ($show->isLinked()) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue