gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/www/tracker browse.php, 1.15, 1.16 detail.php, 1


From: tperdue
Subject: [Gforge-commits] gforge/www/tracker browse.php, 1.15, 1.16 detail.php, 1.19, 1.20 ind.php, 1.1, 1.2 massupdate-fields.php, 1.2, NONE mod-limited.php, 1.9, 1.10 mod.php, 1.21, 1.22 tracker.php, 1.3, 1.4 update-fields.php, 1.2, NONE
Date: Thu, 07 Oct 2004 14:30:54 -0500

Update of /cvsroot/gforge/gforge/www/tracker
In directory db.perdue.net:/home/tperdue/share/dev.gforge.org/www/tracker

Modified Files:
        browse.php detail.php ind.php mod-limited.php mod.php 
        tracker.php 
Removed Files:
        massupdate-fields.php update-fields.php 
Log Message:
Massive tracker reorg and cleanup

Index: browse.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/tracker/browse.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- browse.php  6 Oct 2004 16:27:12 -0000       1.15
+++ browse.php  7 Oct 2004 19:30:50 -0000       1.16
@@ -139,8 +139,9 @@
 /**
  *
  *  Build pop-up boxes for BROWSE boxes and choices configured by ADMIN
+BEING REBUILT BY AARON FARR
  *
- */
+ * /
 echo '<tr>';
        $result=$ath->getSelectionBoxes();
        $rows=db_numrows($result);
@@ -149,7 +150,7 @@
                echo '<tr>';
                for ($i=0; $i < $rows; $i++) {
                        $newrow=is_integer(($i+1)/5);
-                       echo '<td><span 
style="font-size:smaller">'.db_result($result,$i,'selection_box_name').'</span></br
 \>';
+                       echo '<td><span 
style="font-size:smaller">'.db_result($result,$i,'field_name').'</span></br \>';
                        
                        $choice=$extra_fields_choice[$i];
                        echo 
$ath->selectionBox(db_result($result,$i,'id'),$choice,$Language->getText('tracker_admin_build_boxes','status_any'));
@@ -160,6 +161,7 @@
                }
        }
        echo '</tr>';
+*/
        echo '<tr>
                <td align="right"><span 
style="font-size:smaller">'.$Language->getText('tracker_browse','sort_by').':&nbsp;<a
 
href="javascript:help_window(\'/help/tracker.php?helpname=sort_by\')"><strong>(?)</strong></a></span></td>'.
                '<td><span style="font-size:smaller">'. 
