Ticket #1395: mythweb.norecgroups.3.diff

File mythweb.norecgroups.3.diff, 4.1 KB (added by Robert Tsai <rtsai1111>, 18 years ago)

don't break 'recorded_descunder' configuration

  • 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()">
    168         <option id="All recordings" value=""><?php echo t('All recordings') ?></option><?php
     171        <option id="All recordings" value=""><?php echo t('All recordings') ?></option>
     172<?php
    169173        foreach($Program_Titles as $title => $count) {
    170174            echo '<option id="Title '.htmlspecialchars($title).'" value="'.htmlspecialchars($title).'"';
    171175            if ($_GET['title'] == $title)
    172176                echo ' SELECTED';
    173177            echo '>'.html_entities($title)
    174178                .($count > 1 ? ' ('.tn('$1 episode', '$1 episodes', $count).')' : "")
    175                 .'</option>';
     179                ."</option>\n";
    176180        }
    177         ?>
     181?>
    178182    </select></td>
    179183    <td><noscript><input type="submit" value="<?php echo t('Go') ?>"></noscript></td>
    180184</tr>
     
    208212        echo "\t<td>".get_sort_link('description', t('description'))."</td>\n";
    209213?>
    210214    <td><?php echo get_sort_link('channum',   t('channum')) ?></td>
    211     <td><?php echo get_sort_link('recgroup',  t('recgroup')) ?></td>
     215<?php
     216    if ($recgroup_cols)
     217        echo "\t<td>" . get_sort_link('recgroup', t('recgroup')) . "</td>\n";
     218?>
    212219    <td><?php echo get_sort_link('airdate',   t('airdate')) ?></td>
    213220    <td><?php echo get_sort_link('length',    t('length')) ?></td>
    214221    <td><?php echo get_sort_link('file_size', t('file size')) ?></td>
     
    239246
    240247        if ( $cur_group != $prev_group && $group_field != '' ) {
    241248            $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
     249            $colspan = 9 + $recgroup_cols;
     250            print <<<EOM
     251<tr id="breakrow_$section" class="list_separator">
     252    <td colspan="$colspan" class="list_separator">$cur_group</td>
     253</tr>
     254EOM;
    245255        }
    246 ?><tr id="inforow_<?php echo $row ?>" class="recorded">
    247 <?php
     256
     257        echo "<tr id=\"inforow_$row\" class=\"recorded\">\n";
    248258        if ($group_field != "")
    249259            echo "\t<td class=\"list\" rowspan=\"".($_SESSION['recorded_descunder'] ? 3 : 2)."\">&nbsp;</td>\n";
    250260        if (show_recorded_pixmaps) {
     
    270280            echo "\t<td>".$show->description."</td>\n";
    271281?>
    272282    <td><?php echo $show->channel->channum, ' - <nobr>', $show->channel->name ?></nobr></td>
    273     <td nowrap align="center"><?php echo $show->recgroup ?></td>
     283<?php
     284    if ($recgroup_cols)
     285        echo "\t<td nowrap align=\"center\">$show->recgroup</td>\n";
     286?>
    274287    <td nowrap align="center"><?php echo strftime($_SESSION['date_recorded'], $show->starttime) ?></td>
    275288    <td nowrap><?php echo nice_length($show->length) ?></td>
    276289    <td nowrap><?php echo nice_filesize($show->filesize) ?></td>
     
    287300<?php   }
    288301
    289302        if ($_SESSION['recorded_descunder'])
    290             echo("</tr><tr id=\"descunderrow_".$row."\" class=\"recorded\">\n\t<td colspan=\"7\">".$show->description."</td>\n");
     303            echo("</tr><tr id=\"descunderrow_".$row."\" class=\"recorded\">\n\t<td colspan=\"" . (6 + $recgroup_cols) . "\">".$show->description."</td>\n");
    291304?>
    292305</tr><tr id="statusrow_<?php echo $row ?>" class="recorded">
    293     <td nowrap colspan="<?php echo $_SESSION['recorded_descunder'] ? 7 : 8 ?>" align="center">
     306    <td nowrap colspan="<?php echo 6 + ($_SESSION['recorded_descunder'] ? 0 : 1) + $recgroup_cols ?>" align="center">
    294307        <span style="padding-right: 25px"><?php echo t('has commflag') ?>:&nbsp;
    295308            <b><?php echo $show->has_commflag ? t('Yes') : t('No') ?></b></span>
    296309        <span style="padding-right: 25px"><?php echo t('has cutlist') ?>:&nbsp;