CC-6096, CC-6093 - update calendar context menu and usability hint wording; bugfixes

This commit is contained in:
Duncan Sommerville 2015-08-27 16:59:21 -04:00
parent acc4ef0054
commit 294298c9bf
8 changed files with 47 additions and 33 deletions

View File

@ -52,9 +52,9 @@ class Application_Common_UsabilityHints
if (self::zeroFilesUploaded()) {
if ($userIsOnAddMediaPage) {
return _("Click the 'Add files' button and select files from your computer to upload.");
return _("Upload some tracks below to add them to your library!");
} else {
return sprintf(_("It looks like you have not uploaded any audio files yet. %sUpload a file now%s."),
return sprintf(_("It looks like you haven't uploaded any audio files yet. %sUpload a file now%s."),
"<a href=\"/Plupload\">",
"</a>");
}
@ -70,14 +70,14 @@ class Application_Common_UsabilityHints
// 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'.");
return _("To start broadcasting, cancel the current linked show by clicking on it and selecting 'Cancel Show'.");
} else {
return sprintf(_("Linked shows need to be filled with tracks before it starts. To start broadcasting cancel the current linked show and schedule an unlinked show.
%sCreate an unlinked show now%s."), "<a href=\"/Schedule\">", "</a>");
}
} else {
if ($userIsOnCalendarPage) {
return _("To start broadcasting, click on the current show and select 'Add / Remove Content'");
return _("To start broadcasting, click on the current show and select 'Schedule Show'");
} else {
return sprintf(_("It looks like the current show needs more tracks. %sAdd tracks to your show now%s."),
"<a href=\"/Schedule\">",
@ -86,7 +86,7 @@ class Application_Common_UsabilityHints
}
} else if (!self::getCurrentShow() && self::isNextShowEmpty()) {
if ($userIsOnCalendarPage) {
return _("Click on the show starting next and select 'Add / Remove Content'");
return _("Click on the show starting next and select 'Schedule Show'");
} else {
return sprintf(_("It looks like the next show is empty. %sAdd tracks to your show now%s."),
"<a href=\"/Schedule\">",

View File

@ -28,7 +28,7 @@ class LoginController extends Zend_Controller_Action
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()) {
$this->_redirect('Showbuilder');
$this->_redirect('showbuilder');
}
//uses separate layout without a navigation.
@ -76,7 +76,7 @@ class LoginController extends Zend_Controller_Action
//set the user locale in case user changed it in when logging in
Application_Model_Preference::SetUserLocale($locale);
$this->_redirect('Showbuilder');
$this->_redirect('showbuilder');
} else {
$email = $form->getValue('username');
$authAdapter = new WHMCS_Auth_Adapter("admin", $email, $password);
@ -87,7 +87,7 @@ class LoginController extends Zend_Controller_Action
//set the user locale in case user changed it in when logging in
Application_Model_Preference::SetUserLocale($locale);
$this->_redirect('Showbuilder');
$this->_redirect('showbuilder');
}
else {
$message = _("Wrong username or password provided. Please try again.");

View File

@ -34,10 +34,10 @@ class SetupController extends Zend_Controller_Action
Application_Model_Preference::setLangTimezoneSetupComplete(true);
$this->_redirect('/Showbuilder');
$this->_redirect('/showbuilder');
}
}
$this->_redirect('/Showbuilder');
$this->_redirect('/showbuilder');
}
}

View File

