Ticket #1395: mythweb.norecgroups.diff

File mythweb.norecgroups.diff, 3.4 KB (added by Robert Tsai <rtsai1111>, 18 years ago)
  • mythweb/themes/default/tv/recorded.php

     
    162162        }
    163163        ?>
    164164    </select></td>
    165 <?php } ?>
     165<?php   $recgroup_cols = 1;
     166    } else {
     167        $recgroup_cols = 0;
     168    } ?>
    166169    <td><?php echo t('Show recordings') ?>:</td>
    167170    <td width="250" align="center"><select name="title" onchange="get_element('program_titles').submit()">
    168171        <option id="All recordings" value=""><?php echo t('All recordings') ?></option><?php
     
    208211        echo "\t<td>".get_sort_link('description', t('description'))."</td>\n";
    209212?>
    210213    <td><?php echo get_sort_link('channum',   t('channum')) ?></td>
    211     <td><?php echo get_sort_link('recgroup',  t('recgroup')) ?></td>
     214<?php
     215    if ($recgroup_cols)
     216        echo "<td>" . get_sort_link('recgroup', t('recgroup')) . "</td>\n";
     217?>
    212218    <td><?php echo get_sort_link('airdate',   t('airdate')) ?></td>
    213219    <td><?php echo get_sort_link('length',    t('length')) ?></td>
    214220    <td><?php echo get_sort_link('file_size', t('file size')) ?></td>
     
    239245
    240246        if ( $cur_group != $prev_group && $group_field != '' ) {
    241247            $section++;
    242 ?><tr id="breakrow_<?php echo $section ?>" class="list_separator">
    243     <td colspan="10" class="list_separator"><?php echo $cur_group ?></td>
    244 </tr><?php
     248            $colspan = 9 + $recgroup_cols;
     249            print <<<EOM
     250<tr id="breakrow_$section" class="list_separator">
     251    <td colspan="$colspan" class="list_separator">$cur_group</td>
     252</tr>
     253EOM;
    245254        }
    246 ?><tr id="inforow_<?php echo $row ?>" class="recorded">
    247 <?php
     255
     256        echo "<tr id=\"inforow_$row\" class=\"recorded\">\n";
    248257        if ($group_field != "")
    249258            echo "\t<td class=\"list\" rowspan=\"".($_SESSION['recorded_descunder'] ? 3 : 2)."\">&nbsp;</td>\n";
    250259        if (show_recorded_pixmaps) {
     
    270279            echo "\t<td>".$show->description."</td>\n";
    271280?>
    272281    <td><?php echo $show->channel->channum, ' - <nobr>', $show->channel->name ?></nobr></td>
    273     <td nowrap align="center"><?php echo $show->recgroup ?></td>
     282<?php
     283    if ($recgroup_cols)
     284        echo "<td nowrap align=\"center\">$show->recgroup</td>\n";
     285?>
    274286    <td nowrap align="center"><?php echo strftime($_SESSION['date_recorded'], $show->starttime) ?></td>
    275287    <td nowrap><?php echo nice_length($show->length) ?></td>
    276288    <td nowrap><?php echo nice_filesize($show->filesize) ?></td>
     
    287299<?php   }
    288300
    289301        if ($_SESSION['recorded_descunder'])
    290             echo("</tr><tr id=\"descunderrow_".$row."\" class=\"recorded\">\n\t<td colspan=\"7\">".$show->description."</td>\n");
     302            echo("</tr><tr id=\"descunderrow_".$row."\" class=\"recorded\">\n\t<td colspan=\"<?php echo 6 + $recgroup_cols ?>\">".$show->description."</td>\n");
    291303?>
    292304</tr><tr id="statusrow_<?php echo $row ?>" class="recorded">
    293     <td nowrap colspan="<?php echo $_SESSION['recorded_descunder'] ? 7 : 8 ?>" align="center">
     305    <td nowrap colspan="<?php echo 6 + ($_SESSION['recorded_descunder'] ? 0 : 1) + $recgroup_cols ?>" align="center">
    294306        <span style="padding-right: 25px"><?php echo t('has commflag') ?>:&nbsp;
    295307            <b><?php echo $show->has_commflag ? t('Yes') : t('No') ?></b></span>
    296308        <span style="padding-right: 25px"><?php echo t('has cutlist') ?>:&nbsp;