$dbSql->tpl->assign( 'job_status', $job_status );
- // Jobs per page
- $jobs_per_page = array( 25,50,75,100,150 );
- $dbSql->tpl->assign( 'jobs_per_page', $jobs_per_page );
-
// Global variables
$job_level = array( 'D' => 'Diff', 'I' => 'Incr', 'F' => 'Full' );
// order by
$query .= "ORDER BY Job.JobId DESC ";
+ // Jobs per page
+ $jobs_per_page = array( 25 => '25', 50 => '50', 75 => '75', 100 => '100', 150 => '150' );
+
// Determine how many jobs to display
- if( isset($_POST['jobs_per_page']) )
+ if( isset($_POST['jobs_per_page']) ) {
$query .= "LIMIT " . $_POST['jobs_per_page'];
- else
+ $dbSql->tpl->assign( 'jobs_per_page_selected', $_POST['jobs_per_page'] );
+ }else
$query .= "LIMIT 25 ";
-
- //echo $query . '<br />';
+ $dbSql->tpl->assign( 'jobs_per_page', $jobs_per_page );
$jobsresult = $dbSql->db_link->query( $query );
<td class="info" width="200">
{$total_jobs} jobs found
</td>
- <td class="info" colspan="5">
+ <td class="info" colspan="5" width="160">
Jobs / Page
- <select name="jobs_per_page">
- {foreach from=$jobs_per_page item=nb_jobs}
- <option value="{$nb_jobs}" {if $smarty.post.jobs_per_page == $nb_jobs}Selected{/if} >{$nb_jobs}
- {/foreach}
- </select>
+ {html_options name=jobs_per_page options=$jobs_per_page selected=$jobs_per_page_selected onChange="submit();"}
</td>
<td class="info" width="160">
Job status
{html_options name=status values=$job_status options=$job_status selected=$job_status_filter onChange="submit();"}
</td>
- <!--
- <td class="info" width="120">
- <input type="submit" value="Update" />
- </td>
- -->
</tr>
<tr>
<td colspan="8"> </td>