} elsif ($action eq 'overview') {
$bweb->can_do('r_view_job');
print "<div><table border='0'><tr><td valign='top'>\n";
- my $fields = $bweb->get_form(qw/level filter age jobtype since
+ my $fields = $bweb->get_form(qw/level filter age jobtype since type
db_client_groups qclient_groups/); # drop this to hide
$fields->{action}='overview';
+ $fields->{view_time_slice}=1;
$bweb->display($fields, "display_form_job.tpl");
print "</td><td valign='top'>";
} elsif ($action eq 'overview_zoom') {
$bweb->can_do('r_view_job');
print "<div><table border='0'><tr><td valign='top'>\n";
- my $fields = $bweb->get_form(qw/level filter age jobtype since
+ my $fields = $bweb->get_form(qw/level filter age jobtype since type
db_client_groups qclient_groups/); # drop this to hide
$fields->{action}='overview_zoom';
+ $fields->{view_time_slice}=1;
$bweb->display($fields, "display_form_job.tpl");
print "</td><td valign='top'>";
$bweb->display_overview_zoom();
<tr>
<td valign='top'>
<h2>Since</h2>
- <input type='text' name='since' size='17' title='YYY-MM-DD'
+ <input type='text' id='since' name='since' size='17' title='YYY-MM-DD'
value='<TMPL_VAR since>' class='formulaire'>
</td>
</tr>
<tr>
<td valign='top'>
<h2>Age</h2>
- <select name='age' class='formulaire'>
+ <select name='age' class='formulaire' onclick='document.getElementById("since").value="";'>
<option id='age_604800' value='604800'>1 week</option>
<option id='age_2678400' value='2678400'>30 days</option>
<option id='age_15552000' value='15552000'>6 month</option>
</td>
</tr>
</TMPL_UNLESS>
+<TMPL_IF view_time_slice>
+<tr>
+ <td valign='top'>
+ <h2>Time slice</h2>
+ <select name='type' class='formulaire'>
+ <option id='slice_day' value='day'>Per days</option>
+ <option id='slice_week' value='week'>Per weeks</option>
+ <option id='slice_month' value='month'>Per months</option>
+ </select>
+ </td>
+ </tr>
+</TMPL_IF>
<tr>
<td valign='bottom'>
<h2>Number of items</h2>
document.getElementById('age_<TMPL_VAR age>').selected=true;
</TMPL_IF>
+ <TMPL_IF type>
+ document.getElementById('slice_<TMPL_VAR type>').selected=true;
+ </TMPL_IF>
+
<TMPL_IF jobtype>
document.getElementById('jobtype_<TMPL_VAR jobtype>').selected=true;
</TMPL_IF>