* Copyright 2002 GForge, LLC, Tim Perdue
* Copyright 2010, FusionForge Team
* Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2014, Franck Villaume - TrivialDev
* http://fusionforge.org
*
* This file is part of FusionForge. FusionForge is free software;
$paging = 25;
}
-
$ptf->setup($offset,$_order,$paging,$set,$_assigned_to,$_status,$_category_id,$_view);
if ($ptf->isError()) {
exit_error($ptf->getErrorMessage(),'pm');
$cat_name_arr[]=_('Any');
$cat_box=html_build_select_box_from_arrays ($cat_id_arr,$cat_name_arr,'_category_id',$_category_id,true,'none');
-
/*
Creating a custom sort box
*/
<td>'._('Sort On').'<br />'. $order_box .'</td>
<td>'._('Detail View').'<br />'. $view_box .'</td>
<td><input type="submit" name="submit" value="'._('Browse').'" /></td>
- </tr></table></form><p />';
-
+ </tr></table></form>';
$rows=count($pt_arr);
if ($rows < 1) {
*/
echo '<tr><td colspan="2">';
if ($offset > 0) {
- echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset-50),'<strong>← '._('previous').'</strong>');
+ echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset-$paging),'<strong>← '._('previous').'</strong>');
} else {
echo ' ';
}
echo '</td><td> </td><td colspan="2">';
- if ($rows==50) {
- echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset+50),'<strong>'._('next').' →</strong></a>');
+ // currently pm knows only 4 status_id : 100, 1, 2, 3 (any, open, closed, deleted)
+ switch ($_status) {
+ case 1: {
+ $totalTasks = $pg->getOpenCount();
+ break;
+ }
+ case 2:
+ case 3: {
+ $totalTasks = $pg->getCount($_status);
+ break;
+ }
+ default: {
+ $totalTasks = $pg->getTotalCount();
+ break;
+ }
+ }
+ if ($totalTasks > $offset + $paging) {
+ echo util_make_link ('/pm/task.php?func=browse&group_project_id='.$group_project_id.'&group_id='.$group_id.'&offset='.($offset+$paging),'<strong>'._('next').' →</strong></a>');
} else {
echo ' ';
}
<table class="fullwidth">
<tr><td colspan="2">
<p>
- <span class="important">'._('<strong>Admin:</strong> If you wish to apply changes to all items selected above, use these controls to change their properties and click once on "Mass Update".').'</span>
+ <span class="important">'._('If you wish to apply changes to all items selected above, use these controls to change their properties and click once on “Mass Update”.').'</span>
</p>
</td></tr>
_('No Change')) .'</td>
<td><strong>'._('Priority').
'</strong><br />';
- echo build_priority_select_box ('priority', '100', true);
+ build_priority_select_box ('priority', '100', true);
echo '</td>
</tr>