$job_status = array( 'Any', 'Waiting', 'Running', 'Completed', 'Failed', 'Canceled' );
$smarty->assign( 'job_status', $job_status );
+ // Jobs per page
+ $jobs_per_page = array( 25,50,75,100,150 );
+ $smarty->assign( 'jobs_per_page', $jobs_per_page );
+
// Global variables
$job_level = array( 'D' => 'Diff', 'I' => 'Incr', 'F' => 'Full' );
$query .= "ORDER BY Job.JobId DESC ";
// Determine how many jobs to display
- if( isset($_POST['limit']) )
- $query .= "LIMIT " . $_POST['limit'];
+ if( isset($_POST['jobs_per_page']) )
+ $query .= "LIMIT " . $_POST['jobs_per_page'];
else
- $query .= "LIMIT 20 ";
+ $query .= "LIMIT 25 ";
//echo $query . '<br />';
</td>
<td class="info" colspan="5" style="text-align: right;">
Jobs / Page
- <select name="limit">
- <option value="20">20
- <option value="40">40
- <option value="60">60
- <option value="80">80
- <option value="100">100
+ <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>
</td>
<td class="info" width="200">
Job Status
<select name="status">
{foreach from=$job_status item=status_label}
- <option value="{$status_label}" {if $smarty.post.status == $status_label}Selected{/if}>{$status_label}
-<!--
- <option value="waiting">Waiting
- <option value="running">Running
- <option value="completed">Completed
- <option value="failed">Failed
- <option value="canceled">Canceled
--->
+ <option value="{$status_label}" {if $smarty.post.status == $status_label}Selected{/if} >{$status_label}
{/foreach}
</select>
</td>