This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".
The branch, master has been updated
via 807b2434a230e51bb635654f12da3872e2b8b38f (commit)
via 8524561a11164a84cb3b3d5adafc2d57c85c8a9b (commit)
from 818cc73a5e4e98a67fc2df98dbe3c0885e62738a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=807b2434a230e51bb635654f12da3872e2b8b38f
commit 807b2434a230e51bb635654f12da3872e2b8b38f
Author: Franck Villaume <[email protected]>
Date: Fri Aug 11 09:36:39 2017 +0000
use themable pic
diff --git a/src/www/pm/index.php b/src/www/pm/index.php
index 3923b3f..ba929f1 100644
--- a/src/www/pm/index.php
+++ b/src/www/pm/index.php
@@ -88,7 +88,7 @@ if (count($pg_arr) < 1 || $pg_arr == false) {
echo $pg_arr[$j]->getErrorMessage();
} else {
$cells = array();
- $cells[][] =
util_make_link('/pm/task.php?group_project_id='.$pg_arr[$j]->getID().'&group_id='.$group_id.'&func=browse',
html_image("ic/taskman20w.png", 20, 20). ' '.$pg_arr[$j]->getName());
+ $cells[][] =
util_make_link('/pm/task.php?group_project_id='.$pg_arr[$j]->getID().'&group_id='.$group_id.'&func=browse',
$HTML->getPmPic(). ' '.$pg_arr[$j]->getName());
$cells[][] = $pg_arr[$j]->getDescription();
$cells[] = array((int) $pg_arr[$j]->getOpenCount(),
'class' => 'align-center');
$cells[] = array((int) $pg_arr[$j]->getTotalCount(),
'class' => 'align-center');
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=8524561a11164a84cb3b3d5adafc2d57c85c8a9b
commit 8524561a11164a84cb3b3d5adafc2d57c85c8a9b
Author: Franck Villaume <[email protected]>
Date: Fri Aug 11 09:32:37 2017 +0000
pm index page: sync with tracker index page display
diff --git a/src/www/pm/index.php b/src/www/pm/index.php
index 4746057..3923b3f 100644
--- a/src/www/pm/index.php
+++ b/src/www/pm/index.php
@@ -55,9 +55,10 @@ if ($pg_arr && $pgf->isError()) {
exit_error($pgf->getErrorMessage(),'pm');
}
+html_use_tablesorter();
pm_header(array('title' => sprintf(_('Subprojects for %s'),
$g->getPublicName())));
-plugin_hook("blocks", "tasks index");
+plugin_hook('blocks', 'tasks index');
if (count($pg_arr) < 1 || $pg_arr == false) {
echo $HTML->information(_('No Subprojects Found'));
@@ -71,94 +72,14 @@ if (count($pg_arr) < 1 || $pg_arr == false) {
Put the result set (list of projects for this group) into a
column with folders
*/
- $sortcol = util_ensure_value_in_set(getStringFromRequest('sortcol'),
- array('project_id',
-
'project_description',
- 'project_name',
- 'open_count',
- 'total_count'));
- $sortorder = util_ensure_value_in_set(getStringFromRequest('sortorder'),
- array('a',
- 'd'));
-
- function build_column_sort_header($group_id, $title, $val) {
- global $sortcol, $sortorder;
-
- if ($sortcol != $val) {
- return
util_make_link('/pm/?group_id='.$group_id.'&sortcol='.$val, $title);
- } elseif ($sortorder == 'a') {
- return
util_make_link('/pm/?group_id='.$group_id.'&sortcol='.$val.'&sortorder=d',
$title.' ▴');
- } else {
- return
util_make_link('/pm/?group_id='.$group_id.'&sortcol='.$val.'&sortorder=a',
$title.' ▾');
- }
- }
-
$tablearr = array();
- $tablearr[] = build_column_sort_header($group_id, _('Id'),
'project_id');
- $tablearr[] = build_column_sort_header($group_id, _('Subproject Name'),
'project_name');
- $tablearr[] = build_column_sort_header($group_id, _('Description'),
'project_description');
- $tablearr[] = build_column_sort_header($group_id, _('Open'),
'open_count');
- $tablearr[] = build_column_sort_header($group_id, _('Total'),
'total_count');
- echo $HTML->listTableTop($tablearr);
-
- function project_group_comparator($a, $b) {
- global $sortcol, $sortorder;
-
- switch ($sortcol) {
- case 'project_name':
- $sorttype = 'str';
- $va = $a->getName();
- $vb = $b->getName();
- break;
- case 'project_description':
- $sorttype = 'str';
- $va = $a->getDescription();
- $vb = $b->getDescription();
- break;
- case 'project_id':
- $sorttype = 'int';
- $va = $a->getID();
- $vb = $b->getID();
- break;
- case 'open_count':
- $sorttype = 'int';
- $va = $a->getOpenCount();
- $vb = $b->getOpenCount();
- break;
- case 'total_count':
- $sorttype = 'int';
- $va = $a->getTotalCount();
- $vb = $b->getTotalCount();
- break;
- default:
- return 0;
- }
-
- switch ($sorttype) {
- case 'str':
- $tmp = strcoll($va, $vb);
- break;
- case 'int':
- if ($va < $vb) {
- $tmp = -1;
- } elseif ($va > $vb) {
- $tmp = 1;
- } else {
- $tmp = 0;
- }
- break;
- default:
- return 0;
- }
-
- if ($sortorder == 'd') {
- return -$tmp;
- } else {
- return $tmp;
- }
- }
+ $tablearr[] = _('Subproject Name');
+ $tablearr[] = _('Description');
+ $tablearr[] = _('Open');
+ $tablearr[] = _('Total');
+ $thclass = array(array(), array(), array('class' => 'align-center'),
array('class' => 'align-center'));
- usort($pg_arr, 'project_group_comparator');
+ echo $HTML->listTableTop($tablearr, array(), 'full sortable
sortable_table_pm', 'sortable_table_pm', array(), array(), $thclass);
for ($j = 0; $j < count($pg_arr); $j++) {
if (!is_object($pg_arr[$j])) {
@@ -166,14 +87,12 @@ if (count($pg_arr) < 1 || $pg_arr == false) {
} elseif ($pg_arr[$j]->isError()) {
echo $pg_arr[$j]->getErrorMessage();
} else {
- echo '
- <tr>
-
<td>'.util_make_link('/pm/task.php?group_project_id='.$pg_arr[$j]->getID().'&group_id='.$group_id.'&func=browse',
html_image("ic/taskman20w.png", 20, 20) . '
'.$pg_arr[$j]->getID()).'</td>
-
<td>'.util_make_link('/pm/task.php?group_project_id='.$pg_arr[$j]->getID().'&group_id='.$group_id.'&func=browse',
$pg_arr[$j]->getName()).'</td>
- <td>'.$pg_arr[$j]->getDescription() .'</td>
- <td class="align-right">'. (int)
$pg_arr[$j]->getOpenCount().'</td>
- <td class="align-right">'. (int)
$pg_arr[$j]->getTotalCount().'</td>
- </tr>';
+ $cells = array();
+ $cells[][] =
util_make_link('/pm/task.php?group_project_id='.$pg_arr[$j]->getID().'&group_id='.$group_id.'&func=browse',
html_image("ic/taskman20w.png", 20, 20). ' '.$pg_arr[$j]->getName());
+ $cells[][] = $pg_arr[$j]->getDescription();
+ $cells[] = array((int) $pg_arr[$j]->getOpenCount(),
'class' => 'align-center');
+ $cells[] = array((int) $pg_arr[$j]->getTotalCount(),
'class' => 'align-center');
+ echo $HTML->multiTableRow(array(), $cells);
}
}
echo $HTML->listTableBottom();
-----------------------------------------------------------------------
Summary of changes:
src/www/pm/index.php | 109 +++++++--------------------------------------------
1 file changed, 14 insertions(+), 95 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits