Ticket #291: 2005-10-01_sort_results.diff
File 2005-10-01_sort_results.diff, 6.0 KB (added by , 20 years ago) |
---|
-
mythweb/themes/Default/recorded_programs.php
94 94 $group_field = ""; 95 95 } 96 96 97 // specify some state which should be retained 98 $page_state_list = array(); 99 $page_state = ""; 100 if ($_GET['recgroup']) { 101 $page_state_list[] = "recgroup=" . urlencode($_GET['recgroup']); 102 } 103 if ($_GET['title']) { 104 $page_state_list[] = "title=" . urlencode($_GET['title']); 105 } 106 $page_state = implode('&', $page_state_list); 107 97 108 ?> 98 109 99 110 <table width="100%" border="0" cellpadding="4" cellspacing="2" class="list small"> … … 104 115 if (show_recorded_pixmaps) 105 116 echo "\t<td>".t('preview')."</td>\n"; 106 117 ?> 107 <td><?php echo get_sort_link('title', t('title') ) ?></td>108 <td><?php echo get_sort_link('subtitle', t('subtitle') ) ?></td>118 <td><?php echo get_sort_link('title', t('title'), $page_state) ?></td> 119 <td><?php echo get_sort_link('subtitle', t('subtitle'), $page_state) ?></td> 109 120 <?php 110 121 if (!$_SESSION['recorded_descunder']) 111 echo "\t<td>".get_sort_link('description', t('description') )."</td>\n";122 echo "\t<td>".get_sort_link('description', t('description'), $page_state)."</td>\n"; 112 123 ?> 113 <td><?php echo get_sort_link('channum', t('channum') ) ?></td>114 <td><?php echo get_sort_link('recgroup', t('recgroup') ) ?></td>115 <td><?php echo get_sort_link('airdate', t('airdate') ) ?></td>116 <td><?php echo get_sort_link('length', t('length') ) ?></td>117 <td><?php echo get_sort_link('file_size', t('file size') ) ?></td>124 <td><?php echo get_sort_link('channum', t('channum'), $page_state) ?></td> 125 <td><?php echo get_sort_link('recgroup', t('recgroup'), $page_state) ?></td> 126 <td><?php echo get_sort_link('airdate', t('airdate'), $page_state) ?></td> 127 <td><?php echo get_sort_link('length', t('length'), $page_state) ?></td> 128 <td><?php echo get_sort_link('file_size', t('file size'), $page_state) ?></td> 118 129 </tr><?php 119 130 $row = 0; 120 131 -
mythweb/themes/Default/scheduled_recordings.php
28 28 29 29 <div id="display_options" class="command command_border_l command_border_t command_border_b command_border_r"> 30 30 31 <form id="change_display" action="scheduled_recordings.php" method="post"> 32 <input type="hidden" name="change_display" value="1"> 31 <form id="change_display" action="scheduled_recordings.php" method="get"> 33 32 34 33 <?php echo t('Display') ?>: 35 34 … … 55 54 56 55 <table id="listings" width="100%" border="0" cellpadding="4" cellspacing="2" class="list small"> 57 56 <tr class="menu"> 58 <?php if ($group_field != '') echo "<td class=\"list\"> </td>\n"; ?> 59 <td><?php echo get_sort_link('title', t('title')) ?></td> 60 <td><?php echo get_sort_link('channum', t('channum')) ?></td> 61 <td><?php echo get_sort_link('airdate', t('airdate')) ?></td> 62 <td><?php echo get_sort_link('length', t('length')) ?></td> 57 <?php 58 if ($group_field != '') echo "<td class=\"list\"> </td>\n"; 59 60 // page state to preserve 61 $page_state_list = array(); 62 $page_state = ""; 63 $session_stateful_fields = array('disp_scheduled', 'disp_duplicates', 'disp_deactivated', 'disp_conflicts'); 64 foreach ($session_stateful_fields as $s) { 65 if ($_SESSION['scheduled_recordings'][$s]) { 66 $page_state_list[] = "$s=on"; 67 } 68 } 69 $page_state = implode('&', $page_state_list); 70 71 ?> 72 <td><?php echo get_sort_link('title', t('title'), $page_state) ?></td> 73 <td><?php echo get_sort_link('channum', t('channum'), $page_state) ?></td> 74 <td><?php echo get_sort_link('airdate', t('airdate'), $page_state) ?></td> 75 <td><?php echo get_sort_link('length', t('length'), $page_state) ?></td> 63 76 <td align="center" colspan="2"><?php echo t('Commands') ?></a></td> 64 77 </tr><?php 65 78 $row = 0; -
mythweb/scheduled_recordings.php
48 48 } 49 49 50 50 // Ignore certain shows? 51 if ($_POST['change_display']) { 52 $_SESSION['scheduled_recordings']['disp_scheduled'] = $_POST['disp_scheduled'] ? true : false; 53 $_SESSION['scheduled_recordings']['disp_duplicates'] = $_POST['disp_duplicates'] ? true : false; 54 $_SESSION['scheduled_recordings']['disp_deactivated'] = $_POST['disp_deactivated'] ? true : false; 55 $_SESSION['scheduled_recordings']['disp_conflicts'] = $_POST['disp_conflicts'] ? true : false; 56 } 51 $_SESSION['scheduled_recordings']['disp_scheduled'] = $_REQUEST['disp_scheduled'] ? true : false; 52 $_SESSION['scheduled_recordings']['disp_duplicates'] = $_REQUEST['disp_duplicates'] ? true : false; 53 $_SESSION['scheduled_recordings']['disp_deactivated'] = $_REQUEST['disp_deactivated'] ? true : false; 54 $_SESSION['scheduled_recordings']['disp_conflicts'] = $_REQUEST['disp_conflicts'] ? true : false; 57 55 58 56 // Defaults 59 57 if (!is_array($_SESSION['scheduled_recordings']) -
mythweb/includes/sorting.php
12 12 get_sort_link: 13 13 returns a formatted link to the specified sort field 14 14 */ 15 function get_sort_link($field, $string ) {15 function get_sort_link($field, $string, $addl = NULL) { 16 16 $status = sort_status($field); 17 $link = '<a href="'.$_SERVER['PHP_SELF'].'?sortby='.urlencode($field).'">' 17 $link = '<a href="'.$_SERVER['PHP_SELF'].'?' 18 .($addl ? $addl . '&' : '') 19 .'sortby='.urlencode($field).'">' 18 20 .$string 19 21 .'</a>'; 20 22 if ($status == 1)