Index: mythweb/themes/wap/scheduled_recordings.php
===================================================================
--- mythweb/themes/wap/scheduled_recordings.php (revision 7239)
+++ mythweb/themes/wap/scheduled_recordings.php (working copy)
@@ -16,59 +16,174 @@
// Print the page contents
global $All_Shows;
+ ?>
+
+ Sort by:
+ = get_sort_link('title', t('title'))?>
+ = get_sort_link('channum', t('channum'))?>
+ = get_sort_link('airdate', t('airdate'))?>
+ = get_sort_link('length', t('length'))?>
+ show
- station
- air date
- length
-*/
-
$row = 0;
foreach ($shows as $show) {
- // Reset the command variable
- $command = '';
- // Which class does this show fall into?
- if ($show->duplicate == 1) {
- $class = 'duplicate';
- $command = 'Rerecord';
+ $row++;
+ // Set the class to be used to display the recording status character
+ $rec_class = implode(' ', array(recstatus_class($show), $show->recstatus));
+ // Reset the command variable to a default URL
+ $commands = array();
+ $urlstr = 'chanid='.$show->chanid.'&starttime='.$show->starttime;
+ // Set the recording status character, class and any applicable commands for each show
+ switch ($show->recstatus) {
+ case 'Recording':
+ case 'WillRecord':
+ $rec_char = $show->cardid;
+ $class = 'scheduled';
+ $commands[] = ''.t('Don\'t Record').'';
+ // Offer to suppress any recordings that have enough info to do so.
+ if (preg_match('/\\S/', $show->title)
+ && (preg_match('/\\S/', $show->programid.$show->subtitle.$show->description))) {
+ $commands[] = ''
+ .t('Never Record').'';
+ }
+ break;
+ case 'PreviousRecording':
+ $rec_char = 'P';
+ $class = 'duplicate';
+ $commands[] = ''.t('Record This').'';
+ $commands[] = ''
+ .t('Forget Old').'';
+ break;
+ case 'CurrentRecording':
+ $rec_char = 'R';
+ $class = 'duplicate';
+ $commands[] = ''.t('Record This').'';
+ $commands[] = ''
+ .t('Forget Old').'';
+ break;
+ case 'Repeat':
+ $rec_char = 'r';
+ $class = 'duplicate';
+ break;
+ case 'EarlierShowing':
+ $rec_char = 'E';
+ $class = 'deactivated';
+ $commands[] = ''.t('Activate').'';
+ $commands[] = ''.t('Default').'';
+ break;
+ case 'TooManyRecordings':
+ $rec_char = 'T';
+ $class = 'deactivated';
+ break;
+ case 'Cancelled':
+ $rec_char = 'N';
+ $class = 'deactivated';
+ $commands[] = ''.t('Activate').'';
+ $commands[] = ''.t('Default').'';
+ break;
+ case 'Conflict':
+ $rec_char = 'C';
+ // We normally use the recstatus value as the name of the class
+ // used when displaying the recording status character.
+ // However, there is already a class named 'conflict' so we
+ // need to modify this specific recstatus to avoid a conflict.
+ $rec_class = implode(' ', array(recstatus_class($show),
+ 'conflicting'));
+ $class = 'conflict';
+ $commands[] = ''.t('Record This').'';
+ $commands[] = ''.t('Don\'t Record').'';
+ break;
+ case 'LaterShowing':
+ $rec_char = 'L';
+ $class = 'deactivated';
+ $commands[] = ''.t('Activate').'';
+ $commands[] = ''.t('Default').'';
+ break;
+ case 'LowDiskSpace':
+ $rec_char = 'K';
+ $class = 'deactivated';
+ $commands[] = 'Not Enough Disk Space';
+ break;
+ case 'TunerBusy':
+ $rec_char = 'B';
+ $class = 'deactivated';
+ $commands[] = 'Tuner is busy';
+ break;
+ case 'Overlap':
+ $rec_char = 'X';
+ $class = 'conflict';
+ $commands[] = ''.t('Record This').'';
+ $commands[] = ''.t('Don\'t Record').'';
+ break;
+ case 'ManualOverride':
+ $rec_char = 'X';
+ $class = 'deactivated';
+ $commands[] = ''.t('Activate').'';
+ $commands[] = ''.t('Default').'';
+ break;
+ case 'ForceRecord':
+ $rec_char = 'F';
+ $class = 'scheduled';
+ $commands[] = ''.t('Don\'t Record').'';
+ $commands[] = ''.t('Default').'';
+ break;
+ default:
+ $rec_char = ' ';
+ $rec_class = '';
+ $class = 'deactivated';
+ $commands[] = ''.t('Activate').'';
+ $commands[] = ''.t('Don\'t Record').'';
+ break;
}
- elseif ($show->conflicting == 1) {
- $class = 'conflict';
- $command = 'Record';
- }
- elseif ($show->recording == 0) {
- $class = 'deactivated';
- $command = 'Activate';
- }
- else {
- $class = 'scheduled';
- #$command = 'Don\'t Record';
- $command = '';
- }
-
- // Print the content
-//
-//
-
+ ?>
+
+ chanid.'&starttime='.$show->starttime.'"'
- .'>'.$show->title
+ .'>['.$rec_char.'] '.$show->title
.(preg_match('/\\w/', $show->subtitle) ? ": $show->subtitle" : '')
.' ';
?>
=$show->channel->name?>
- =date('D, M j', $show->starttime)?>
+ =date('D, M j', $show->starttime)?>
=date('(g:i A)', $show->starttime)?> =nice_length($show->length)?>
- if ($command) { ?>
- =$command?>
- } ?>
-
-
+
+ ?>
-
// Print the main page footer
Index: mythweb/themes/wap/theme.php
===================================================================
--- mythweb/themes/wap/theme.php (revision 7239)
+++ mythweb/themes/wap/theme.php (working copy)
@@ -37,9 +37,9 @@
function print_menu_content() {
?>
- Listings
- Scheduled
- Recorded
+ Listings
+ Scheduled
+ Recorded
|