Radio Page Code Review Changes

Reset stylesheets in index controller.
Removed hardcoded days of week in WidgetHelper.
Display schedule widget with 6 days after the current day.
This commit is contained in:
drigato 2015-06-10 11:13:03 -04:00
parent ca8ca0abed
commit 042e441708
6 changed files with 23 additions and 22 deletions

View file

@ -94,9 +94,10 @@ class EmbedController extends Zend_Controller_Action
}
$this->view->jquery = Application_Common_HTTPHelper::getStationUrl() . "widgets/js/jquery-1.6.1.min.js?".$CC_CONFIG['airtime_version'];
$result = WidgetHelper::getWeekInfoV2($this->getRequest()->getParam("timezone"));
$this->view->scheduleDataWeek1 = $result[0];
$this->view->scheduleDataWeek2 = $result[1];
$weeklyScheduleData = WidgetHelper::getWeekInfoV2($this->getRequest()->getParam("timezone"));
// Return only the current week's schedule data. In the future we may use the next week's data.
$this->view->weeklyScheduleData = $weeklyScheduleData[0];
$currentDay = new DateTime("now", new DateTimeZone(Application_Model_Preference::GetTimezone()));
//day of the month without leading zeros (1 to 31)

View file

@ -23,14 +23,14 @@ class EmbeddableWidgetsController extends Zend_Controller_Action
if ($numEnabledStreams > 0 && $apiEnabled) {
$this->view->player_form = $form;
} else {
$this->view->player_error_msg = "To configure and use the embeddable player you must:<br><br>
$this->view->player_error_msg = _("To configure and use the embeddable player you must:<br><br>
1. Enable at least one MP3, AAC, or OGG stream under System -> Streams<br>
2. Enable the Public Airtime API under System -> Preferences";
2. Enable the Public Airtime API under System -> Preferences");
}
if (!$apiEnabled) {
$this->view->weekly_schedule_error_msg = "To use the embeddable weekly schedule you must:<br><br>
1. Enable the Public Airtime API under System -> Preferences";
$this->view->weekly_schedule_error_msg = _("To use the embeddable weekly schedule you must:<br><br>
1. Enable the Public Airtime API under System -> Preferences");
}
}
}

View file

@ -12,7 +12,7 @@ class IndexController extends Zend_Controller_Action
{
$CC_CONFIG = Config::getConfig();
$baseUrl = Application_Common_OsPath::getBaseDir();
$this->view->headLink()->appendStylesheet($baseUrl.'css/radio-page/radio-page.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->setStylesheet($baseUrl.'css/radio-page/radio-page.css?'.$CC_CONFIG['airtime_version']);
$this->view->headLink()->appendStylesheet($baseUrl.'css/embed/weekly-schedule-widget.css?'.$CC_CONFIG['airtime_version']);
$this->_helper->layout->setLayout('radio-page');