[evolvis-commits] r17776: [#2030] theme-tracker pending merges:↵ Thorsten Glaser 2011-12-06 item.php for TRK_TECH, TRK_VIEW, $is_add↵ Thorsten Glaser 2011-12-06 more consistent displaying of tracker/tasks links↵ Thorsten Glaser 2011-12-05 [merge] theme-evolvis pending merges:↵ Thorsten Glaser 2011-12-05 fix tables (inverse logic mistake)↵ Thorsten Glaser 2011-12-05 finally, hooks for commit⇐⇒tracker links↵ Thorsten Glaser 2011-12-05 fix another case of render vs return↵ Thorsten Glaser 2011-12-05 make relationships between tracker items show up nicely↵ Thorsten Glaser 2011-12-05 [merge] theme-evolvis pending merges:↵ Thorsten Glaser 2011-12-05 add experimental support for topless wom^H^H^Htables↵ Thorsten Glaser 2011-12-05 we only have one file upload field now↵ Thorsten Glaser 2011-12-05 swap left and right column of Item Relationships↵ Thorsten Glaser 2011-12-05 bring back boxen for mass update↵ Thorsten Glaser 2011-12-05 [#2030] fix rendering problems wrt the new extrafields display↵ Thorsten Glaser 2011-12-05 [merge] build-script pending merges:↵ Thorsten Glaser 2011-12-05 I *hate* sudo’s new defaults!↵ Thorsten Glaser 2011-12-05 [merge] build-script pending merges:↵ Thorsten Glaser 2011-12-05 explicitly set DIST=lenny for Evolvis↵ Thorsten Glaser 2011-12-05 [merge] build-script pending merges:↵ Thorsten Glaser 2011-12-05 add auto-run-lintian hook↵ Thorsten Glaser 2011-12-05 update from master↵ Thorsten Glaser 2011-12-05 [merge] sync from the integration branch↵ Thorsten Glaser 2011-12-02 [merge] tarent-5.1 pending merges:↵ Thorsten Glaser 2011-11-30 [merge] merge tarent-5.1 integration branch (criss-cross but no confl...↵ Thorsten Glaser 2011-11-25 [#2030] this looks _a lot_ like the design goal, now! \o/↵ Thorsten Glaser 2011-11-25 the new EvolvisTable is simply amazing↵ Thorsten Glaser 2011-11-25 [#2030] get further in this form↵ Thorsten Glaser 2011-11-24 [merge] [#2030] theme-evolvis pending merges:↵ Thorsten Glaser 2011-11-24 [#2030] more theming↵ Thorsten Glaser 2011-11-24 finally got the freakin’ extrafields to almost DWIW↵ Thorsten Glaser 2011-11-22 better]↵ Thorsten Glaser 2011-11-22 commit of working copy (unfinished)↵ Thorsten Glaser 2011-11-09 first stab at comment formatting

mirabilos at evolvis.org mirabilos at evolvis.org
Tue Dec 6 13:35:43 CET 2011


Author: mirabilos
Date: 2011-12-06 13:35:43 +0100 (Tue, 06 Dec 2011)
New Revision: 17776

Added:
   trunk/gforge_base/evolvisforge-5.1/cEv-hook/B00lintian
Modified:
   trunk/gforge_base/evolvisforge-5.1/cev
   trunk/gforge_base/evolvisforge-5.1/src/BuildDSC.sh
   trunk/gforge_base/evolvisforge-5.1/src/common/include/EvolvisTable.class.php
   trunk/gforge_base/evolvisforge-5.1/src/common/include/utils_crossref.php
   trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
   trunk/gforge_base/evolvisforge-5.1/src/www/js/tooltips.js
   trunk/gforge_base/evolvisforge-5.1/src/www/themes/evolvis/Theme.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/themes/evolvis/evolvis.css
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/browse.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactHtml.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactTypeHtml.class.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/item.php
   trunk/gforge_base/evolvisforge-5.1/src/www/tracker/tracker.php
Log:
[#2030] theme-tracker pending merges:
  Thorsten Glaser 2011-12-06 item.php for TRK_TECH, TRK_VIEW, $is_add
    Thorsten Glaser 2011-12-06 more consistent displaying of tracker/tasks links
    Thorsten Glaser 2011-12-05 [merge] theme-evolvis pending merges:
    Thorsten Glaser 2011-12-05 fix tables (inverse logic mistake)
    Thorsten Glaser 2011-12-05 finally, hooks for commit⇐⇒tracker links
    Thorsten Glaser 2011-12-05 fix another case of render vs return
    Thorsten Glaser 2011-12-05 make relationships between tracker items show up nicely
    Thorsten Glaser 2011-12-05 [merge] theme-evolvis pending merges:
    Thorsten Glaser 2011-12-05 add experimental support for topless wom^H^H^Htables
    Thorsten Glaser 2011-12-05 we only have one file upload field now
    Thorsten Glaser 2011-12-05 swap left and right column of Item Relationships
    Thorsten Glaser 2011-12-05 bring back boxen for mass update
    Thorsten Glaser 2011-12-05 [#2030] fix rendering problems wrt the new extrafields display
    Thorsten Glaser 2011-12-05 [merge] build-script pending merges:
    Thorsten Glaser 2011-12-05 I *hate* sudo’s new defaults!
    Thorsten Glaser 2011-12-05 [merge] build-script pending merges:
    Thorsten Glaser 2011-12-05 explicitly set DIST=lenny for Evolvis
    Thorsten Glaser 2011-12-05 [merge] build-script pending merges:
    Thorsten Glaser 2011-12-05 add auto-run-lintian hook
    Thorsten Glaser 2011-12-05 update from master
    Thorsten Glaser 2011-12-05 [merge] sync from the integration branch
    Thorsten Glaser 2011-12-02 [merge] tarent-5.1 pending merges:
    Thorsten Glaser 2011-11-30 [merge] merge tarent-5.1 integration branch (criss-cross but no confl...
    Thorsten Glaser 2011-11-25 [#2030] this looks _a lot_ like the design goal, now! \o/
    Thorsten Glaser 2011-11-25 the new EvolvisTable is simply amazing
    Thorsten Glaser 2011-11-25 [#2030] get further in this form
    Thorsten Glaser 2011-11-24 [merge] [#2030] theme-evolvis pending merges:
    Thorsten Glaser 2011-11-24 [#2030] more theming
    Thorsten Glaser 2011-11-24 finally got the freakin’ extrafields to almost DWIW
    Thorsten Glaser 2011-11-22 better]
    Thorsten Glaser 2011-11-22 commit of working copy (unfinished)
    Thorsten Glaser 2011-11-09 first stab at comment formatting

XXX consider bringing back util_gen_cross_ref


Added: trunk/gforge_base/evolvisforge-5.1/cEv-hook/B00lintian
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/cEv-hook/B00lintian	                        (rev 0)
+++ trunk/gforge_base/evolvisforge-5.1/cEv-hook/B00lintian	2011-12-06 12:35:43 UTC (rev 17776)
@@ -0,0 +1,27 @@
+#!/bin/sh
+LC_ALL=C; export LC_ALL
+apt-get --purge -y install --install-recommends lintian
+argE=
+argP=
+if lintian -h 2>&1 | grep -F -- --display-experimental >/dev/null 2>&1; then
+	argE=--display-experimental
+fi
+if lintian -h 2>&1 | grep -F -- --pedantic >/dev/null 2>&1; then
+	argP=--pedantic
+fi
+echo
+echo ==================================================================
+echo Running lintian...
+echo
+extraargs=
+for f in /tmp/buildd/*.changes; do
+	case $f in
+	(*snapshot.*)
+		extraargs='-X nmu'
+		;;
+	esac
+done
+lintian -vIi $argE $argP $extraargs --allow-root /tmp/buildd/*.changes 2>&1
+echo
+echo ==================================================================
+echo


Property changes on: trunk/gforge_base/evolvisforge-5.1/cEv-hook/B00lintian
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/gforge_base/evolvisforge-5.1/cev
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/cev	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/cev	2011-12-06 12:35:43 UTC (rev 17776)
@@ -3,10 +3,25 @@
 #-
 # Not complicated enough for copyright.
 
-DIST=$(realpath "$0")
-DIST=${DIST##*/dists/}
-DIST=${DIST%%/*}
+#DIST=$(realpath "$0")
+#DIST=${DIST##*/dists/}
+#DIST=${DIST%%/*}
+DIST=lenny
 
+# fix fuckup
+function sudo {
+	local _i _j sudo_args
+
+	set -A sudo_args /usr/bin/env
+	for _i in $(export); do
+		eval _j=\$$_i
+		sudo_args[${#sudo_args[*]}]=$_i=$_j
+	done
+	_i=$1; shift
+	[[ $_i != /* ]] && whence -p "$_i" >/dev/null && _i=$(whence -p "$_i")
+	command sudo "${sudo_args[@]}" "$_i" "$@"
+}
+
 unset LANG LANGUAGE LC_ADDRESS LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
     LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
     LC_TELEPHONE LC_TIME

Modified: trunk/gforge_base/evolvisforge-5.1/src/BuildDSC.sh
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/BuildDSC.sh	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/BuildDSC.sh	2011-12-06 12:35:43 UTC (rev 17776)
@@ -1,6 +1,6 @@
 #!/bin/mksh
 # modified for Evolvis 5.1
-# $MirOS: contrib/hosted/tg/deb/BuildDSC.sh,v 1.12 2011/10/20 16:38:08 tg Exp $
+# $MirOS: contrib/hosted/tg/deb/BuildDSC.sh,v 1.14 2011/11/17 15:27:53 tg Exp $
 #-
 # Copyright (c) 2010, 2011
 #	Thorsten Glaser <t.glaser at tarent.de>
@@ -101,7 +101,7 @@
 	cat debian/changelog >"$T"
 	touch -r debian/changelog "$T"
 	dist=$(dpkg-parsechangelog -n1 | sed -n '/^Distribution: /s///p')
-	if [[ $dist = @(xunstable|UNRELEASED) ]]; then
+	if [[ $dist = UNRELEASED || $dist = x* ]]; then
 		# we’re at “current” already, reduce
 		version=$version'~'$ssuf
 	else
@@ -109,7 +109,7 @@
 		version=$version'+'$ssuf
 	fi
 	print "$pkgstem ($version) UNRELEASED; urgency=low\n\n  *" \
-	    "Automatically built snapshot package.\n\n --" \
+	    "Automatically built snapshot (not backport) package.\n\n --" \
 	    "$DEBEMAIL  $stime_rfc\n" >debian/changelog
 	cat "$T" >>debian/changelog
 	touch -r "$T" debian/changelog

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/EvolvisTable.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/EvolvisTable.class.php	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/EvolvisTable.class.php	2011-12-06 12:35:43 UTC (rev 17776)
@@ -57,6 +57,9 @@
 
 		$param['text'] = $title_arr;
 		$param['link'] = $cl ? $links_arr : array();
+		if ($title_arr[0] === false) {
+			$param['topless'] = $ct;
+		}
 		$this->param = $param;
 
 		$this->ncols = $ct;

Modified: trunk/gforge_base/evolvisforge-5.1/src/common/include/utils_crossref.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/common/include/utils_crossref.php	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/common/include/utils_crossref.php	2011-12-06 12:35:43 UTC (rev 17776)
@@ -48,43 +48,64 @@
 }
 
 function _artifactid2url ($id, $mode='') {
-	$text = '[#'.$id.']';
-	$res = db_query_params ('SELECT group_id, artifact.group_artifact_id, summary, status_id
-			FROM artifact, artifact_group_list
-			WHERE artifact_id=$1
-			AND artifact.group_artifact_id=artifact_group_list.group_artifact_id',
-				array ($id)) ;
+	$id = (int)$id;
+	$text = sprintf('[#%d]', $id);
+	if ($mode != 'title') {
+		return html_e('a', array(
+			'href' => util_make_url('/tracker/t_follow.php/' . $id),
+		    ), $text);
+	}
+	$res = db_query_params('SELECT summary, status_id FROM artifact
+		WHERE artifact_id=$1',
+	    array(
+		$id,
+	    ));
 	if (db_numrows($res) == 1) {
 		$row = db_fetch_array($res);
-		$url = '/tracker/?func=detail&aid='.$id.'&group_id='.$row['group_id'].'&atid='.$row['group_artifact_id'];
-		$arg = 'title="'.util_html_secure($row['summary']).'"' ;
+		$ts = array();
 		if ($row['status_id'] == 2) {
-			$arg .= 'class="artifact_closed"'; 
+			$ts['class'] = array();
+			$ts['class'][] = 'artifact_closed';
 		}
-		if ($mode == 'title') {
-			return '<a href="'.$url.'" '.$arg.'>'.$text.'</a> <a href="'.$url.'">'.$row['summary'].'</a><br />';
+		$link = util_make_url('/tracker/t_follow.php/' . $id);
+		$subj = util_html_secure($row['summary']);
+		if ($mode != 'title') {
+			$ts['href'] = $link;
+			$ts['title'] = $subj;
+			$firsttag = 'a';
 		} else {
-			return '<a href="'.$url.'" '.$arg.'>'.$text.'</a>';
+			$firsttag = 'tt';
 		}
+		$text = html_e($firsttag, $ts, $text);
+		if ($mode == 'title') {
+			$text .= " " . html_e('a', array(
+				'href' => $link,
+			    ), $subj) . html_e('br');
+		}
 	}
 	return $text;
 }
 
 function _taskid2url ($id) {
-	$text = '[T'.$id.']';
-	$res = db_query_params ('SELECT group_id, project_task.group_project_id, summary, status_id
-			FROM project_task, project_group_list
-			WHERE project_task_id=$1
-			AND project_task.group_project_id=project_group_list.group_project_id',
-				array ($id));
+	$id = (int)$id;
+	/*XXX [Tnnn] like FF5.1 or [#nnn] like Ev4.8 now? */
+	$text = sprintf('[T%d]', $id);
+	$res = db_query_params('SELECT summary, status_id FROM project_task
+		WHERE project_task_id=$1',
+	    array(
+		$id,
+	    ));
 	if (db_numrows($res) == 1) {
 		$row = db_fetch_array($res);
-		$url = '/pm/task.php?func=detailtask&project_task_id='.$id.'&group_id='.$row['group_id'].'&group_project_id='.$row['group_project_id'];
-		$arg = 'title="'.$row['summary'].'"' ;
+		$ts = array(
+			'href' => util_make_url('/pm/t_follow.php/' . $id),
+			'title' => util_html_secure($row['summary']),
+		);
 		if ($row['status_id'] == 2) {
-			$arg .= 'class="task_closed"'; 
+			$ts['class'] = array();
+			$ts['class'][] = 'task_closed';
 		}
-		return '<a href="'.$url.'" '.$arg.'>'.$text.'</a>';
+		$text = html_e('a', $ts, $text);
 	}
 	return $text;
 }

Modified: trunk/gforge_base/evolvisforge-5.1/src/debian/changelog
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/debian/changelog	2011-12-06 12:35:43 UTC (rev 17776)
@@ -36,13 +36,14 @@
     especially to the tracker, break it
   * [#2214] Update ExtraTabs plugin from Evolvis 4.8
   * [#2021] Use User class for Univention LDAP sync userdel
+  * [#2030] Overhauled Tracker Item form
 
   [ Mike Esser ]
   * [#1850] Fix merge glitch
   * [#1859] [#1906] Port code from Evolvis 4.8 to 5.1
   * [#2160] Implement Advanced Search
 
- -- Thorsten Glaser <t.glaser at tarent.de>  Mon, 05 Dec 2011 11:22:28 +0100
+ -- Thorsten Glaser <tg at mirbsd.de>  Tue, 06 Dec 2011 13:34:50 +0100
 
 fusionforge (5.1.1-3) UNRELEASED; urgency=low
 

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/js/tooltips.js
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/js/tooltips.js	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/js/tooltips.js	2011-12-06 12:35:43 UTC (rev 17776)
@@ -24,15 +24,15 @@
 
 jQuery(function() {
 	if ( typeof(jQuery(window).tipsy) == 'function') {
-		jQuery('#tracker-monitor').tipsy({gravity: 'n', html: true, delayIn: 1000, delayOut: 500, fade: true});
+		jQuery('#tracker-monitor').tipsy({gravity: 'e', html: true, delayIn: 1000, delayOut: 500, fade: true});
 		jQuery('#tracker-summary').tipsy({gravity: 'w', delayIn: 1000, delayOut: 500, fade: true});
 		jQuery('#tracker-assigned_to').tipsy({gravity: 'w', delayIn: 1000, delayOut: 500, fade: true});
 		jQuery('#tracker-priority').tipsy({gravity: 'w', html: true, delayIn: 1000, delayOut: 500, fade: true});
 		jQuery('#tracker-status_id').tipsy({gravity: 'w', html: true, delayIn: 1000, delayOut: 500, fade: true});
 		jQuery('#tracker-description').tipsy({gravity: 'w', html: true, delayIn: 1000, delayOut: 500, fade: true});
-		jQuery('#tracker-canned_response').tipsy({gravity: 'w', html: true, delayIn: 1000, delayOut: 500, fade: true});
+		jQuery('#tracker-canned_response').tipsy({gravity: 'e', html: true, delayIn: 1000, delayOut: 500, fade: true});
 		jQuery('#tracker-comment').tipsy({gravity: 'w', delayIn: 1000, delayOut: 500, fade: true});
-		jQuery('#tracker-new_artifact_type_id').tipsy({gravity: 'w', html:true, delayIn: 1000, delayOut: 500, fade: true});
+		jQuery('#tracker-new_artifact_type_id').tipsy({gravity: 'e', html:true, delayIn: 1000, delayOut: 500, fade: true});
 
 		jQuery('select.trove-nodes').tipsy({gravity: 'w', html:true, delayIn: 1000, delayOut: 500, fade: true});
 		jQuery('span.trove-nodes').tipsy({gravity: 'n', html:true, delayIn: 1000, delayOut: 500, fade: true});

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/themes/evolvis/Theme.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/themes/evolvis/Theme.class.php	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/themes/evolvis/Theme.class.php	2011-12-06 12:35:43 UTC (rev 17776)
@@ -413,49 +413,53 @@
 			'cellspacing' => 2,
 			'cellpadding' => 0,
 		    ));
-		$spos = html_ap();
-		$rv .= html_ao('thead');
 
-		$ct = count($params['text']);
-		$cl = is_array(util_ifsetor($params['link'])) ?
-		    count($params['link']) : 0;
+		if (($ct = util_ifsetor($params['topless'], 0)) == 0) {
+			$spos = html_ap();
+			$rv .= html_ao('thead');
 
-		if ($ct && $cl && ($ct != $cl)) {
-			$rv .= html_e('tr', array(), html_e('td', array(
-				'align' => 'center',
-				'style' => 'color:red;',
-				'colspan' => $ct,
-			    ), 'Inequal magnitutes of $params["text"] and ' .
-			    '$params["link"]:' . html_e('pre', array(),
-			    "\n" . htmlentities(debug_string_backtrace()))));
-		}
+			$ct = count($params['text']);
+			$cl = is_array(util_ifsetor($params['link'])) ?
+			    count($params['link']) : 0;
 
-		$rv .= html_ao('tr', array('class' => 'ff'));
-		if (!$ct) {
-			$rv .= html_e('td', array(
-				'align' => 'center',
-				'style' => 'color:red;',
-			    ), 'No $params["text"]:' . html_e('pre', array(),
-			    "\n" . htmlentities(debug_string_backtrace())));
-		} else if ($ct == $cl) {
-			for ($i = 0; $i < $ct; ++$i) {
-				$rv .= html_e('th', array(
-					'class' => 'ff',
-					'align' => 'left',
-				    ), html_e('a', array(
-					'class' => 'titlebar',
-					'href' => $params['link'][$i],
-				    ), $params['text'][$i]));
+			if ($ct && $cl && ($ct != $cl)) {
+				$rv .= html_e('tr', array(), html_e('td', array(
+					'align' => 'center',
+					'style' => 'color:red;',
+					'colspan' => $ct,
+				    ), 'Inequal magnitutes of $params["text"] and ' .
+				    '$params["link"]:' . html_e('pre', array(),
+				    "\n" . htmlentities(debug_string_backtrace()))));
 			}
-		} else {
-			foreach ($params['text'] as $x) {
-				$rv .= html_e('th', array(
-					'class' => 'list_table_top',
-					'align' => 'left',
-				    ), $x);
+
+			$rv .= html_ao('tr', array('class' => 'ff'));
+			if (!$ct) {
+				$rv .= html_e('td', array(
+					'align' => 'center',
+					'style' => 'color:red;',
+				    ), 'No $params["text"]:' . html_e('pre', array(),
+				    "\n" . htmlentities(debug_string_backtrace())));
+			} else if ($ct == $cl) {
+				for ($i = 0; $i < $ct; ++$i) {
+					$rv .= html_e('th', array(
+						'class' => 'ff',
+						'align' => 'left',
+					    ), html_e('a', array(
+						'class' => 'titlebar',
+						'href' => $params['link'][$i],
+					    ), $params['text'][$i]));
+				}
+			} else {
+				foreach ($params['text'] as $x) {
+					$rv .= html_e('th', array(
+						'class' => 'list_table_top',
+						'align' => 'left',
+					    ), $x);
+				}
 			}
+			$rv .= html_ac($spos);
 		}
-		$rv .= html_ac($spos);
+
 		$rv .= html_e('tfoot', array(), html_e('tr', array(
 			'class' => 'ff',
 			'align' => 'left',

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/browse.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/browse.php	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/browse.php	2011-12-06 12:35:43 UTC (rev 17776)
@@ -723,6 +723,7 @@
 	$currentpage = intval($start / $paging);
 
 	if ($pages >= 1) {
+		echo '<div style="margin-bottom:12px;">';
 		$skipped_pages=false;
 		for ($j=0; $j<$pages; $j++) {
 			if ($pages > 20) {
@@ -742,12 +743,15 @@
 				echo '<a href="'.getStringFromServer('PHP_SELF')."?func=browse&group_id=".$group_id.'&atid='.$ath->getID().'&set='. $set.'&start='.($j*$paging).'"><strong>'.($j+1).'</strong></a>  ';
 			}
 		}
+		echo "</div>\n";
 	}
 
 	/*
 		Mass Update Code
 	*/
 	if ($IS_ADMIN) {
+		echo $HTML->boxTop(_('Mass Update'), 'MassUpdate', true, 'tracker_browse_massup');
+
 		echo '<script language="JavaScript" type="text/javascript">//<![CDATA[
 	function checkAll(val) {
 		al=document.artifactList;
@@ -786,31 +790,37 @@
 		}
 	}
 	$ath->renderExtraFields($sel,true,_('No Change'),false,'',array(ARTIFACT_EXTRAFIELD_FILTER_INT),true);
-		echo   '<tr>
-			<td><strong>'._('Priority').':</strong><br />';
-		echo html_build_priority_select_box('priority', '100', true);
-		echo '</td><td>';
-
-		echo '</td>
-			</tr>
-
-			<tr>
-			<td><strong>'._('Assigned to').':</strong><br />'. 
-				$ath->technicianBox ('assigned_to','100.1',true,_('Nobody'),'100.1',_('No Change')) .'</td>
-			<td>';
-		if (!$ath->usesCustomStatuses()) {
-		echo '<strong>'._('State').':</strong>
-				<br />'. $ath->statusBox ('status_id','xzxz',true,_('No Change'));
-		}
-		echo '</td>
-			</tr>
-
-			<tr><td colspan="2"><strong>'._('Canned Response').':</strong><br />'.
-				$ath->cannedResponseBox ('canned_response') .'</td></tr>
-
-			<tr><td colspan="3" align="center"><input type="submit" name="submit" value="'._('Mass update').'" /></td></tr>
-			</table>
-		</form>';
+?>
+<tr>
+	<td>
+		<strong><?php echo _('Priority'); ?></strong><br />
+<?php echo html_build_priority_select_box('priority', '100', true); ?>
+	</td><td>
+		<strong><?php echo _('Assigned to'); ?></strong><br />
+<?php echo $ath->technicianBox('assigned_to','100.1',true,_('Nobody'),'100.1',_('No Change')); ?>
+	</td>
+</tr><tr>
+	<td>
+		<strong><?php echo _('Canned Response'); ?></strong><br />
+<?php echo $ath->cannedResponseBox('canned_response'); ?>
+	</td><td>
+<?php if (!$ath->usesCustomStatuses()) { ?>
+		<strong><?php echo _('State'); ?></strong><br />
+<?php echo $ath->statusBox('status_id','xzxz',true,_('No Change')); ?>
+<?php } ?>
+	</td>
+</tr>
+<tr>
+	<td colspan="3" align="center">
+		<input type="submit" name="submit"
+		 value="<?php echo _('Mass update'); ?>" />
+	</td>
+</tr>
+</table>
+<?php
+		echo $HTML->boxMiddle(_('Caption'), 'Legende', true, 'tracker_browse_caption');
+	} else {
+		echo $HTML->boxTop(_('Caption'), 'Legende', true, 'tracker_browse_caption');
 	}
 
 	printf(_('* Denotes requests > %1$s Days Old'), ($ath->getDuePeriod()/86400));
@@ -818,6 +828,10 @@
 	if (in_array('priority', $browse_fields)) {
 		show_priority_colors_key();
 	}
+	echo $HTML->boxBottom();
+	if ($IS_ADMIN) {
+		echo "</form>\n";
+	}
 } else {
 	echo '<p class="warning_msg">'._('No items found').'</p>';
 	echo db_error();

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactHtml.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactHtml.class.php	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactHtml.class.php	2011-12-06 12:35:43 UTC (rev 17776)
@@ -13,6 +13,7 @@
 
 require_once $gfcommon.'tracker/Artifact.class.php';
 require_once $gfcommon.'include/utils_crossref.php';
+require_once $gfcommon.'include/EvolvisTable.class.php';
 
 class ArtifactHtml extends Artifact {
 
@@ -72,7 +73,7 @@
 				$params = array('user_id' => db_result($result,$i,'user_id'), 'size' => 's');
 				plugin_hook("user_logo", $params);
 
-				echo _('Date').': '.
+				echo '<tt>' . _('Date') . ': ' .
 					date(_('Y-m-d H:i'),db_result($result, $i, 'adddate')) .'<br />'.
 					_('Sender').': ';
 				if(db_result($result,$i,'user_id') == 100) {
@@ -81,11 +82,23 @@
 					echo util_make_link_u (db_result($result,$i,'user_name'),db_result($result,$i,'user_id'),db_result($result,$i,'realname'));
 				}
 
-				$text = db_result($result, $i, 'body');
-				$text = util_gen_cross_ref($text, $this->ArtifactType->Group->getID());
-				//$text = util_line_wrap( $text, 120,"\n");
-				$text = preg_replace('/\r?\n/', '<br />', $text);
-				echo "<br /><br />".$text.'</td></tr>';
+				echo "</tt><pre>\n" .
+				    util_uri_grabber(html_entity_decode(db_result($result,
+				    $i, 'body'), ENT_QUOTES, "UTF-8"), true) .
+				    "</pre></td></tr>\n";
+
+// Evolvis 4.8
+//				echo "</tt>" .
+//				    util_ttwrap(util_uri_grabber(html_entity_decode(db_result($result,
+//				    $i, 'body'), ENT_QUOTES, "UTF-8"), true)) .
+//				    "</td></tr>\n";
+
+// FF 5.1
+//				$text = db_result($result, $i, 'body');
+//				$text = util_gen_cross_ref($text, $this->ArtifactType->Group->getID());
+//				//$text = util_line_wrap( $text, 120,"\n");
+//				$text = preg_replace('/\r?\n/', '<br />', $text);
+// echo "</tt>";		echo "<br /><br />".$text.'</td></tr>';
 			}
 
 			echo $GLOBALS['HTML']->listTableBottom();
@@ -98,56 +111,47 @@
 
 	function showHistory() {
 		global $artifact_cat_arr,$artifact_grp_arr,$artifact_res_arr;
-		$result=$this->getHistory();
-		$rows= db_numrows($result);
+		$result = $this->getHistory();
+		$rows = db_numrows($result);
 
-		if ($rows > 0) {
+		if ($rows < 1) {
+			echo html_e('p', array(),
+			    _('No Changes Have Been Made to This Item'));
+			return;
+		}
 
-			$title_arr=array();
-			$title_arr[]=_('Field');
-			$title_arr[]=_('Old Value');
-			$title_arr[]=_('Date');
-			$title_arr[]=_('By');
-
-			echo $GLOBALS['HTML']->listTableTop ($title_arr);
-
-			$artifactType =& $this->getArtifactType();
-
-			for ($i=0; $i < $rows; $i++) {
-				$field=db_result($result, $i, 'field_name');
-				echo '
-				<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td>'.$field.'</td><td>';
-
-				if ($field == 'status_id') {
-
-					echo $artifactType->getStatusName(db_result($result, $i, 'old_value'));
-
-				} else if ($field == 'assigned_to') {
-
-					echo user_getname(db_result($result, $i, 'old_value'));
-
-				} else if ($field == 'close_date') {
-					if (db_result($result, $i, 'old_value'))
-						echo date(_('Y-m-d H:i'),db_result($result, $i, 'old_value'));
-					else 
-						echo '<i>None</i>';
+		$aT =& $this->getArtifactType();
+		$t = new EvolvisTable(array(
+			_('Field'),
+			_('Old Value'),
+			_('Date'),
+			_('By'),
+		    ));
+		for ($i = 0; $i < $rows; ++$i) {
+			$r =& $t->tr();
+			$field = db_result($result, $i, 'field_name');
+			$ov = db_result($result, $i, 'old_value');
+			$r->td()->set($field);
+			if ($field == 'status_id') {
+				$r->td()->set($aT->getStatusName($ov));
+			} else if ($field == 'assigned_to') {
+				$r->td()->set(user_getname($ov));
+			} else if ($field == 'close_date') {
+				if ($ov) {
+					$r->td()->set(date(_('Y-m-d H:i'),
+					    $ov));
 				} else {
-
-					echo db_result($result, $i, 'old_value');
-
+					$r->td()->setraw(html_e('i', array(),
+					    _('None')));
 				}
-				echo '</td>'.
-					'<td>'. date(_('Y-m-d H:i'),db_result($result, $i, 'entrydate')) .'</td>'.
-					'<td>'. db_result($result, $i, 'user_name'). '</td></tr>';
+			} else {
+				$r->td()->set($ov);
 			}
-
-			echo $GLOBALS['HTML']->listTableBottom();
-
-		} else {
-			echo '
-			<p>'._('No Changes Have Been Made to This Item').'</p>';
+			$r->td()->set(date(_('Y-m-d H:i'),
+			    db_result($result, $i, 'entrydate')));
+			$r->td()->set(db_result($result, $i, 'user_name'));
 		}
-
+		echo $t->emit();
 	}
 
 	function showRelations() {
@@ -163,45 +167,45 @@
 		AND artifact.artifact_id = artifact_extra_field_data.artifact_id
 		AND groups.group_id = artifact_group_list.group_id
 		AND (field_data = $1 OR field_data LIKE $2 OR field_data LIKE $3 OR field_data LIKE $4)
-		ORDER BY artifact_group_list.group_id ASC, name ASC, artifact.artifact_id ASC',
+		ORDER BY artifact_group_list.group_id ASC, name ASC, field_name ASC, artifact.artifact_id ASC',
 					array($aid,
 					      "$aid %",
 					      "% $aid %",
 					      "% $aid"));
-		if (db_numrows($res)>0) {
-			?>
-<div class="tabbertab" title="<?php echo _('Backward Relations'); ?>">
-<table border="0" width="80%">
-	<tr>
-		<td colspan="2">
-		<h2><?php echo _('Changes') ?>:</h2>
-		<?php
-		$current = '';
-		$end = '';
+		if (db_numrows($res) < 1) {
+			return;
+		}
+
+		echo '<h3>' . _('Backward Relations') . ":</h3>\n";
+
+		$last_gn = false;	
+		$last_tn = false;
+		$last_fn = false;
+		$t = new EvolvisTable(array(false));
 		while ($arr = db_fetch_array($res)) {
-			$title = $arr['group_name'].': '.$arr['name'];
-			if ($title != $current) {
-				echo $end.'<strong>'.$title.'</strong>';
-				$current = $title;
-				$end = '<br /><br />';
+			if ($arr['group_name'] !== $last_gn ||
+			    $arr['name'] !== $last_tn ||
+			    $arr['field_name'] !== $last_fn) {
+				$t->tr()->th()->setraw(sprintf(
+				    _('%1$s: %2$s <%4$s>(Relation: %3$s)</%5$s>'),
+				    util_html_secure($arr['group_name']),
+				    util_html_secure($arr['name']),
+				    util_html_secure($arr['field_name']),
+				    'i style="font-weight:normal;"', 'i'));
+				$last_gn = $arr['group_name'];
+				$last_tn = $arr['name'];
+				$last_fn = $arr['field_name'];
 			}
-			$text = '[#'.$arr['artifact_id'].']';
-			$url = '/tracker/?func=detail&aid='.$arr['artifact_id'].'&group_id='.$arr['group_id'].'&atid='.$arr['group_artifact_id'];
-			$arg = 'title="'.util_html_secure($arr['summary']).'"' ;
-			if ($arr['status_id'] == 2) {
-				$arg .= 'class="artifact_closed"';
-			}
-			print '<br/>   <a href="'.$url.'" '.$arg.'>'.$text.'</a>'.' <a href="'.$url.'">'.$arr['summary'].'</a> <i>(Relation: '.$arr['field_name'].')</i>';
+			$aid = (int)$arr['artifact_id'];
+			$atext = sprintf('[#%d]', $aid);
+			$alink = util_make_url('/tracker/t_follow.php/' . $aid);
+			$abody = util_html_secure($arr['summary']);
+			$t->tr()->td()->setraw(html_e('tt', array(), $atext) .
+			    " " . html_e('a', array('href' => $alink), $abody));
 		}
-		?></td>
-	</tr>
-</table>
-</div>
-<?php
-}	
+		echo $t->emit();
 	}
 
-	
 }
 
 // Local Variables:

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactTypeHtml.class.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactTypeHtml.class.php	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/include/ArtifactTypeHtml.class.php	2011-12-06 12:35:43 UTC (rev 17776)
@@ -28,6 +28,7 @@
 require_once $gfcommon.'tracker/ArtifactExtraFieldElement.class.php';
 require_once $gfcommon.'tracker/ArtifactWorkflow.class.php';
 require_once $gfcommon.'include/utils_crossref.php';
+require_once $gfcommon.'include/EvolvisTable.class.php';
 
 class ArtifactTypeHtml extends ArtifactType {
 
@@ -67,12 +68,34 @@
 		return str_replace("\n","<br />", $msg);
 	}
 
-	function renderExtraFields($selected=array(),$show_100=false,$text_100='none',$show_any=false,$text_any='Any',$types=array(),$status_show_100=false,$mode='') {
+	function renderExtraFields($selected=array(),$show_100=false,$text_100='none',$show_any=false,$text_any='Any',$types=array(),$status_show_100=false,$mode='',$intable=true,$skips=array()) {
 		$efarr = $this->getExtraFields($types);
-		//each two columns, we'll reset this and start a new row
 
-		$template = $this->getRenderHTML($types, $mode);
+		foreach ($skips as $whichone) {
+			if ($whichone === 'Status') {
+				foreach ($efarr as $k => $v) {
+					if ($v['field_type'] == ARTIFACT_EXTRAFIELDTYPE_STATUS) {
+						$found = $k;
+						break;
+					}
+				}
+			} else {
+				foreach ($efarr as $k => $v) {
+					if ($v['field_name'] == $whichone) {
+						$found = $k;
+						break;
+					}
+				}
+			}
+			if ($found !== false) {
+				unset($efarr[$found]);
+			}
+		}
 
+		$template = $intable ?
+		    $this->getRenderHTML($types, $mode) :
+		    $this->generateEfRendering($efarr, $mode);
+
 		if ($mode=='QUERY') {
 			$keys=array_keys($efarr);
 			for ($k=0; $k<count($keys); $k++) {
@@ -130,7 +153,7 @@
 					// Convert artifact id to links.
 					$value = preg_replace('/\b(\d+)\b/e', "_artifactid2url('\\1')", $value);
 				}
-				$template = str_replace('{$PostName:'.$efarr[$i]['field_name'].'}',$post_name,$template);
+				$template = str_replace('{$PostName:'.$efarr[$i]['field_name'].'}',"",$template);
 				$template = str_replace('{$'.$efarr[$i]['field_name'].'}',$value,$template);		
 			}
 			echo $template;
@@ -209,95 +232,246 @@
 		}
 	}
 
+	function renderExtraField($selected,$show_100,$text_100,$show_any,$text_any,$types,$status_show_100,$mode,$whichone) {
+		$ofarr = $this->getExtraFields($types);
+		$found = false;
+
+		if ($whichone === 'Status') {
+			foreach ($ofarr as $k => $v) {
+				if ($v['field_type'] == ARTIFACT_EXTRAFIELDTYPE_STATUS) {
+					$found = $k;
+					break;
+				}
+			}
+		} else {
+			foreach ($ofarr as $k => $v) {
+				if ($v['field_name'] == $whichone) {
+					$found = $k;
+					break;
+				}
+			}
+		}
+		if ($found === false) {
+			return;
+		}
+
+		$efarr = array($found => $ofarr[$found]);
+		$template = $this->generateEfRender($ofarr[$found], $mode);
+
+		// 'DISPLAY' mode is for renderding in 'read-only' mode (for detail view).
+		if ($mode === 'DISPLAY') {
+			$keys=array_keys($efarr);
+			for ($k=0; $k<count($keys); $k++) {
+				$i=$keys[$k];
+
+				if (!isset($selected[$efarr[$i]['extra_field_id']]))
+					$selected[$efarr[$i]['extra_field_id']] = '';
+
+				$value = @$selected[$efarr[$i]['extra_field_id']];
+
+				if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_SELECT ||
+					$efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX ||
+					$efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RADIO ||
+					$efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_STATUS ||
+					$efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_MULTISELECT) {
+					if ($value == 100) {
+						$value = 'None';
+					} else {
+						$arr = $this->getExtraFieldElements($efarr[$i]['extra_field_id']);
+						
+						// Convert the values (ids) to names in the ids order.
+						$new = array();
+						for ($j=0; $j<count($arr); $j++) {
+							if (is_array($value)) {
+								if (in_array($arr[$j]['element_id'],$value))
+									$new[]= $arr[$j]['element_name'];
+							} elseif ($arr[$j]['element_id'] === $value) {
+									$new[] = $arr[$j]['element_name'];
+							}
+						}
+						$value = join('<br />', $new);
+					}
+				} else if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXT ||
+					$efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXTAREA) {
+					$value = preg_replace('/((http|https|ftp):\/\/\S+)/', 
+								"<a href=\"\\1\" target=\"_blank\">\\1</a>", $value);
+				} else if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RELATION) {
+					// Convert artifact id to links.
+					$value = preg_replace('/\b(\d+)\b/e', "_artifactid2url('\\1')", $value);
+				}
+				$template = str_replace('{$PostName:'.$efarr[$i]['field_name'].'}',"",$template);
+				$template = str_replace('{$'.$efarr[$i]['field_name'].'}',$value,$template);		
+			}
+			echo $template;
+			return ;
+		}
+		
+		$keys=array_keys($efarr);
+		for ($k=0; $k<count($keys); $k++) {
+			$i=$keys[$k];
+			$post_name = '';
+
+			if (!isset($selected[$efarr[$i]['extra_field_id']])) 
+				$selected[$efarr[$i]['extra_field_id']] = '';
+
+			if ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_SELECT) {
+				$str = $this->renderSelect($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$show_100,$text_100,$show_any,$text_any);
+
+			} elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_CHECKBOX) {
+
+				$str = $this->renderCheckbox($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$show_100,$text_100);
+
+			} elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RADIO) {
+
+				$str = $this->renderRadio($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$show_100,$text_100,$show_any,$text_any);
+
+			} elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXT ||
+					$efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_INTEGER) {
+
+				$str = $this->renderTextField($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2']);
+				if ($mode == 'QUERY') {
+					$post_name =  ' <i>'._('(%% for wildcards)').'</i>   ';
+				}
+				
+			} elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_TEXTAREA) {
+
+				$str = $this->renderTextArea($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2']);
+				if ($mode == 'QUERY') {
+					$post_name =  ' <i>'._('(%% for wildcards)').'</i>   ';
+				}
+				
+			} elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_MULTISELECT) {
+
+				$str = $this->renderMultiSelectBox ($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$show_100,$text_100);
+
+			} elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_STATUS) {
+
+				// Get the allowed values from the workflow.
+				$atw = new ArtifactWorkflow($this, $efarr[$i]['extra_field_id']);
+
+				// Special treatement for the initial step (Submit).
+				// In this case, the initial value is the first value.
+				if ($selected === true) {
+					$selected_node = 100;
+				} elseif (isset($selected[$efarr[$i]['extra_field_id']]) && $selected[$efarr[$i]['extra_field_id']]) {
+					$selected_node = $selected[$efarr[$i]['extra_field_id']];
+				} else {
+					$selected_node = 100;
+				}
+
+				$allowed = $atw->getNextNodes($selected_node);
+				$allowed[] = $selected_node;
+				$str = $this->renderSelect($efarr[$i]['extra_field_id'],$selected_node,$status_show_100,$text_100,$show_any,$text_any, $allowed);
+
+			} elseif ($efarr[$i]['field_type'] == ARTIFACT_EXTRAFIELDTYPE_RELATION) {
+
+				$str = $this->renderRelationField($efarr[$i]['extra_field_id'],$selected[$efarr[$i]['extra_field_id']],$efarr[$i]['attribute1'],$efarr[$i]['attribute2']);
+				if ($mode == 'UPDATE') {
+					$post_name = html_image('ic/forum_edit.gif','37','15',array('title'=>"Click to edit", 'alt'=>"Click to edit", 'onclick'=>"switch2edit(this, 'show$i', 'edit$i')"));
+				}
+			}
+			$template = str_replace('{$PostName:'.$efarr[$i]['field_name'].'}',$post_name,$template);
+			$template = str_replace('{$'.$efarr[$i]['field_name'].'}',$str,$template);
+		}
+		if($template != NULL){
+			echo $template;
+		}
+	}
+
 	function renderRelatedTasks($group, $ah) {
-
 		if (!$group->usesPM()) {
-			return '';
+			return;
 		}
 
+		$is_admin = forge_check_perm('tracker_admin', $this->Group->getID());
 		$taskcount = db_numrows($ah->getRelatedTasks());
+		$totalPercentage = 0;
 
-		if (forge_check_perm ('tracker_admin', $this->Group->getID())) {
-			$is_admin=false;
-		} else {
-			$is_admin=true;
+		if ($taskcount < 1) {
+			echo html_e('p', array(), _('No related tasks.'));
+			return;
 		}
 
-		$totalPercentage = 0;
+		$title_arr = array();
+		$title_arr[] = _('Task Summary');
+		$title_arr[] = _('Start Date');
+		$title_arr[] = _('End Date');
+		$title_arr[] = _('Status');
+		if ($is_admin) {
+			$title_arr[] = _('Remove Relation');
+		}
+		$t = new EvolvisTable($title_arr);
 
-		if ($taskcount > 0) {
-			echo '<tr><td colspan="2">';
-			echo '<b>' . _("Related Tasks") . ':</b>' . "<br />\n";
-			$title_arr = array();
-			$title_arr[] = _('Task Summary');
-			$title_arr[] = _('Start Date');
-			$title_arr[] = _('End Date');
-			$title_arr[] = _('Status');
-			(($is_admin) ? $title_arr[]=_('Remove Relation') : '');
+		for ($i = 0; $i < $taskcount; ++$i) {
+			$taskinfo = db_fetch_array($ah->relatedtasks, $i);
+			$totalPercentage += $taskinfo['percent_complete'];
+			$taskid = $taskinfo['project_task_id'];
+			$projectid = $taskinfo['group_project_id'];
+			$groupid = $taskinfo['group_id'];
+			$summary = util_html_secure($taskinfo['summary']);
+			$startdate = date(_('Y-m-d H:i'), $taskinfo['start_date']);
+			$enddate = date(_('Y-m-d H:i'), $taskinfo['end_date']);
+			$status = $taskinfo['status_name'];
 
-			echo $GLOBALS['HTML']->listTableTop($title_arr);
-			for ($i = 0; $i < $taskcount; $i++) {
-				$taskinfo  = db_fetch_array($ah->relatedtasks, $i);
-				$totalPercentage += $taskinfo['percent_complete'];
-				$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']);
-				$status   = $taskinfo['status_name'];
-				echo '<tr>
-						<td><a href="/pm/task.php?func=detailtask&project_task_id='.$taskid.
-						'&group_id='.$groupid.'&group_project_id='.$projectid.'">[T'.$taskid.'] '.$summary.'</a></td>
-						<td>'.$startdate.'</td>
-						<td>'.$enddate.'</td>
-						<td>'.$status.' ('.$taskinfo['percent_complete'].'%)</td>'.
-					(($is_admin) ? '<td><input type="checkbox" name="remlink[]" value="'.$taskid.'" /></td>' : '').
-					'</tr>';
+			$r =& $t->tr();
+			$r->td()->setraw(html_e('a', array(
+				'href' => '/pm/task.php?func=detailtask' .
+				    '&project_task_id=' . $taskid .
+				    '&group_id=' . $groupid .
+				    '&group_project_id=' . $projectid,
+			    ), '[T' . $taskid . '] ' . $summary));
+			$r->td()->set($startdate);
+			$r->td()->set($enddate);
+			$r->td()->set($status . ' (' .
+			    $taskinfo['percent_complete'] . '%)');
+			if ($is_admin) {
+				$r->td()->setraw(html_e('input', array(
+					'type' => 'checkbox',
+					'name' => 'remlink[]',
+					'value' => $taskid,
+				    )));
 			}
-			echo $GLOBALS['HTML']->listTableBottom();
+		}
+		echo $t->emit();
 
-			echo "\n<hr /><p style=\"text-align:right;\">";
-			printf(_('Average completion rate: %d%%'), (int)($totalPercentage/$taskcount));
-			echo "</p>\n";
-			echo "</td></tr>\n";
-		}
+		echo "\n<hr /><p style=\"text-align:right;\">";
+		printf(_('Average completion rate: %d%%'), (int)($totalPercentage/$taskcount));
+		echo "</p>\n";
 	}
 
 	function renderFiles($group_id, $ah) {
-
 		$file_list =& $ah->getFiles();
-		$count=count($file_list);
+		if (!count($file_list)) {
+			return;
+		}
 
-		if ($count > 0) {
-			echo '<b>'._("Attachments").':</b>'.'<br/>';
-			$title_arr=array();
-			$title_arr[] = _('Size');
-			$title_arr[] = _('Name');
-			$title_arr[] = _('Date');
-			$title_arr[] = _('By');
-			$title_arr[] = _('Download/View');
-			echo $GLOBALS['HTML']->listTableTop($title_arr);
-			
-			foreach ($file_list as $file) {
-				if (strncasecmp($file->getType(),
-				    "image/", 6) === 0) {
-					$lightbox = ' rel="lightbox"';
-				} else {
-					$lightbox = "";
-				}
-				echo '<tr>';
-				echo '<td>'.human_readable_bytes($file->getSize()).'</td>';
-				echo '<td>'.htmlspecialchars($file->getName()).'</td>';
-				echo '<td>'.date(_('Y-m-d H:i'), $file->getDate()).'</td>';
-				echo '<td>'.$file->getSubmittedUnixName().'</td>';
-				echo '<td><a' . $lightbox . ' href="/tracker/download.php/'.$group_id.'/'. $this->getID().'/'. $ah->getID() .'/'.$file->getID().'/'.$file->getName() .'">'. htmlspecialchars($file->getName()) .'</a></td>';
-//				<td><input type="checkbox" name="delete_file[]" value="'. $file->getID() .'">'._("Delete").' </td>
-				echo '</tr>';
+		echo '<h3>' . _('Attachments') . ":</h3>\n";
+
+		$t = new EvolvisTable(array(
+			_('Name'),
+			_('Date'),
+			_('By'),
+			_('Size'),
+		    ));
+		foreach ($file_list as $file) {
+			$fln = $file->getName();
+			$fla = array();
+			$fla['href'] = '/tracker/download.php/' . $group_id .
+			    '/' . $this->getID() . '/' . $ah->getID() .
+			    '/' . $file->getID() . '/' . $fln;
+			if (strncasecmp($file->getType(), "image/", 6) === 0) {
+				$fla['rel'] = "lightbox";
 			}
 
-			echo $GLOBALS['HTML']->listTableBottom();
+			$r =& $t->tr();
+			$r->td()->setraw(html_e('a', $fla,
+			    htmlspecialchars($fln)));
+			$r->td()->set(date(_('Y-m-d H:i'), $file->getDate()));
+			$r->td(array(), -1, $file->getSubmittedUnixName());
+			$r->td()->set(human_readable_bytes($file->getSize()));
+//				<td><input type="checkbox" name="delete_file[]" value="'. $file->getID() .'">'._("Delete").' </td>
 		}
+		echo $t->emit();
 	}
 
 	/**
@@ -318,7 +492,7 @@
 	/**
 	 *	generateRenderHTML
 	 *
-	 *	@return	string	HTML template.
+	 *	@return	string	HTML template (bunch of <tr>s).
 	 */
 	function generateRenderHTML($types=array(), $mode) {
 		$efarr = $this->getExtraFields($types);
@@ -433,6 +607,41 @@
 	}
 
 	/**
+	 *	generateEfRendering
+	 *
+	 *	@return	string	XHTML template (bunch of <div>s).
+	 */
+	function generateEfRendering($efarr, $mode) {
+		if (!count($efarr)) {
+			return "";
+		}
+
+		$rv = "\n<!-- Start Extra Fields Rendering -->";
+		foreach ($efarr as $k => $v) {
+			$rv .= $this->generateEfRender($v, $mode);
+		}
+		$rv .= "\n<!-- End Extra Fields Rendering -->\n";
+		return ($rv);
+	}
+
+	function generateEfRender($v, $mode) {
+		$name = $v['field_name'];
+		/*
+		 * Do not show the required star in query
+		 * mode (creating/updating a query).
+		 */
+		if ($mode != "QUERY" && $mode != "DISPLAY" &&
+		    $v['is_required']) {
+			$name .= utils_requiredField();
+		}
+
+		return "\n\t<div><strong>" . $name . ":</strong>" .
+		    "\n\t\t" . '{$PostName:' . $v['field_name'] . '}' .
+		    "<br />\n\t\t" . '{$' . $v['field_name'] . '}' .
+		    "\n\t</div>";
+	}
+
+	/**
 	 *	renderSelect - this function builds pop up
 	 *	box with choices.
 	 *	

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/item.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/item.php	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/item.php	2011-12-06 12:35:43 UTC (rev 17776)
@@ -4,6 +4,7 @@
  *
  * Copyright © 2011
  *	Thorsten “mirabilos” Glaser <t.glaser at tarent.de>
+ *	Katja Hapke <k.hapke at tarent.de>
  * Copyright © 2011
  *	Alain Peyrat – Alcatel-Lucent
  * Copyright © 2010
@@ -71,7 +72,8 @@
 
 if ($is_add) {
 	$ath->header(array(
-		'title' => _('Submit New'),
+		'title' => sprintf(_('%1$s %2$s: Submit New'),
+		    $group->getPublicName(), $ath->getName()),
 	    ));
 	echo $ath->renderSubmitInstructions();
 } else {
@@ -112,6 +114,10 @@
 	    '">' . $content . '</span>';
 }
 
+$data_extrafields = $is_add ? array() : $ah->getExtraFieldData();
+$mode_extrafields = $is_add || ($accesslevel >= TRK_TECH) ? 'UPDATE' : 'DISPLAY';
+$skip_extrafields = array();
+
 ?>
 <form id="trackeritemform" action="<?php echo getselfhref(); ?>"
  enctype="multipart/form-data" method="post">
@@ -120,55 +126,113 @@
 <input type="hidden" name="MAX_FILE_SIZE" value="10000000" />
 
 <?php
-if ($is_add) {
+echo $HTML->boxTop(_('Details'), 'Details', false, 'tracker_item_details');
 ?>
-<table width="80%"><tr>
+<table width="100%" cellspacing="12" cellpadding="3" style="table-layout:fixed">
+<tr align="left" valign="top">
 <?php
-	if (!session_loggedin()) {
+echo "<td " . $HTML->boxGetAltRowStyle(0) . " width=\"30%\">\n";
+if (!$is_add) {
+	if ($ath->usesCustomStatuses()) {
+		$ath->renderExtraField($data_extrafields, true, 'none', false,
+		    'Any', array(), false, $mode_extrafields, 'Status');
+		$skip_extrafields[] = 'Status';
+	} else {
+		echo "\t<div><strong>" . _('Status') . ":</strong><br />\n";
+		if ($accesslevel >= TRK_FULL) {
+			echo $ath->statusBox('status_id', $ah->getStatusID());
+		} else {
+			echo gettipspan('status_id', $ah->getStatusID());
+		}
+		echo "</div>\n";
+	}
+}
+$ath->renderExtraField($data_extrafields, true, 'none', false,
+    'Any', array(), false, $mode_extrafields, 'Resolution');
+$skip_extrafields[] = 'Resolution';
 ?>
-	<td colspan="2">
-		<span class="warning_msg"><?php
-		printf(_('Please %1$s login %2$s'), '<a href="' .
-		    util_make_url('/account/login.php?return_to=' .
-		    urlencode(getselfhref(array('func' => 'add'), false))) .
-		    '">', '</a>'); ?></span>
-		<p><?php echo _('If you <strong>cannot</strong> login, then enter your email address here'); ?>:</p>
-		<p><input type="text" name="user_email" size="50" maxlength="255" /></p>
-	</td>
-</tr><tr>
+	<div><strong><?php echo _('Priority'); ?>:</strong><br /><?php
+if ($accesslevel >= TRK_FULL) {
+	echo html_build_priority_select_box('priority',
+	    $is_add ? 3 : $ah->getPriority());
+} else {
+	echo gettipspan('priority', $ah->getPriority());
+}
+?></div>
 <?php
-		/* !session_loggedin */
-	}
+$ath->renderExtraField($data_extrafields, true, 'none', false,
+    'Any', array(), false, $mode_extrafields, 'Severity');
+$skip_extrafields[] = 'Severity';
+if (!$is_add || $accesslevel >= TRK_FULL) {
 ?>
-	<td><strong><?php echo _('For project') ?>:</strong><br /><?php
-	echo $group->getPublicName();
-	?></td>
-	<td align="right">
-		<input type="submit" name="submit" value="<?php echo _('Submit'); ?>" />
-	</td>
-</tr>
-</table>
+	<div><strong><?php echo _('Assigned to'); ?>:</strong><br /><?php
+	if ($accesslevel >= TRK_FULL) {
+		echo $ath->technicianBox('assigned_to',
+		    $is_add ? 'xzxz' : $ah->getAssignedTo()) . ' ' .
+		    util_make_link('/tracker/admin/?group_id=' . $group_id .
+		    '&atid=' . $atid . '&update_users=1', '(' .
+		    _('Admin') . ')');
+	} else {
+		echo gettipspan('assigned_to', $ah->getAssignedRealName() .
+		    ' (' . $ah->getAssignedUnixName() . ')');
+	}
+?></div>
+<?php } ?>
+</td>
+<td <?php echo $HTML->boxGetAltRowStyle(0); ?> width="40%"><?php
+$ath->renderExtraFields($data_extrafields, true, 'none', false,
+    'Any', array(), false, $mode_extrafields, false, $skip_extrafields);
+?></td>
+<td <?php echo $HTML->boxGetAltRowStyle(0); ?> width="30%">
 <?php
-	/* is_add */
-} else if (session_loggedin()) {
-	$num_td = 2;
-	if ($accesslevel >= TRK_TECH && $group->usesPM()) {
-		++$num_td;
+if ($is_add) {
+	echo html_e('div', array(), html_e('strong', array(),
+	    _('New submission')));
+} else {
+?>
+	<div><strong><?php echo _('Date Submitted'); ?>:</strong><br /><?php
+	echo date(_('Y-m-d H:i'), $ah->getOpenDate());
+	$close_date = $ah->getCloseDate();
+	/*XXX hardcoded status ID */
+	if ($ah->getStatusID() == 2 && $close_date > 1) {
+		echo "\n<br /><strong>" . _('Date Closed') . ':</strong><br />' .
+		    date(_('Y-m-d H:i'), $close_date);
 	}
-	if ($accesslevel >= TRK_FULL) {
-		++$num_td;
+?></div>
+	<p><strong><?php echo _('Submitted by'); ?>:</strong><br /><?php
+	echo $ah->getSubmittedRealName();
+	if ($ah->getSubmittedBy() != 100) {
+		echo ' (<tt>' . util_make_link_u($ah->getSubmittedUnixName(),
+		    $ah->getSubmittedBy(), $ah->getSubmittedUnixName()) . '</tt>)';
 	}
-	if ($num_td == 2) {
-		$w_td = '50%';
-	} else if ($num_td == 3) {
-		$w_td = '33%';
-	} else {
-		$w_td = '25%';
+?></p>
+<?php } ?>
+<?php if (!$is_add && $accesslevel >= TRK_FULL) { ?>
+	<p><strong><?php echo _('Data Type'); ?>:</strong><br /><?php
+	$atf = new ArtifactTypeFactory($group);
+	$tids = array();
+	foreach ($atf->getArtifactTypes() as $at) {
+		if (forge_check_perm('tracker', $at->getID(), 'manager')) {
+			$tids[] = $at->getID();
+		}
 	}
+	$res = db_query_params('SELECT group_artifact_id, name
+	    FROM artifact_group_list WHERE group_artifact_id = ANY ($1)',
+	    array(db_int_array_to_any_clause($tids)));
+	echo html_build_select_box($res, 'new_artifact_type_id', $atid, false);
+?></p>
+<?php } ?>
+<?php if (!$is_add) { ?>
+	<p><strong><?php
+	$permalink = util_make_url('/tracker/t_follow.php/' . $aid);
+	echo '<a href="' . $permalink . '">' . _('Permalink') . '</a>';
+	echo "</strong><br />\n";
 ?>
-<table width="80%"><tr>
-	<td width="<?php echo $w_td; ?>">
-		<?php
+		<span class="smaller"><?php echo $permalink; ?></span>
+	</p>
+<?php } ?>
+<?php if (!$is_add && session_loggedin()) { ?>
+	<p><?php
 	if ($ah->isMonitoring()) {
 		$img = "xmail16w.png";
 		$key = "monitorstop";
@@ -180,42 +244,38 @@
 	}
 	echo gettipspan('monitor', '<a href="' .
 	    getselfhref(array('func' => 'monitor')) . '"><strong>' .
-	    html_image('ic/' . $img, '20', '20') . ' ' . $txt .
+	    '<span style="width:30px;">' .
+	    html_image('ic/' . $img, '20', '20') . '</span>' . $txt .
 	    '</strong></a>');
-?>
-	</td>
+?></p>
 <?php
-	if ($accesslevel >= TRK_TECH && $group->usesPM()) {
-?>
-	<td width="<?php echo $w_td; ?>"><?php
-		echo '<a href="' . getselfhref(array('func' => 'taskmgr')) .
-		    '">' . html_image('ic/taskman20w.png', '20', '20') .
-		    '<strong>' . _('Build Task Relation') . '</strong></a>';
-?></td>
-<?php
-		/* TRK_TECH && usesPM */
-	}
 	if ($accesslevel >= TRK_FULL) {
 ?>
-	<td width="<?php echo $w_td; ?>"><a href="<?php
+	<p><a href="<?php
 		echo getselfhref(array('func' => 'deleteartifact'));
-?>"><strong><?php
-		echo html_image('ic/trash.png', '16', '16') .
-		    _('Delete');
-?></strong></a></td>
+?>"><strong>
+		<span style="width:30px;"><?php
+		echo html_image('ic/trash.png', '16', '16') . "</span>\n\t\t" .
+		    _('Delete'); ?></strong></a></p>
 <?php
-		/* TRK_FULL */
 	}
+}
 ?>
-	<td width="<?php echo $w_td; ?>" align="right">
-		<input type="submit" name="submit" value="<?php echo _('Save Changes') ?>" />
-	</td>
+</td>
+</tr>
+<tr align="left" valign="top"><td colspan="3" align="right">
+	<input type="submit" name="submit"
+	 value="<?php echo _('Save Changes'); ?>" />
+</td></tr>
+</table>
+
 <?php
-	if ($accesslevel >= TRK_FULL && $sysdebug_enable) {
-		/* debugging function: look at this page the way a user would */
+if (!$is_add && $accesslevel >= TRK_FULL && $sysdebug_enable) {
+	/* debugging function: look at this page the way a user would */
+	echo $HTML->boxMiddle(_('Debugging Functions'), 'Debugging_Functions',
+	    true, 'tracker_item_debug');
 ?>
-</tr>
-<tr><td colspan="<?php echo $num_td; ?>" style="border:1px solid green;">
+<div style="width:80%; position:relative; left:10%;">
 	You have <tt>TRK_FULL</tt> access, and this is a debugging system.
 	If you want, you can look at this page with reduced access levels,
 	e.g. if you’re a Forge developer. – <a href="<?php
@@ -225,120 +285,19 @@
 	    'reduce_accesslevel' => 2)); ?>">TRK_VIEW</a> – To get back,
 	just access the Permalink of this entry, or remove the HTTP GET
 	parameter <tt>reduce_accesslevel</tt> and reload.
-</td>
+</div>
 <?php
-		/* TRK_FULL && sysdebug_enable */
-	}
-?>
-</tr></table>
-<?php
-	/* logged in */
 }
-?>
-<table border="0" width="80%">
-<?php if (!$is_add) { ?>
-<tr>
-	<td width="50%">
-		<strong><?php echo _('Submitted by') ?>:</strong><br /><?php
-	echo $ah->getSubmittedRealName();
-	if ($ah->getSubmittedBy() != 100) {
-		echo ' (<tt>' . util_make_link_u($ah->getSubmittedUnixName(),
-		    $ah->getSubmittedBy(), $ah->getSubmittedUnixName()) .
-		    '</tt>)';
-	}
-?></td>
-	<td width="50%">
-		<strong><?php echo _('Date Submitted') ?>:</strong><br /><?php
-	echo date(_('Y-m-d H:i'), $ah->getOpenDate());
-	$close_date = $ah->getCloseDate();
-	/*XXX hardcoded status ID */
-	if ($ah->getStatusID() == 2 && $close_date > 1) {
-		echo '<br /><strong>' . _('Date Closed') . ':</strong><br />' .
-		    date(_('Y-m-d H:i'), $close_date);
-	}
-?></td>
-</tr>
-<?php
-	/* !is_add */
-}
-?>
-<tr>
-	<td><?php
-if (!$is_add && $accesslevel >= TRK_FULL) {
-	?><strong><?php echo _('Data Type') ?>:</strong><br /><?php
-	$atf = new ArtifactTypeFactory($group);
-	$tids = array();
-	foreach ($atf->getArtifactTypes() as $at) {
-		if (forge_check_perm('tracker', $at->getID(), 'manager')) {
-			$tids[] = $at->getID();
-		}
-	}
-	$res = db_query_params('SELECT group_artifact_id, name
-	    FROM artifact_group_list WHERE group_artifact_id = ANY ($1)',
-	    array(db_int_array_to_any_clause($tids)));
-	echo html_build_select_box($res, 'new_artifact_type_id', $atid, false);
-	/* !is_add && TRK_FULL */
-}
-?>
-	</td>
-	<td><?php
-if (!$is_add) {
-	$permalink = util_make_url('/tracker/t_follow.php/' . $aid);
-?><strong><a href="<?php echo $permalink; ?>">Permalink</a>:</strong><br /><?php
-	echo $permalink;
-}
-?></td>
-</tr>
-<?php
 
-$ath->renderExtraFields($is_add ? array() : $ah->getExtraFieldData(), true,
-    'none', false, 'Any', array(), false,
-    ($is_add || ($accesslevel >= TRK_TECH) ? 'UPDATE' : 'DISPLAY'));
-
-if (!$is_add || $accesslevel >= TRK_FULL) {
+echo $HTML->boxMiddle(_('Item Description'), 'Item_Description', false,
+    'tracker_item_description');
 ?>
-<tr>
-	<td><strong><?php echo _('Assigned to')?>:</strong><br /><?php
-	if ($accesslevel >= TRK_FULL) {
-		echo $ath->technicianBox('assigned_to',
-		    $is_add ? 'xzxz' : $ah->getAssignedTo()) . ' ' .
-		    util_make_link('/tracker/admin/?group_id=' . $group_id .
-		    '&atid=' . $atid . '&update_users=1', '(' .
-		    _('Admin') . ')');
-	} else {
-		echo gettipspan('assigned_to', $ah->getAssignedRealName() .
-		    ' (' . $ah->getAssignedUnixName() . ')');
-	}
-?></td>
-	<td<?php if ($is_add) { echo ' align="right"'; }?>>
-		<strong><?php echo _('Priority') ?>:</strong><br /><?php
-	if ($accesslevel >= TRK_FULL) {
-		echo html_build_priority_select_box('priority',
-		    $is_add ? 3 : $ah->getPriority());
-	} else {
-		echo gettipspan('priority', $ah->getPriority());
-	}
-?></td>
-</tr>
-<?php
-	/* !is_add || TRK_FULL */
-}
-if (!$is_add && !$ath->usesCustomStatuses()) {
-?>
-<tr>
-	<td colspan="2"><strong><?php echo _('State') ?>:</strong><br /><?php
-	if ($accesslevel >= TRK_FULL) {
-		echo $ath->statusBox('status_id', $ah->getStatusID());
-	} else {
-		echo gettipspan('status_id', $ah->getStatusID());
-	}
-?></td>
-</tr>
-<?php } ?>
-<tr>
-	<td colspan="2"><strong><?php echo _('Summary') .
+<table width="100%" cellspacing="12">
+<tr align="left" valign="top">
+<td <?php echo $HTML->boxGetAltRowStyle(0); ?> width="50%">
+	<div><strong><?php echo _('Summary') .
 	    utils_requiredField(); ?>:</strong><br /><?php
-$x = '<input type="text" name="summary" size="80" maxlength="255"';
+$x = '<input type="text" name="summary" size="60" maxlength="255"';
 if ($is_add) {
 	$x .= ' />';
 } else {
@@ -353,151 +312,161 @@
 	}
 }
 echo gettipspan('summary', $x);
-?></td>
-</tr>
-<tr>
-	<td colspan="2">
-<?php
+echo "</div>\n";
+
 if ($is_add || $accesslevel >= TRK_FULL) {
+	$ndsc = $is_add ? "details" : "description";
+	echo '<div';
 	if (!$is_add) {
-?>
-		<div id="edit" style="display:none;">
-<?php
+		echo ' id="edit" style="display:none;"';
 	}
-	$ndsc = $is_add ? "details" : "description";
-	echo '<strong>' . _('Detailed description') . utils_requiredField() .
-	    ': ' . notepad_button('document.forms.trackeritemform.' . $ndsc) .
-	    '</strong><br />';
-	echo gettipspan('description', '<textarea rows="30" cols="79" name="' .
+	echo '><strong>' . _('Detailed description') .
+	    utils_requiredField() . ':</strong><br />';
+	echo gettipspan('description', '<textarea rows="24" cols="60" name="' .
 	    $ndsc . '">' . ($is_add ? "" : $ah->getDetails()) . '</textarea>');
-	if (!$is_add) {
+	echo "</div>\n";
+}
+
+if (!$is_add) {
+	echo '	<div id="show" style="display:block;">' . "\n";
+	echo $ah->showDetails($accesslevel >= TRK_FULL);
+	echo "</div>\n";
+}
 ?>
-		</div>
+</td>
+<td <?php echo $HTML->boxGetAltRowStyle(0); ?> width="50%">
 <?php
-	}
-	/* is_add || TRK_FULL */
-}
 if (!$is_add) {
+	echo '<h3>' . _('Followups') . ': ';
+	$commentsort_chrono = getStringFromRequest('commentsort') != 'anti';
+	if ($commentsort_chrono) {
+		$tgt = getselfhref(array('func' => 'detail',
+		    'commentsort' => 'anti'));
+		$txt = _('Sort comments antichronologically');
+	} else {
+		$tgt = getselfhref(array('func' => 'detail',
+		    'commentsort' => 'chrono'));
+		$txt = _('Sort comments chronologically');
+	}
+	echo '<a href="' . $tgt . '">' . $txt . "</a></h3>\n";
 ?>
-		<div id="show" style="display:block;"><?php
-	echo $ah->showDetails($accesslevel >= TRK_FULL);
-?></div>
+	<div style="height:30em; overflow:scroll;">
+	<?php echo $ah->showMessages($commentsort_chrono); ?>
+	</div>
 <?php } ?>
-	</td>
+</td>
 </tr>
-<?php if ($is_add) { ?>
-<tr><td colspan="2" align="center">
-	<span class="veryimportant"><?php
-	echo _('DO NOT enter passwords or confidential information in your message!');
-	?></span>
-</td></tr>
-<tr><td colspan="2">
+<tr align="left" valign="top">
+<td <?php echo $HTML->boxGetAltRowStyle(0); ?> width="50%">
 <?php
-	/* is_add */
-} else {
+if (!$is_add) {
+	$ath->renderFiles($group_id, $ah);
+}
+if ($is_add) {
+	echo '<h3>' . _('Attach files to this submission') . ': <a href="' .
+	    "javascript:help_window('" .
+	    util_make_url('/help/tracker.php?helpname=attach_file') .
+	    "');" . '"><strong>(?)</strong></a>' . "</h3>\n";
+	echo '<input type="file" name="input_file0" size="42" />' . "\n";
+	echo '<input type="file" name="input_file1" size="42" />' . "\n";
+	echo '<input type="file" name="input_file2" size="42" />' . "\n";
+	echo '<input type="file" name="input_file3" size="42" />' . "\n";
+	echo '<input type="file" name="input_file4" size="42" />' . "\n";
+} else if ($accesslevel >= TRK_TECH ||
+    (session_loggedin() && ($ah->getSubmittedBy() == user_getid()))) {
+	echo '<h3>' . _('Create an attachment') . ': <a href="' .
+	    "javascript:help_window('" .
+	    util_make_url('/help/tracker.php?helpname=attach_file') .
+	    "');" . '"><strong>(?)</strong></a>' . "</h3>\n";
+	echo '<input type="file" name="input_file0" size="42" />' . "\n";
+}
 ?>
-</table>
-
-<div id="tabber" class="tabber">
-<div class="tabbertab" title="<?php echo _('Followups'); ?>">
+</td>
+<td <?php echo $HTML->boxGetAltRowStyle(0); ?> width="50%">
 <?php
+if (!$is_add) {
+	if ($accesslevel >= TRK_TECH || $ath->allowsAnon() ||
+	    session_loggedin()) {
+		echo '<h3>' . _('Write a comment') . ': ' .
+		    notepad_button('document.forms.trackeritemform.details') .
+		    "</h3>\n";
+		echo "<div>\n";
+		echo gettipspan('comment',
+		    '<textarea name="details" rows="7" cols="60"></textarea>');
+		echo "</div>\n";
+	}
 	if ($accesslevel >= TRK_FULL) {
-?>
-	<p><strong><?php echo _('Use Canned Response'); ?>:</strong>
-	<br />
-<?php
+		echo '<h3>' . _('OR use a canned response') . ":</h3>\n";
+		echo "<div>\n";
 		echo $ath->cannedResponseBox('canned_response') . ' ' .
 		    util_make_link('/tracker/admin/?group_id=' . $group_id .
-		    '&atid=' . $atid . '&add_canned=1', '(' .
-		    _('Admin') . ')') . "</p>\n";
+		    '&atid=' . $atid . '&add_canned=1',
+		    '(' . _('Admin') . ')');
+		echo "</div>\n";
 	}
-	if ($accesslevel >= TRK_TECH || $ath->allowsAnon() ||
-	    session_loggedin()) {
-?>
-	<p><strong><?php echo _('OR Attach A Comment') . ': ' .
-	    notepad_button('document.forms.trackeritemform.details');
-	?></strong><br /><?php echo gettipspan('comment',
-	    '<textarea name="details" rows="7" cols="60"></textarea>');
-	?></p>
-<?php
 }
-echo '<h2>' . _('Followups') . ': ';
-$commentsort_chrono = getStringFromRequest('commentsort') != 'anti';
-if ($commentsort_chrono) {
-	$tgt = getselfhref(array('func' => 'detail',
-	    'commentsort' => 'anti'));
-	$txt = _('Sort comments antichronologically');
-} else {
-	$tgt = getselfhref(array('func' => 'detail',
-	    'commentsort' => 'chrono'));
-	$txt = _('Sort comments chronologically');
-}
-echo '<a href="' . $tgt . '">' . $txt . "</a></h2>\n";
-
-echo $ah->showMessages($commentsort_chrono);
 ?>
-</div>
+</td>
+</tr>
+<tr align="left" valign="top">
+	<td>
+		<?php echo utils_requiredField() . ' ' .
+		    _('indicates required fields.'); ?>
+	</td><td colspan="2" align="right">
+		<input type="submit" name="submit"
+		 value="<?php echo _('Save Changes'); ?>" />
+	</td>
+</tr>
+</table>
+
 <?php
-	if ($accesslevel >= TRK_FULL && $group->usesPM()) {
+if (!$is_add) {
+	echo $HTML->boxMiddle(_('Item Relationships'), 'Item_Relationship',
+	    false, 'tracker_item_relationship');
 ?>
-<div class="tabbertab" title="<?php echo _('Related Tasks'); ?>">
-	<table border="0" width="80%">
-		<tr><td colspan="2"><!-- dummy in case this is empty --></td></tr>
-<?php $ath->renderRelatedTasks($group, $ah); ?>
-	</table>
-</div>
-<?php } ?>
-<div class="tabbertab" title="<?php echo _('Attachments'); ?>">
+
+<table width="100%" cellspacing="12">
+<tr align="left" valign="top">
+<td <?php echo $HTML->boxGetAltRowStyle(0); ?> width="50%">
 <?php
-	/* !is_add */
-}
-if ($is_add || $accesslevel >= TRK_TECH ||
-    (session_loggedin() && ($ah->getSubmittedBy() == user_getid()))) {
-	echo _('Attach Files'); ?><a href="javascript:help_window('<?php
-	echo util_make_url('/help/tracker.php?helpname=attach_file');
-	?>');"><strong>(?)</strong></a><br />
-	<input type="file" name="input_file0" size="30" /><br />
-	<input type="file" name="input_file1" size="30" /><br />
-	<input type="file" name="input_file2" size="30" /><br />
-	<input type="file" name="input_file3" size="30" /><br />
-	<input type="file" name="input_file4" size="30" /><br />
-<?php
-}
-if ($is_add) {
+	if ($accesslevel < TRK_TECH) {
+		echo _('You do not have sufficient privileges to view Task relations.');
+	} else if (!$group->usesPM()) {
+		echo _('This project does not use Tasks.');
+	} else {
+		echo html_e('span', array('style' => 'float:right;'),
+		    html_e('a', array('href' =>
+			getselfhref(array('func' => 'taskmgr'))
+		    ), html_image('ic/taskman20w.png', '20', '20') .
+		    html_e('strong', array(), _('Build Task Relation')))) . "\n";
+		echo '<h3>' . _('Related Tasks') . ":</h3>\n";
+		$ath->renderRelatedTasks($group, $ah);
+	}
 ?>
-</td></tr>
-<tr><td colspan="2" align="right">
-	<?php echo utils_requiredField() . ' ' .
-	    _('Indicates required fields.'); ?>
-</td></tr>
-<tr><td colspan="2" align="left">
-	<input type="submit" name="submit" value="<?php echo _('Submit'); ?>" />
-</td></tr>
+</td>
+<td <?php echo $HTML->boxGetAltRowStyle(0); ?> width="50%">
+<?php $ah->showRelations(); ?>
+	<table border="0" width="100%">
+		<tr><td colspan="2"><!--
+			dummy in case the hook is empty
+		--></td></tr>
+<?php plugin_hook("artifact_extra_detail", array('artifact_id' => $aid)); ?>
+	</table>
+</td>
+</tr>
 </table>
+
 <?php
-	/* is_add */
+	echo $HTML->boxMiddle(_('History'), 'Item_History', false,
+	    'tracker_history');
+	$ah->showHistory();
 } else {
-?>
-	<h2><?php echo _('Attached Files') ?>:</h2>
-<?php $ath->renderFiles($group_id, $ah); ?>
-</div>
-<div class="tabbertab" title="<?php echo _('Commits'); ?>">
-<table border="0" width="80%"><?php
-	$hookParams['artifact_id'] = $aid;
-	plugin_hook("artifact_extra_detail", $hookParams);
-?><tr><td colspan="2"><!-- dummy in case the hook is empty --></td></tr>
-</table>
-</div>
-<div class="tabbertab" title="<?php echo _('Changes'); ?>">
-	<h2><?php echo _('Changes') ?>:</h2>
-<?php echo $ah->showHistory(); ?>
-</div>
-<?php
-	$ah->showRelations();
-	/* close div#tabber */
-	echo "</div>\n";
-	/* !is_add */
+	echo $HTML->boxMiddle(_('Instructions'));
+	echo html_e('p', array('style' => 'text-align:center;'),
+	    html_e('span', array('class' => array('veryimportant')),
+	    _('DO NOT enter passwords or confidential information in your message!')));
 }
+echo $HTML->boxBottom();
 ?>
 </form>
 <?php

Modified: trunk/gforge_base/evolvisforge-5.1/src/www/tracker/tracker.php
===================================================================
--- trunk/gforge_base/evolvisforge-5.1/src/www/tracker/tracker.php	2011-12-05 14:38:50 UTC (rev 17775)
+++ trunk/gforge_base/evolvisforge-5.1/src/www/tracker/tracker.php	2011-12-06 12:35:43 UTC (rev 17776)
@@ -112,6 +112,7 @@
 				//
 				$ext_feedback = '';
 				for ($i=0; $i<5; $i++) {
+					/* 5 input_file fields for $is_add */
 					$f = getUploadedFile("input_file$i");
 					$error = $f['error'];
 					if (isset($error) && $error > 0) {
@@ -354,7 +355,8 @@
 				//	  Attach files to this Artifact.
 				//
 				$ext_feedback = '';
-				for ($i=0; $i<5; $i++) {
+				for ($i=0; $i<1; $i++) {
+					/* 1 input_file field for !$is_add */
 					$f = getUploadedFile("input_file$i");
 					$error = $f['error'];
 					if (isset($error) && $error > 0) {



More information about the evolvis-commits mailing list