@ -22,7 +22,7 @@ class WhmcsLoginController extends Zend_Controller_Action
Application_Model_Locale::configureLocalization($request->getcookie('airtime_locale', 'en_CA'));
if (Zend_Auth::getInstance()->hasIdentity())
{
$this->_redirect('Showbuilder');
$this->_redirect('showbuilder');
}
$authAdapter = new WHMCS_Auth_Adapter($username, $email, $password);
@ -58,7 +58,7 @@ class WhmcsLoginController extends Zend_Controller_Action
//$locale = $form->getValue('locale');
//Application_Model_Preference::SetUserLocale($locale);
$this->_redirect('Showbuilder');
$this->_redirect('showbuilder');
}
else {
echo("Sorry, that username or password was incorrect.");

View File

@ -7,7 +7,7 @@ class Application_Form_RegisterAirtime extends Zend_Form
public function init()
{
$this->setAction(Application_Common_OsPath::getBaseDir().'Showbuilder');
$this->setAction(Application_Common_OsPath::getBaseDir().'showbuilder');
$this->setMethod('post');
$country_list = Application_Model_Preference::GetCountryList();

View File

@ -57,7 +57,8 @@ class Application_Service_CalendarService
}
} else {
$menu["content"] = array(
"name"=> _("Show Content"),
// "name"=> _("Show Content"),
"name"=> _("View"),
"icon" => "overview",
"url" => $baseUrl."schedule/show-content-dialog");
}
@ -76,45 +77,52 @@ class Application_Service_CalendarService
if (!$showIsLinked || ($showIsLinked && $currentShowId != $this->ccShow->getDbId())) {
$menu["schedule"] = array(
"name"=> _("Add / Remove Content"),
// "name"=> _("Add / Remove Content"),
"name" => _("Schedule Show"),
"icon" => "add-remove-content",
"url" => $baseUrl."showbuilder/builder-dialog/");
}
}
//user can remove all content if the show has not started
if ($now < $start && ($isAdminOrPM || $isHostOfShow) && !$this->ccShowInstance->isRecorded() ) {
//if the show is not linked OR if the show is linked AND not the current playing show
//the user can remove all content
if (!$showIsLinked || ($showIsLinked && $currentShowId != $this->ccShow->getDbId())) {
$menu["clear"] = array(
"name"=> _("Remove All Content"),
"icon" => "remove-all-content",
"url" => $baseUrl."schedule/clear-show");
}
}
//"Show Content" should be a menu item at all times except when
//the show is recorded
if (!$this->ccShowInstance->isRecorded()) {
$menu["content"] = array(
"name"=> _("Show Content"),
// "name"=> _("Show Content"),
"name"=> _("View"),
"icon" => "overview",
"url" => $baseUrl."schedule/show-content-dialog");
}
//user can remove all content if the show has not started
if ($now < $start && ($isAdminOrPM || $isHostOfShow) && !$this->ccShowInstance->isRecorded() ) {
//if the show is not linked OR if the show is linked AND not the current playing show
//the user can remove all content
if (!$showIsLinked || ($showIsLinked && $currentShowId != $this->ccShow->getDbId())) {
$menu["clear"] = array(
// "name"=> _("Remove All Content"),
"name"=> _("Clear Show"),
"icon" => "remove-all-content",
"url" => $baseUrl."schedule/clear-show");
}
}
//show is currently playing and user is admin
if ($start <= $now && $now < $end && $isAdminOrPM) {
// Menu separator
$menu["sep1"] = "-----------";
if ($this->ccShowInstance->isRecorded()) {
$menu["cancel_recorded"] = array(
"name"=> _("Cancel Current Show"),
// "name"=> _("Cancel Current Show"),
"name"=> _("Cancel Show"),
"icon" => "delete");
} else {
$menu["cancel"] = array(
"name"=> _("Cancel Current Show"),
// "name"=> _("Cancel Current Show"),
"name"=> _("Cancel Show"),
"icon" => "delete");
}
}
@ -128,6 +136,9 @@ class Application_Service_CalendarService
}
if (!$this->ccShowInstance->isRebroadcast() && $isAdminOrPM) {
// Menu separator
$menu["sep2"] = "-----------";
if ($isRepeating) {
if ($populateInstance) {
$menu["edit"] = array(
@ -165,6 +176,9 @@ class Application_Service_CalendarService
//show hasn't started yet and user is admin
if ($now < $start && $isAdminOrPM) {
// Menu separator
$menu["sep3"] = "-----------";
//show is repeating so give user the option to delete all
//repeating instances or just the one
if ($isRepeating) {

View File

@ -20,7 +20,7 @@
<div id="show_builder" class="sb-content content-pane wide-panel">
<div class="panel-header">
<ul class="nav nav-tabs">
<li id="schedule-tab" role="presentation" class="active"><a href="#">Scheduled Shows</a></li>
<li id="schedule-tab" role="presentation" class="active"><a href="javascript:void(0)">Scheduled Shows</a></li>
</ul>
</div>
<div class="outer-datatable-wrapper active-tab">

View File

@ -452,7 +452,7 @@ var AIRTIME = (function(AIRTIME){
: pane.append(json.html).find(".playlist_name_display").val(),
tab =
"<li data-tab-id='" + $tabCount + "' data-tab-type='" + json.type + "' id='pl-tab-" + $tabCount + "' role='presentation' class='active'>" +
"<a href='#'><span class='tab-name'></span>" +
"<a href='javascript:void(0)'><span class='tab-name'></span>" +
"<span href='#' class='lib_pl_close icon-remove'></span>" +
"</a>" +
"</li>",