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 49e6152da0cf0e67f70f986d0fdd80ea72369c59 (commit)
from 0be07847f379e2279389eeeea71fdf5939bf6cd3 (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 -----------------------------------------------------------------
commit 49e6152da0cf0e67f70f986d0fdd80ea72369c59
Author: Franck Villaume <[email protected]>
Date: Fri Jun 27 11:34:15 2014 +0200
use HTML helpers
diff --git a/src/common/widget/Widget_MyMonitoredDocuments.class.php
b/src/common/widget/Widget_MyMonitoredDocuments.class.php
index 3549112..e661da7 100644
--- a/src/common/widget/Widget_MyMonitoredDocuments.class.php
+++ b/src/common/widget/Widget_MyMonitoredDocuments.class.php
@@ -74,7 +74,7 @@ class Widget_MyMonitoredDocuments extends Widget {
$count_new = max(0, $count_diff);
$cells = array();
$cells[] =
array($hide_url.util_make_link('/docman/?group_id='.$group_id,
db_result($result,$j,'group_name')).' '.
- '['.$rows2.($count_new ? ',
'.html_e('b', array(), sprintf(_('%s new'), $count_new).']') : ']'), 'colspan'
=> 2);
+ '['.$rows2.($count_new ? ',
'.html_e('b', array(), sprintf(_('%s new'), $count_new)).']' : ']'), 'colspan'
=> 2);
$html_hdr = $HTML->multiTableRow(array('class'
=> 'boxitem'), $cells);
$html = '';
for ($i = 0; $i < $rows2; $i++) {
diff --git a/src/common/widget/Widget_MyMonitoredForums.class.php
b/src/common/widget/Widget_MyMonitoredForums.class.php
index 144e36f..8f5731a 100644
--- a/src/common/widget/Widget_MyMonitoredForums.class.php
+++ b/src/common/widget/Widget_MyMonitoredForums.class.php
@@ -41,13 +41,13 @@ class Widget_MyMonitoredForums extends Widget {
function getContent() {
global $HTML;
$html_my_monitored_forums = '';
- $sql="SELECT DISTINCT groups.group_id, groups.group_name,
+ $sql = "SELECT DISTINCT groups.group_id, groups.group_name,
forum_group_list.group_forum_id,
forum_group_list.forum_name ".
- "FROM groups,forum_group_list,forum_monitored_forums ".
- "WHERE groups.group_id=forum_group_list.group_id ".
- "AND groups.status = 'A' ".
- "AND
forum_group_list.group_forum_id=forum_monitored_forums.forum_id ".
- "AND forum_monitored_forums.user_id=$1 ";
+ "FROM groups,forum_group_list,forum_monitored_forums ".
+ "WHERE groups.group_id=forum_group_list.group_id ".
+ "AND groups.status = 'A' ".
+ "AND
forum_group_list.group_forum_id=forum_monitored_forums.forum_id ".
+ "AND forum_monitored_forums.user_id=$1 ";
$um = UserManager::instance();
$current_user = $um->getCurrentUser();
if ($current_user->getStatus()=='S') {
@@ -57,7 +57,7 @@ class Widget_MyMonitoredForums extends Widget {
//$sql .= "GROUP BY groups.group_id ORDER BY groups.group_id
ASC LIMIT 100";
$sql .= "ORDER BY groups.group_id ASC LIMIT 100";
- $result=db_query_params($sql,array(user_getid()));
+ $result = db_query_params($sql, array(user_getid()));
$glist = array();
while ($r = db_fetch_array($result)) {
if (forge_check_perm('project', $r['group_id'], 'read')
@@ -66,7 +66,7 @@ class Widget_MyMonitoredForums extends Widget {
}
}
$glist = array_unique($glist);
- $rows=count($glist);
+ $rows = count($glist);
if (!$result || $rows < 1) {
$html_my_monitored_forums .= $HTML->warning_msg(_('You
are not monitoring any forums.')).html_e('p', array(), _("If you monitor
forums, you will be sent new posts in the form of an email, with a link to the
new message.")).html_e('p', array(), _("You can monitor forums by clicking on
the appropriate menu item in the discussion forum itself."));
} else {
@@ -109,27 +109,23 @@ class Widget_MyMonitoredForums extends Widget {
}
list($hide_now,$count_diff,$hide_url) =
my_hide_url('forum',$group_id,$hide_item_id,$rows2,$hide_forum);
-
- $html_hdr = '<tr class="boxitem"><td
colspan="2">'.
-
$hide_url.util_make_link('/forum/?group_id='.$group_id, $group_name).' ';
-
- $html = '';
$count_new = max(0, $count_diff);
+ $cells = array();
+ $cells[] =
array($hide_url.util_make_link('/forum/?group_id='.$group_id, $group_name).'
['.$rows2.($count_new ? ', '.html_e('b', array(), sprintf(_('%s new'),
$count_new)).']' : ']'),
+ 'colspan' => 2);
+ $html_hdr = $HTML->multiTableRow(array('class'
=> 'boxitem'), $cells);
+ $html = '';
for ($i=0; $i<$rows2; $i++) {
if (!$hide_now) {
$group_forum_id =
$flist[$i]['group_forum_id'];
- $html .= '
- <tr '.$HTML->boxGetAltRowStyle($i)
.'"><td style="width:99%">'.
- ' - '.
-
util_make_link('/forum/forum.php?forum_id='.$group_forum_id,
$flist[$i]['forum_name']).'</td>'.
- '<td class="align-center">'.
-
util_make_link('/forum/monitor.php?forum_id='.$group_forum_id.'&group_id='.$group_id.'&stop=1',
-
$HTML->getDeletePic(_('Stop Monitoring'), _('Stop Monitoring'), array('onClick'
=> 'return confirm("'._('Stop monitoring this forum?').'")'))).
- '</td></tr>';
+ $cells = array();
+ $cells[] =
array(' - '.util_make_link('/forum/forum.php?forum_id='.$group_forum_id,
$flist[$i]['forum_name']), 'style' => 'width:99%');
+ $cells[] =
array(util_make_link('/forum/monitor.php?forum_id='.$group_forum_id.'&group_id='.$group_id.'&stop=1',
+
$HTML->getDeletePic(_('Stop Monitoring'), _('Stop Monitoring'), array('onClick'
=> 'return confirm("'._('Stop monitoring this forum?').'")'))),
+ 'class' =>
'align-center');
+ $html .=
$HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($i, true)),
$cells);
}
}
-
- $html_hdr .= '['.$rows2.($count_new ? ",
<b>".sprintf(_('%s new'), $count_new)."</b>]" : ']').'</td></tr>';
$html_my_monitored_forums .= $html_hdr.$html;
}
$html_my_monitored_forums .= $HTML->listTableBottom();
diff --git a/src/common/widget/Widget_MyProjects.class.php
b/src/common/widget/Widget_MyProjects.class.php
index 0f27270..64f01f0 100644
--- a/src/common/widget/Widget_MyProjects.class.php
+++ b/src/common/widget/Widget_MyProjects.class.php
@@ -51,7 +51,7 @@ class Widget_MyProjects extends Widget {
if (count ($groups) < 1) {
$html_my_projects .= $HTML->warning_msg(_("You're not a
member of any project"));
} else {
- $html_my_projects .= '<table style="width:100%">';
+ $html_my_projects .= $HTML->listTableTop();
$i = 0;
$ra = RoleAnonymous::getInstance();
foreach ($groups as $g) {
@@ -90,7 +90,7 @@ class Widget_MyProjects extends Widget {
$html_my_projects .=
'</td><td> </td></tr>';
}
}
- $html_my_projects .= '</table>';
+ $html_my_projects .= $HTML->listTableBottom();
if (isset($private_shown) && $private_shown) {
$html_my_projects .= '
<span>(*) <em>'._('Private
project').'</em></span>';
@@ -127,15 +127,15 @@ class Widget_MyProjects extends Widget {
foreach ($projects as $project) {
$pid = $project->getID();
$title = $project->getPublicName();
- $url = util_make_url('/projects/' .
$project->getUnixName());
+ $url = util_make_uri('/projects/' .
$project->getUnixName());
- if (
!RoleAnonymous::getInstance()->hasPermission('project_read',$pid)) {
+ if (
!RoleAnonymous::getInstance()->hasPermission('project_read', $pid)) {
$title .= ' (*)';
}
$desc = "Project: $url\n";
- if (forge_check_perm ('project_admin', $pid)) {
- $desc .= '<br />Admin: '.
util_make_url('/project/admin/?group_id='.$pid);
+ if (forge_check_perm('project_admin', $pid)) {
+ $desc .= '<br />Admin: '.
util_make_uri('/project/admin/?group_id='.$pid);
}
$rss->addItem(array(
diff --git a/src/common/widget/Widget_MyProjectsLastDocuments.class.php
b/src/common/widget/Widget_MyProjectsLastDocuments.class.php
index f79e363..0d51195 100644
--- a/src/common/widget/Widget_MyProjectsLastDocuments.class.php
+++ b/src/common/widget/Widget_MyProjectsLastDocuments.class.php
@@ -55,7 +55,7 @@ class Widget_MyProjectsLastDocuments extends Widget {
} else {
$hide_item_id = null;
}
- $html_my_projects .= '<table style="width:100%">';
+ $html_my_projects .= $HTML->listTableTop();
$i = 0;
foreach ($groups as $g) {
if ($g->usesDocman()) {
@@ -123,7 +123,7 @@ class Widget_MyProjectsLastDocuments extends Widget {
$html_my_projects .= $html_hdr.$html;
}
}
- $html_my_projects .= '</table>';
+ $html_my_projects .= $HTML->listTableBottom();
}
return $html_my_projects;
}
diff --git a/src/common/widget/Widget_MySurveys.class.php
b/src/common/widget/Widget_MySurveys.class.php
index c127a20..a1c1ded 100644
--- a/src/common/widget/Widget_MySurveys.class.php
+++ b/src/common/widget/Widget_MySurveys.class.php
@@ -65,7 +65,7 @@ class Widget_MySurveys extends Widget {
} else {
global $HTML;
$request =& HTTPRequest::instance();
- $html_my_surveys .= '<table style="width:100%">';
+ $html_my_surveys .= $HTML->listTableTop();
foreach ($projects as $project) {
$group_id = $project->getID();
$surveyfacto = new SurveyFactory($project);
@@ -132,7 +132,7 @@ class Widget_MySurveys extends Widget {
$html_hdr .= '['.count($surveys).($count_new ?
", <b>".sprintf(_('%d new'), $count_new)."</b>]" : ']').'</td></tr>';
$html_my_surveys .= $html_hdr.$html;
}
- $html_my_surveys .= '</table>';
+ $html_my_surveys .= $HTML->listTableBottom();
}
$this->content = $html_my_surveys;
}
diff --git a/src/common/widget/Widget_MyTasks.class.php
b/src/common/widget/Widget_MyTasks.class.php
index 99168a5..0e418c5 100644
--- a/src/common/widget/Widget_MyTasks.class.php
+++ b/src/common/widget/Widget_MyTasks.class.php
@@ -1,6 +1,7 @@
<?php
/**
* Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights
reserved
+ * Copyright 2014, Franck Villaume - TrivialDev
*
* This file is a part of Fusionforge.
*
@@ -58,69 +59,69 @@ class Widget_MyTasks extends Widget {
$rows = count($plist);
if ($result && $rows >= 1) {
- $request =& HTTPRequest::instance();
- $this->content .= '<table style="width:100%">';
- for ($j=0; $j<$rows; $j++) {
-
- $group_id = $plist[$j]['group_id'];
- $group_project_id = $plist[$j]['group_project_id'];
-
- $sql2 = 'SELECT project_task.project_task_id,
project_task.priority, project_task.summary,project_task.percent_complete '.
- 'FROM
groups,project_group_list,project_task,project_assigned_to '.
- 'WHERE
project_task.project_task_id=project_assigned_to.project_task_id '.
- "AND project_assigned_to.assigned_to_id=$1 AND
project_task.status_id='1' ".
- 'AND
project_group_list.group_id=groups.group_id '.
- "AND groups.group_id=$2 ".
- 'AND
project_group_list.group_project_id=project_task.group_project_id '.
- "AND project_group_list.group_project_id= $3
LIMIT 100";
-
- $result2 =
db_query_params($sql2,array(user_getid(),$group_id,$group_project_id));
- $rows2 = db_numrows($result2);
-
- $vItemId = new Valid_UInt('hide_item_id');
- $vItemId->required();
- if($request->valid($vItemId)) {
- $hide_item_id = $request->get('hide_item_id');
- } else {
- $hide_item_id = null;
- }
+ $request =& HTTPRequest::instance();
+ $this->content .= $HTML->listTableTop();
+ for ($j=0; $j<$rows; $j++) {
+
+ $group_id = $plist[$j]['group_id'];
+ $group_project_id =
$plist[$j]['group_project_id'];
+
+ $sql2 = 'SELECT project_task.project_task_id,
project_task.priority, project_task.summary,project_task.percent_complete '.
+ 'FROM
groups,project_group_list,project_task,project_assigned_to '.
+ 'WHERE
project_task.project_task_id=project_assigned_to.project_task_id '.
+ "AND
project_assigned_to.assigned_to_id=$1 AND project_task.status_id='1' ".
+ 'AND
project_group_list.group_id=groups.group_id '.
+ "AND groups.group_id=$2 ".
+ 'AND
project_group_list.group_project_id=project_task.group_project_id '.
+ "AND
project_group_list.group_project_id= $3 LIMIT 100";
+
+ $result2 =
db_query_params($sql2,array(user_getid(),$group_id,$group_project_id));
+ $rows2 = db_numrows($result2);
+
+ $vItemId = new Valid_UInt('hide_item_id');
+ $vItemId->required();
+ if($request->valid($vItemId)) {
+ $hide_item_id =
$request->get('hide_item_id');
+ } else {
+ $hide_item_id = null;
+ }
- $vPm = new Valid_WhiteList('hide_pm', array(0, 1));
- $vPm->required();
- if($request->valid($vPm)) {
- $hide_pm = $request->get('hide_pm');
- } else {
- $hide_pm = null;
- }
+ $vPm = new Valid_WhiteList('hide_pm', array(0,
1));
+ $vPm->required();
+ if($request->valid($vPm)) {
+ $hide_pm = $request->get('hide_pm');
+ } else {
+ $hide_pm = null;
+ }
- list($hide_now,$count_diff,$hide_url) =
my_hide_url('pm',$group_project_id,$hide_item_id,$rows2,$hide_pm);
+ list($hide_now,$count_diff,$hide_url) =
my_hide_url('pm',$group_project_id,$hide_item_id,$rows2,$hide_pm);
- $html_hdr = '<tr class="boxitem"><td colspan="3">'.
-
$hide_url.util_make_link('/pm/task.php?group_id='.$group_id.'&group_project_id='.$group_project_id,
-
db_result($result,$j,'group_name').' - '.db_result($result,$j,'project_name'));
- $html = '';
- $count_new = max(0, $count_diff);
- for ($i=0; $i<$rows2; $i++) {
+ $html_hdr = '<tr class="boxitem"><td
colspan="3">'.
+
$hide_url.util_make_link('/pm/task.php?group_id='.$group_id.'&group_project_id='.$group_project_id,
+
db_result($result,$j,'group_name').' - '.db_result($result,$j,'project_name'));
+ $html = '';
+ $count_new = max(0, $count_diff);
+ for ($i=0; $i<$rows2; $i++) {
- if (!$hide_now) {
+ if (!$hide_now) {
- $html .= '
- <tr
class="priority'.db_result($result2,$i,'priority').
- '"><td class="small">'.
-
util_make_link('/pm/task.php/?func=detailtask&project_task_id='.db_result($result2,
$i, 'project_task_id').
-
'&group_id='.$group_id.'&group_project_id='.$group_project_id,
-
stripslashes(db_result($result2,$i,'summary'))).'</td>'.
- '<td
class="small">'.(db_result($result2,$i,'percent_complete')).'%</td></tr>';
+ $html .= '
+ <tr
class="priority'.db_result($result2,$i,'priority').
+ '"><td class="small">'.
+
util_make_link('/pm/task.php/?func=detailtask&project_task_id='.db_result($result2,
$i, 'project_task_id').
+
'&group_id='.$group_id.'&group_project_id='.$group_project_id,
+
stripslashes(db_result($result2,$i,'summary'))).'</td>'.
+ '<td
class="small">'.(db_result($result2,$i,'percent_complete')).'%</td></tr>';
+ }
}
- }
- $html_hdr .=
my_item_count($rows2,$count_new).'</td></tr>';
- $this->content .= $html_hdr.$html;
- }
- $this->content .= '</table>';
+ $html_hdr .=
my_item_count($rows2,$count_new).'</td></tr>';
+ $this->content .= $html_hdr.$html;
+ }
+ $this->content .= $HTML->listTableBottom();
} else {
- $this->content .= $HTML->warning_msg(_('No task yet'));
+ $this->content .= $HTML->warning_msg(_('No task yet'));
}
}
function getTitle() {
-----------------------------------------------------------------------
Summary of changes:
.../widget/Widget_MyMonitoredDocuments.class.php | 2 +-
.../widget/Widget_MyMonitoredForums.class.php | 42 ++++----
src/common/widget/Widget_MyProjects.class.php | 12 +--
.../Widget_MyProjectsLastDocuments.class.php | 4 +-
src/common/widget/Widget_MySurveys.class.php | 4 +-
src/common/widget/Widget_MyTasks.class.php | 109 ++++++++++----------
6 files changed, 85 insertions(+), 88 deletions(-)
hooks/post-receive
--
FusionForge
_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits