[Fusionforge-commits] r10728 - trunk/src/www/tracker
Franck VILLAUME
nerville at libremir.placard.fr.eu.org
Sun Sep 26 19:52:48 CEST 2010
Author: nerville
Date: 2010-09-26 19:52:48 +0200 (Sun, 26 Sep 2010)
New Revision: 10728
Modified:
trunk/src/www/tracker/detail.php
trunk/src/www/tracker/mod-limited.php
trunk/src/www/tracker/mod.php
Log:
remove useless code.... display things once is enough
Modified: trunk/src/www/tracker/detail.php
===================================================================
--- trunk/src/www/tracker/detail.php 2010-09-26 17:31:13 UTC (rev 10727)
+++ trunk/src/www/tracker/detail.php 2010-09-26 17:52:48 UTC (rev 10728)
@@ -85,7 +85,6 @@
<?php
$ath->renderExtraFields($ah->getExtraFieldData(),true,'none',false,'Any','',false,'DISPLAY');
$ath->renderRelatedTasks($group, $ah);
- $ath->renderFiles($group_id, $ah);
?>
<tr><td colspan="2"><strong><?php echo _('Summary') ?>:</strong><br /><?php echo $ah->getSummary(); ?></td></tr>
@@ -138,28 +137,8 @@
//
// print a list of files attached to this Artifact
//
- $file_list =& $ah->getFiles();
-
- $count=count($file_list);
-
- if ($count > 0) {
-
- $title_arr=array();
- $title_arr[]=_('Name');
- $title_arr[]=_('Download');
- echo $GLOBALS['HTML']->listTableTop ($title_arr);
- for ($i=0; $i<$count; $i++) {
- echo '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'>
- <td>'. htmlspecialchars($file_list[$i]->getName()) .'</td>
- <td>'.util_make_link ('/tracker/download.php/'.$group_id.'/'.$ath->getID().'/'.$ah->getID().'/'.$file_list[$i]->getID().'/'.$file_list[$i]->getName(),_('Download')).'</td>
- </tr>';
- }
- echo $GLOBALS['HTML']->listTableBottom();
-
- } else {
- echo _('No Files Currently Attached');
- }
-?>
+ $ath->renderFiles($group_id, $ah);
+ ?>
</td></tr>
</table>
</div>
Modified: trunk/src/www/tracker/mod-limited.php
===================================================================
--- trunk/src/www/tracker/mod-limited.php 2010-09-26 17:31:13 UTC (rev 10727)
+++ trunk/src/www/tracker/mod-limited.php 2010-09-26 17:52:48 UTC (rev 10728)
@@ -1,14 +1,27 @@
<?php
/**
- * SourceForge Generic Tracker facility
+ * Tracker Detail
*
- * SourceForge: Breaking Down the Barriers to Open Source Development
* Copyright 1999-2001 (c) VA Linux Systems
- * http://sourceforge.net
+ * http://fusionforge.org/
*
+ * This file is part of FusionForge.
+ *
+ * FusionForge is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * FusionForge is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with FusionForge; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-
$ath->header(array
('title' => _('Modify').' [#'.$ah->getID(). '] '
. util_unconvert_htmlspecialchars($ah->getSummary()),
@@ -117,7 +130,6 @@
</tr>
<?php
$ath->renderRelatedTasks($group, $ah);
- $ath->renderFiles($group_id, $ah);
?>
<tr>
<td colspan="2"><strong><?php echo _('Summary')?><?php echo utils_requiredField(); ?>: <a href="javascript:help_window('/help/tracker.php?helpname=summary')"><strong>(?)</strong></a></strong><br />
@@ -160,32 +172,7 @@
//
// print a list of files attached to this Artifact
//
- $file_list =& $ah->getFiles();
-
- $count=count($file_list);
-
- $title_arr=array();
- $title_arr[]=_('Delete');
- $title_arr[]=_('Name');
- $title_arr[]=_('Description');
- $title_arr[]=_('Download');
- echo $GLOBALS['HTML']->listTableTop ($title_arr);
-
- if ($count > 0) {
-
- for ($i=0; $i<$count; $i++) {
- echo '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'>
- <td><input type="checkbox" name="delete_file[]" value="'. $file_list[$i]->getID() .'" />'._('Delete').' </td>
- <td>'. htmlspecialchars($file_list[$i]->getName()) .'</td>
- <td>'. htmlspecialchars($file_list[$i]->getDescription()) .'</td>
- <td>'.util_make_link ('/tracker/download.php/'.$group_id.'/'. $ath->getID().'/'. $ah->getID() .'/'.$file_list[$i]->getID().'/'.$file_list[$i]->getName(),_('Download')).'</td>
- </tr>';
- }
-
- } else {
- echo '<tr '.$GLOBALS['HTML']->boxGetAltRowStyle(0).'><td colspan="4">'._('No Files Currently Attached').'</td></tr>';
- }
- echo $GLOBALS['HTML']->listTableBottom();
+ $ath->renderFiles($group_id, $ah);
?>
</td></tr>
</table>
Modified: trunk/src/www/tracker/mod.php
===================================================================
--- trunk/src/www/tracker/mod.php 2010-09-26 17:31:13 UTC (rev 10727)
+++ trunk/src/www/tracker/mod.php 2010-09-26 17:52:48 UTC (rev 10728)
@@ -3,6 +3,7 @@
* Tracker Facility
*
* Copyright 1999-2001 (c) VA Linux Systems
+ * Copyright 2010 (c) Franck Villaume - Capgemini
* http://fusionforge.org/
*
* This file is part of FusionForge.
@@ -160,10 +161,6 @@
<td>
</td>
</tr>
- <?php
- $ath->renderRelatedTasks($group, $ah);
- $ath->renderFiles($group_id, $ah);
- ?>
<tr>
<td><strong><?php echo _('Summary')?><?php echo utils_requiredField(); ?>: <a href="javascript:help_window('/help/tracker.php?helpname=summary')"><strong>(?)</strong></a></strong><br />
<input type="text" name="summary" size="70" value="<?php
@@ -212,36 +209,9 @@
<div class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
<h3><?php echo _('Related Tasks'); ?>:</h3>
<table border="0" width="80%">
- <?php
- $result = $ah->getRelatedTasks();
- $taskcount = db_numrows($ah->relatedtasks);
- if ($taskcount > 0) {
- echo '<tr><td colspan="2">';
- $titles[] = _('Task Id');
- $titles[] = _('Task Summary');
- $titles[] = _('Start Date');
- $titles[] = _('End Date');
- echo $GLOBALS['HTML']->listTableTop($titles);
- for ($i = 0; $i < $taskcount; $i++) {
- $taskinfo = db_fetch_array($ah->relatedtasks, $i);
- $taskid = $taskinfo['project_task_id'];
- $projectid = $taskinfo['group_project_id'];
- $groupid = $taskinfo['group_id'];
- $summary = util_unconvert_htmlspecialchars($taskinfo['summary']);
- $startdate = date(_('Y-m-d H:i'), $taskinfo['start_date']);
- $enddate = date(_('Y-m-d H:i'), $taskinfo['end_date']);
- echo '<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'>
- <td>'.$taskid.'</td>
- <td>'.util_make_link ('/pm/task.php?func=detailtask&project_task_id='.$taskid.'&group_id='.$groupid.'&group_project_id='.$projectid,$summary).'</td>
- <td>'.$startdate.'</td>
- <td>'.$enddate.'</td>
- </tr>';
- }
- echo $GLOBALS['HTML']->listTableBottom();
- } else {
- echo '<tr><td colspan="3">'._('No Related Tasks').'</td></tr>';
- }
- ?>
+ <?php
+ $ath->renderRelatedTasks($group, $ah);
+ ?>
</table>
</div>
<?php } ?>
@@ -259,31 +229,7 @@
//
// print a list of files attached to this Artifact
//
- $file_list =& $ah->getFiles();
-
- $count=count($file_list);
- $title_arr=array();
- $title_arr[]=_('Delete');
- $title_arr[]=_('Name');
- $title_arr[]=_('Download');
- echo $GLOBALS['HTML']->listTableTop ($title_arr);
-
- if ($count > 0) {
-
- for ($i=0; $i<$count; $i++) {
- echo '
- <tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'>
- <td><input type="checkbox" name="delete_file[]" value="'. $file_list[$i]->getID() .'" />'._('Delete').' </td>'.
- '<td>'. htmlspecialchars($file_list[$i]->getName()) .'</td>
- <td>'.util_make_link ('/tracker/download.php/'.$group_id.'/'. $ath->getID().'/'. $ah->getID() .'/'.$file_list[$i]->getID().'/'.$file_list[$i]->getName(),_('Download')).'</td>
- </tr>';
- }
-
- } else {
- echo '<tr '.$GLOBALS['HTML']->boxGetAltRowStyle(0).'><td colspan="4">'._('No Files Currently Attached').'</td></tr>';
- }
-
- echo $GLOBALS['HTML']->listTableBottom();
+ $ath->renderFiles($group_id, $ah);
?>
</td></tr>
</table>
More information about the Fusionforge-commits
mailing list