@@ -176,7 +178,9 @@
 
 if ($art_arr && count($art_arr) > 0) {
 
-       if ($set=='custom') {
+       /*if ($set=='custom') {
+//BEING REDONE BY AARON FARR
+
        //
        // validate that any admin configured extra fields meet its selection 
criteria
 
@@ -221,7 +225,8 @@
                                $art_arr=array_values($art_arr);
                        }
                }               
-       }
+       }*/
+
        if ($set=='custom') {
                $set .= 
'&_assigned_to='.$_assigned_to.'&_status='.$_status.'&_category='.$_category.'&_group='.$_group.'&_sort_col='.$_sort_col.'&_sort_ord='.$_sort_ord;
        }
@@ -339,7 +344,7 @@
                        </tr>';
 
 
-               //
+/*             //
                //      build input pop-up boxes for boxes and choices 
configured by ADMIN
                //
                $result=$ath->getSelectionBoxes();
@@ -349,7 +354,7 @@
                        echo '<tr>';
                        for ($i=0; $i < $rows; $i++) {
                                $newrow= is_integer($i/2);
-                               echo 
'<td><strong>'.db_result($result,$i,'selection_box_name').'</strong><br \>';
+                               echo 
'<td><strong>'.db_result($result,$i,'field_name').'</strong><br \>';
                                echo 
$ath->selectionBox(db_result($result,$i,'id'),'xzxz',$Language->getText('tracker_browse','no_change'));
                
                                if (!$newrow) {
@@ -357,6 +362,7 @@
                                }
                        }
                }
+*/
                echo   '<tr>
                        
<td><strong>'.$Language->getText('tracker','priority').': <a 
href="javascript:help_window(\'/help/tracker.php?helpname=priority\')"><strong>(?)</strong></a>
                                </strong><br />';

Index: detail.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/tracker/detail.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- detail.php  5 Oct 2004 15:05:09 -0000       1.19
+++ detail.php  7 Oct 2004 19:30:50 -0000       1.20
@@ -65,34 +65,10 @@
                        <td><strong><?php echo 
$Language->getText('tracker','status') ?>:</strong><br /><?php echo 
$ah->getStatusName(); ?></td>
                </tr>
 
-       <?php
-//
-//     build input pop-up boxes for boxes and choices configured by ADMIN
-//
-       $result=$ath->getSelectionBoxes();
-       $resultc=$ath->getArtifactChoices($ah->getID()); 
-       echo "<p>&nbsp;</p>";
-       $rows=db_numrows($result);
-       $origrows=db_numrows($resultc); 
-       if ($result &&$rows > 0) {
-               echo '<tr>';
-               for ($i=0; $i < $rows; $i++) {
-                       $newrow= is_integer($i/2);
-                       
-                       echo 
'<td><strong>'.db_result($result,$i,'selection_box_name').'</strong><br \>';
-                       
$resulto=$ath->getBoxOptionsName(db_result($resultc,$i,'choice_id'));
-                       
-                       if (($i < $origrows) && 
(db_result($resultc,$i,'choice_id') !== '100')) {
-                               echo db_result($resulto,'0','box_options_name');
-                       }else{
-                               echo 'None';
-                       }
-                       if (!$newrow) {
-                               echo '</tr><tr>';
-                       }
-               }
-       }
-       ?>
+    <?php
+        $ath->renderExtraFields($ah->getExtraFieldData(),true);
+    ?>
+
                <tr><td colspan="2"><strong><?php echo 
$Language->getText('tracker','summary') ?>:</strong><br /><?php echo 
$ah->getSummary(); ?></td></tr>
 
                <form action="<?php echo $PHP_SELF; ?>?group_id=<?php echo 
$group_id; ?>&atid=<?php echo $ath->getID(); ?>" METHOD="POST">

Index: ind.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/tracker/ind.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ind.php     17 Sep 2004 05:39:52 -0000      1.1
+++ ind.php     7 Oct 2004 19:30:50 -0000       1.2
@@ -17,28 +17,18 @@
 //required params for site_project_header();
 $params['group']=$group_id;
 $params['toptab']='tracker';
-$params['pagename']='tracker';
-$params['sectionvals']=array($group->getPublicName());
 
 echo site_project_header($params);
 echo $HTML->subMenu(
        array(
-               $Language->getText('group','short_tracker'),
                $Language->getText('tracker','reporting'),
                $Language->getText('tracker','admin')
        ),
        array(
-               '/tracker/?group_id='.$group_id,
                '/tracker/reporting/?group_id='.$group_id,
                '/tracker/admin/?group_id='.$group_id
-               
        )
 );
-/*
-echo '<strong><a 
href="/tracker/reporting/?group_id='.$group_id.'">'.$Language->getText('tracker','reporting').'</a>
 | '
-        .'<a 
href="/tracker/admin/?group_id='.$group_id.'">'.$Language->getText('tracker','admin').'</a>'
-        .'</strong><p>';
-*/
 
 if (!$at_arr || count($at_arr) < 1) {
        echo "<h1>".$Language->getText('tracker','no_trackers')."</h1>";

--- massupdate-fields.php DELETED ---

Index: mod-limited.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/tracker/mod-limited.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- mod-limited.php     5 Oct 2004 15:05:09 -0000       1.9
+++ mod-limited.php     7 Oct 2004 19:30:50 -0000       1.10
@@ -85,32 +85,10 @@
                </td>
        </tr>
 
-       <?php
-//
-//     build input pop-up boxes for boxes and choices configured by ADMIN
-//
-       $result=$ath->getSelectionBoxes();
-       $resultc=$ath->getArtifactChoices($ah->getID()); 
-       echo "<p>&nbsp;</p>";
-       $rows=db_numrows($result);
-       $origrows=db_numrows($resultc);
-       if ($result &&$rows > 0) {
-               echo '<tr>';
-               for ($i=0; $i < $rows; $i++) {
-                       $newrow= is_integer($i/2);
-                       echo 
'<td><strong>'.db_result($result,$i,'selection_box_name').'</strong><br \>';
-                       $resulto = 
$ath->getBoxOptionsName(db_result($resultc,$i,'choice_id'));
-                       if (($i < $origrows) && 
(db_result($resultc,$i,'choice_id') !== '100')) {
-                               echo db_result($resulto,'0','box_options_name');
-                       } else {
-                               echo 'None';
-                       }
-                       if (!$newrow) {
-                               echo '</tr><tr>';
-                       }
-               }
-       }
-       ?>
+    <?php
+        $ath->renderExtraFields($ah->getExtraFieldData(),true);
+    ?>
+
        <tr>
                <td><strong><?php echo 
$Language->getText('tracker','assigned_to')?>: <a 
href="javascript:help_window('/help/tracker.php?helpname=assignee')"><strong>(?)</strong></a></strong><br
 />
                <?php

Index: mod.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/tracker/mod.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- mod.php     5 Oct 2004 15:05:09 -0000       1.21
+++ mod.php     7 Oct 2004 19:30:50 -0000       1.22
@@ -122,38 +122,9 @@
        </tr>
 
        <?php
-//
-//     build input pop-up boxes for boxes and choices configured by ADMIN
-//
-       $result=$ath->getSelectionBoxes();
-       $result1=$ath->getArtifactChoices($ah->getID());
-       $rows=db_numrows($result); 
-       echo "<p>&nbsp;</p>";
-       $origrows=db_numrows($result1);
-       if ($result && $rows> 0) {
-               echo '<tr>';
-               for ($i=0; $i < $origrows; $i++) {
-                       $newrow= is_integer($i/2);
-                       echo 
'<td><strong>'.db_result($result,$i,'selection_box_name').'</strong><br \>';
-                       echo 
$ath->selectionBox(db_result($result,$i,'id'),db_result($result1,$i,'choice_id'));
-                       echo '&nbsp;<a 
href="/tracker/admin/?group_id='.$group_id.'&amp;atid='. $ath->getID() 
.'&amp;build_box=1">('.$Language->getText('tracker','admin').')</a>';
-                       if (!$newrow) {
-                       echo '</tr><tr>';
-                       }
-               }       
-               if ($rows-$origrows > 0){
-                       for ($i=$origrows; $i < $rows; $i++){
-                               $newrow= is_integer($i/2);
-                               echo 
'<td><strong>'.db_result($result,$i,'selection_box_name').'</strong><br \>';
-                               echo 
$ath->selectionBox(db_result($result,$i,'id'),db_result($result1,$i,'choice_id'));
-                               echo '&nbsp;<a 
href="/tracker/admin/?group_id='.$group_id.'&amp;atid='. $ath->getID() 
.'&amp;build_box=1">('.$Language->getText('tracker','admin').')</a>';
-                               if (!$newrow) {
-                                       echo '</tr><tr>';
-                               }
-                       }
-               }
-       }
+               $ath->renderExtraFields($ah->getExtraFieldData(),true);
        ?>
+
        <tr>
                <td><strong><?php echo 
$Language->getText('tracker','assigned_to')?>: <a 
href="javascript:help_window('/help/tracker.php?helpname=assignee')"><strong>(?)</strong></a></strong><br
 />
                <?php

Index: tracker.php
===================================================================
RCS file: /cvsroot/gforge/gforge/www/tracker/tracker.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- tracker.php 6 Oct 2004 16:27:12 -0000       1.3
+++ tracker.php 7 Oct 2004 19:30:50 -0000       1.4
@@ -52,24 +52,10 @@
                                        exit_error('ERROR', 
$Language->getText('general','invalid_email'));
                                }
                        }
-                       if 
(!$ah->create($category_id,$artifact_group_id,$summary,$details,$assigned_to,$priority,
 $user_email)) {
+                       if 
(!$ah->create($category_id,$artifact_group_id,$summary,$details,$assigned_to,$priority,$extra_fields))
 {
                                exit_error('ERROR',$ah->getErrorMessage());
                        } else {
                                //
-                               // Include extra fields configured by ADMIN
-                               //
-                                       
-                               $result=$ath->getSelectionBoxes();
-                               $rows=db_numrows($result);
-                                       
-                               if ($result && $rows > 0) {
-                                       for ($i=0; $i < $rows; $i++) {
-                                       
$ah->createExtraFields($extra_fields_choice[$i]);
-                                       }
-                                       unset ($extra_fields_choice);
-                               }
-                                       
-                               //
                                //      Attach file to this Artifact.
                                //
                                if ($add_file) {
@@ -120,16 +106,14 @@
                                        $was_error=true;
                                }
 
-               include('massupdate-fields.php');
-                               if (($was_error==true) && ($changect==0) && 
($transferct==0)) {
+                               if ($was_error) {
                                        $feedback .= ' ID: 
'.$artifact_id_list[$i].'::'.$ah->getErrorMessage();
                                }else {
                                        $was_error=false;
                                }
                        }
                        unset($ah);
-                       
-                       
+
                if (!$was_error) {
                        $feedback = 
$Language->getText('tracker','updated_successful');                 }
                }
@@ -162,7 +146,7 @@
                                $delete_file=false;
                        }
                        if 
(!$ah->update($priority,$status_id,$category_id,$artifact_group_id,$resolution_id,
-                               
$assigned_to,$summary,$canned_response,$details,$new_artfact_type_id)) {
+                               
$assigned_to,$summary,$canned_response,$details,$new_artfact_type_id,$extra_fields))
 {
                                $feedback 
=$Language->getText('tracker','tracker_item'). ': '.$ah->getErrorMessage();
                                $ah->clearError();
                                $was_error=true;
@@ -214,16 +198,8 @@
                        //
                        //      Show just one feedback entry if no errors
                        //
-                       include ('update-fields.php');
-                       if (!$was_error ||  $changect>0 || $transferct>0) {
+                       if (!$was_error) {
                                $feedback = 
$Language->getText('general','update_successful');
-                       if ($ath->getID()!==$new_artfact_type_id){
-                               if (!$ah->nullExtraFields($artifact_id)){
-//TODO ERROR HERE???
-//
-                               }
-                       }
-                               
                        }
                        include ('browse.php');
                }
@@ -285,9 +261,9 @@
                        exit_error('ERROR','Artifact Could Not Be Created');    
                } else if ($ah->isError()) {
                        exit_error('ERROR',$ah->getErrorMessage());
                } else {
-                       if ($ath->userIsAdmin() || (session_loggedin() && 
($ah->getSubmittedBy() == user_getid()))) {
+                       if ($ath->userIsAdmin()) {
                                include 'mod.php';
-                       } elseif ($ath->userIsTechnician()) {
+                       } elseif ($ath->userIsTechnician() || 
(session_loggedin() && ($ah->getSubmittedBy() == user_getid()))) {
                                include 'mod-limited.php';
                        } else {
                                include 'detail.php';
@@ -300,4 +276,5 @@
                break;
        }
 }
+
 ?>

--- update-fields.php DELETED ---





reply via email to

[Prev in Thread] Current Thread [Next in Thread]