[Fusionforge-commits] r11604 - in trunk/src/plugins/mantisbt: view view/admin www www/admin www/group

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Tue Nov 23 13:46:41 CET 2010


Author: nerville
Date: 2010-11-23 13:46:41 +0100 (Tue, 23 Nov 2010)
New Revision: 11604

Modified:
   trunk/src/plugins/mantisbt/view/admin/StatPerStatus.php
   trunk/src/plugins/mantisbt/view/admin/addVersion.php
   trunk/src/plugins/mantisbt/view/admin/stat.php
   trunk/src/plugins/mantisbt/view/admin/viewCategorie.php
   trunk/src/plugins/mantisbt/view/roadmap.php
   trunk/src/plugins/mantisbt/view/viewIssues.php
   trunk/src/plugins/mantisbt/www/admin/index.php
   trunk/src/plugins/mantisbt/www/group/index.php
   trunk/src/plugins/mantisbt/www/index.php
Log:
many fix :
- better display error
- indent
- missing div

Modified: trunk/src/plugins/mantisbt/view/admin/StatPerStatus.php
===================================================================
--- trunk/src/plugins/mantisbt/view/admin/StatPerStatus.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/view/admin/StatPerStatus.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -1,8 +1,7 @@
 <?php
-
 /*
- * Copyright 2010, Capgemini
- * Authors: Franck Villaume - capgemini
+ * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -25,63 +24,63 @@
 global $HTML;
 
 try {
-    /* do not recreate $clientSOAP object if already created by other pages */
-    if (!isset($clientSOAP))
-        $clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+	/* do not recreate $clientSOAP object if already created by other pages */
+	if (!isset($clientSOAP))
+		$clientSOAP = new SoapClient(forge_get_config('server_url','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
 
-    $stats = $clientSOAP->__soapCall('mc_project_get_statistiques', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis, "level" => 0));
+	$stats = $clientSOAP->__soapCall('mc_project_get_statistiques', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis, "level" => 0));
 } catch (SoapFault $soapFault) {
-    echo    '<div class="warning" >Un problème est survenu lors de la récupération des données : '.$soapFault->faultstring.'</div>';
-    $errorPage = true;
+	echo '<div class="warning" >'. _('Technical error occurs during data retrieving'). ' ' .$soapFault->faultstring.'</div>';
+	$errorPage = true;
 }
 
 if (!isset($errorPage)){
-$total = array('open' => 0, 'resolved' => 0, 'resolved' => 0, 'closed' => 0 , 'total' => 0);
-echo $HTML->boxTop("Répartition par état");
-echo    '<tr>';
-echo                    '<th class="InTextBrown">Projet</th>';
-echo                    '<th class="InTextBrown">Ouvert</th>';
-echo                    '<th class="InTextBrown">Résolu</th>';
-echo                    '<th class="InTextBrown">Fermé</th>';
-echo                    '<th class="InTextBrown">Total</th>';
-echo    '</tr>';
-$nbligne = 0;
-foreach ($stats as $stat){
-    $indentation = "";
-    for($i = 1; $i < $stat->project_level; $i++){
-        $indentation =  $indentation .'&nbsp;&nbsp;';
-    }
-    if ( $nbligne % 2 == 0 ) {
-        echo    '<tr class="LignePaire">';
-    } else {
-        echo '<tr class="LigneImpaire">';
-    }
+	$total = array('open' => 0, 'resolved' => 0, 'resolved' => 0, 'closed' => 0 , 'total' => 0);
+	echo $HTML->boxTop("Répartition par état");
+	echo	'<tr>';
+	echo                    '<th class="InTextBrown">Projet</th>';
+	echo                    '<th class="InTextBrown">Ouvert</th>';
+	echo                    '<th class="InTextBrown">Résolu</th>';
+	echo                    '<th class="InTextBrown">Fermé</th>';
+	echo                    '<th class="InTextBrown">Total</th>';
+	echo    '</tr>';
+	$nbligne = 0;
+	foreach ($stats as $stat) {
+		$indentation = "";
+		for($i = 1; $i < $stat->project_level; $i++){
+			$indentation =  $indentation .'&nbsp;&nbsp;';
+		}
+		if ( $nbligne % 2 == 0 ) {
+			echo	'<tr class="LignePaire">';
+		} else {
+			echo	'<tr class="LigneImpaire">';
+		}
 
-    if ($stat->project_level > 1){
-        echo sprintf('<td class="InTextBrown">%s >> <a class="DataLink" href="?type=group&id=%s&pluginname=mantisbt">%s</a></td>',$indentation,group_get_objectid_by_publicname($stat->project_name), $stat->project_name);
-    }else{
-        echo sprintf('<td class="InTextBrown"><a class="DataLink" href="?type=group&id=%s&pluginname=mantisbt">%s</a></td>',group_get_objectid_by_publicname($stat->project_name), $stat->project_name);
-    }
-    echo                    '<td class="InTextBrown">'.$stat->open.'</td>';
-    echo                    '<td class="InTextBrown">'.$stat->resolved.'</td>';
-    echo                    '<td class="InTextBrown">'.$stat->closed.'</td>';
-    echo                    '<td class="InTextBrown">'.$stat->total.'</td>';
-    echo    '</tr>';
+		if ($stat->project_level > 1){
+			echo sprintf('<td class="InTextBrown">%s >> <a class="DataLink" href="?type=group&id=%s&pluginname=mantisbt">%s</a></td>',$indentation,group_get_objectid_by_publicname($stat->project_name), $stat->project_name);
+		}else{
+			echo sprintf('<td class="InTextBrown"><a class="DataLink" href="?type=group&id=%s&pluginname=mantisbt">%s</a></td>',group_get_objectid_by_publicname($stat->project_name), $stat->project_name);
+		}
+		echo		'<td class="InTextBrown">'.$stat->open.'</td>';
+		echo		'<td class="InTextBrown">'.$stat->resolved.'</td>';
+		echo		'<td class="InTextBrown">'.$stat->closed.'</td>';
+		echo		'<td class="InTextBrown">'.$stat->total.'</td>';
+		echo	'</tr>';
 
-    // calcul du total
-    $total['open'] += $stat->open;
-    $total['resolved'] += $stat->resolved;
-    $total['closed'] += $stat->closed;
-    $total['total'] += $stat->total;
-    $nbligne++;
-}
-echo    '<tr>';
-echo            '<th class="InTextBrown"></th>';
-echo            '<th class="InTextBrown">'.$total['open'].'</th>';
-echo            '<th class="InTextBrown">'.$total['resolved'].'</th>';
-echo            '<th class="InTextBrown">'.$total['closed'].'</th>';
-echo            '<th class="InTextBrown">'.$total['total'].'</th>';
-echo    '</tr>';
+		// calcul du total
+		$total['open'] += $stat->open;
+		$total['resolved'] += $stat->resolved;
+		$total['closed'] += $stat->closed;
+		$total['total'] += $stat->total;
+		$nbligne++;
+	}
+	echo	'<tr>';
+	echo		'<td class="InTextBrown"></td>';
+	echo		'<td class="InTextBrown">'.$total['open'].'</td>';
+	echo		'<td class="InTextBrown">'.$total['resolved'].'</td>';
+	echo		'<td class="InTextBrown">'.$total['closed'].'</td>';
+	echo		'<td class="InTextBrown">'.$total['total'].'</td>';
+	echo	'</tr>';
 echo $HTML->boxBottom();
 
 }

Modified: trunk/src/plugins/mantisbt/view/admin/addVersion.php
===================================================================
--- trunk/src/plugins/mantisbt/view/admin/addVersion.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/view/admin/addVersion.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -1,8 +1,7 @@
 <?php
-
 /*
- * Copyright 2010, Capgemini
- * Author: Franck Villaume - Capgemini
+ * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -31,10 +30,10 @@
 echo '</td>';
 echo '<td>';
 print'<div style="float:left"><img src="'.util_make_url('themes/gforge/images/bouton_gauche.png').'"></img></div>
-      <div style="background: url('.util_make_url('themes/gforge/images/bouton_centre.png').');vertical-align:top;display:inline;font-size:15px">
-      <a href="javascript:document.addVersion.submit();" style="color:white;font-size:0.8em;font-weight:bold;">Ajouter</a>
-      </div>
-      <div style="display:inline"><img src="'.util_make_url('themes/gforge/images/bouton_droit.png').'"></img></div>';
+	<div style="background: url('.util_make_url('themes/gforge/images/bouton_centre.png').');vertical-align:top;display:inline;font-size:15px">
+	<a href="javascript:document.addVersion.submit();" style="color:white;font-size:0.8em;font-weight:bold;">Ajouter</a>
+	</div>
+	<div style="display:inline"><img src="'.util_make_url('themes/gforge/images/bouton_droit.png').'"></img></div>';
 echo '</td>';
 echo $HTML->boxBottom();
 echo '</form>';

Modified: trunk/src/plugins/mantisbt/view/admin/stat.php
===================================================================
--- trunk/src/plugins/mantisbt/view/admin/stat.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/view/admin/stat.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -1,8 +1,7 @@
 <?php
-
 /*
- * Copyright 2010, Capgemini
- * Authors: Franck Villaume - capgemini
+ * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -28,5 +27,5 @@
 //echo "<div>";
 //include ("mantisbt/view/admin/StatPerMember.php");
 //echo "</div>";
-
+echo "<div style='clear:both'>";
 ?>

Modified: trunk/src/plugins/mantisbt/view/admin/viewCategorie.php
===================================================================
--- trunk/src/plugins/mantisbt/view/admin/viewCategorie.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/view/admin/viewCategorie.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -1,8 +1,7 @@
 <?php
-
 /*
- * Copyright 2010, Capgemini
- * Authors: Franck Villaume - capgemini
+ * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -26,59 +25,59 @@
 global $HTML;
 
 try {
-    /* do not recreate $clientSOAP object if already created by other pages */
-    if (!isset($clientSOAP))
-        $clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+	/* do not recreate $clientSOAP object if already created by other pages */
+	if (!isset($clientSOAP))
+		$clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
 
-    $listCategories = $clientSOAP->__soapCall('mc_project_get_categories', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis));
+	$listCategories = $clientSOAP->__soapCall('mc_project_get_categories', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis));
 } catch (SoapFault $soapFault) {
-    echo    '<div class="warning" >Un problème est survenu lors de la récupération des données : '.$soapFault->faultstring.'</div>';
-    $errorPage = true;
+	echo '<div class="warning" >'. _('Technical error occurs during data retrieving'). ' ' .$soapFault->faultstring.'</div>';
+	$errorPage = true;
 }
 
 if (!isset($errorPage)){
-    echo $HTML->boxTop('Gestion des categories');
-    echo    '<table class="innertabs">';
-    echo            '<tr>';
-    echo                    '<td class="FullBoxTitle">Catégorie</td>';
-    echo 			'<td colspan="3" class="FullBoxTitle">Actions</td>';
-    echo		'</tr>';
-    $i = 0;
-    foreach ($listCategories as $key => $category){
-	    if ( $i % 2 == 0 ) {
-		    echo '<tr class="LignePaire">';
-	    } else {
-		    echo '<tr class="LigneImpaire">';
-	    }
-	    if ( $category != 'General' ) {
-	    echo '<td class="InText">'.$category.'</td>';
-	    echo '<td>';
- 
-	    echo '<form method="POST" name="rename'.$i.'" action="index.php?type=admin&id='.$id.'&pluginname=mantisbt&action=renameCategory">';
-	    echo '<input type="hidden" name="renameCategory" value="'.htmlspecialchars($category).'" />';
-	    echo '<input name="newCategoryName" type="text"></input>';
-	    echo '</td><td>';
-        print'<div style="float:left"><img src="'.util_make_url('themes/gforge/images/bouton_gauche.png').'"></img></div>
-                <div style="background: url('.util_make_url('themes/gforge/images/bouton_centre.png').');vertical-align:top;display:inline;font-size:15px">
-                <a href="javascript:document.rename'.$i.'.submit();" style="color:white;font-size:0.8em;font-weight:bold;">Renommer</a>
-                </div>
-                <div style="display:inline"><img src="'.util_make_url('themes/gforge/images/bouton_droit.png').'"></img></div>';
-	    echo '</td>';
-	    echo '</form>';
-	    echo '<td class="InText">';
-	    echo '<form method="POST" name="delete'.$i.'" action="index.php?type=admin&id='.$id.'&pluginname=mantisbt&action=deleteCategory">';
-	    echo '<input type="hidden" name="deleteCategory" value="'.htmlspecialchars($category).'" />';
-        print'<div style="float:left"><img src="'.util_make_url('themes/gforge/images/bouton_gauche.png').'"></img></div>
-              <div style="background: url('.util_make_url('themes/gforge/images/bouton_centre.png').');vertical-align:top;display:inline;font-size:15px">
-              <a href="javascript:document.delete'.$i.'.submit();" style="color:white;font-size:0.8em;font-weight:bold;">Supprimer</a>
-              </div>
-              <div style="display:inline"><img src="'.util_make_url('themes/gforge/images/bouton_droit.png').'"></img></div>';
-	    echo '</form>';
-	    echo '</td></tr>';
-	    $i++;
-	    }
-    }
-    echo '</table>';
-    echo $HTML->boxBottom();
+	echo $HTML->boxTop('Gestion des categories');
+	echo	'<table class="innertabs">';
+	echo		'<tr>';
+	echo			'<td class="FullBoxTitle">Catégorie</td>';
+	echo			'<td colspan="3" class="FullBoxTitle">Actions</td>';
+	echo		'</tr>';
+	$i = 0;
+	foreach ($listCategories as $key => $category){ 
+		if ( $i % 2 == 0 ) {
+			echo '<tr class="LignePaire">';
+		} else {
+			echo '<tr class="LigneImpaire">';
+		}
+		if ( $category != 'General' ) {
+			echo '<td class="InText">'.$category.'</td>';
+			echo '<td>';
+
+			echo '<form method="POST" name="rename'.$i.'" action="index.php?type=admin&id='.$id.'&pluginname=mantisbt&action=renameCategory">';
+			echo '<input type="hidden" name="renameCategory" value="'.htmlspecialchars($category).'" />';
+			echo '<input name="newCategoryName" type="text"></input>';
+			echo '</td><td>';
+			print'<div style="float:left"><img src="'.util_make_url('themes/gforge/images/bouton_gauche.png').'"></img></div>
+				<div style="background: url('.util_make_url('themes/gforge/images/bouton_centre.png').');vertical-align:top;display:inline;font-size:15px">
+				<a href="javascript:document.rename'.$i.'.submit();" style="color:white;font-size:0.8em;font-weight:bold;">Renommer</a>
+				</div>
+				<div style="display:inline"><img src="'.util_make_url('themes/gforge/images/bouton_droit.png').'"></img></div>';
+			echo '</td>';
+			echo '</form>';
+			echo '<td class="InText">';
+			echo '<form method="POST" name="delete'.$i.'" action="index.php?type=admin&id='.$id.'&pluginname=mantisbt&action=deleteCategory">';
+			echo '<input type="hidden" name="deleteCategory" value="'.htmlspecialchars($category).'" />';
+			print'<div style="float:left"><img src="'.util_make_url('themes/gforge/images/bouton_gauche.png').'"></img></div>
+				<div style="background: url('.util_make_url('themes/gforge/images/bouton_centre.png').');vertical-align:top;display:inline;font-size:15px">
+				<a href="javascript:document.delete'.$i.'.submit();" style="color:white;font-size:0.8em;font-weight:bold;">Supprimer</a>
+				</div>
+				<div style="display:inline"><img src="'.util_make_url('themes/gforge/images/bouton_droit.png').'"></img></div>';
+			echo '</form>';
+			echo '</td></tr>';
+			$i++;
+		}
+	}
+	echo '</table>';
+	echo $HTML->boxBottom();
 }
 ?>

Modified: trunk/src/plugins/mantisbt/view/roadmap.php
===================================================================
--- trunk/src/plugins/mantisbt/view/roadmap.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/view/roadmap.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -1,9 +1,8 @@
 <?php
-
 /*
- * Copyright 2010, Capgemini
- * Authors: Franck Villaume - capgemini
- *          Antoine Mercadal - capgemini
+ * Copyright 2010, Franck Villaume - Capgemini
+ * Copyright 2010, Antoine Mercadal - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -23,61 +22,60 @@
  */
 
 try {
-    /* do not recreate $clientSOAP object if already created by other pages */
-    if (!isset($clientSOAP))
-        $clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+	/* do not recreate $clientSOAP object if already created by other pages */
+	if (!isset($clientSOAP))
+		$clientSOAP = new SoapClient(forge_get_config('server_url','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
 
-    $listChild = $clientSOAP->__soapCall('mc_project_get_subprojects', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis));
+	$listChild = $clientSOAP->__soapCall('mc_project_get_subprojects', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis));
 
 } catch (SoapFault $soapFault) {
-    echo    '<div class="warning" >Un problème est survenu lors de la r&eacute;cup&eacute;ration des donn&eacute;es : '.$soapFault->faultstring.'</div>';
-    $errorPage = true;
+	echo '<div class="warning" >'. _('Technical error occurs during data retrieving'). ' ' .$soapFault->faultstring.'</div>';
+	$errorPage = true;
 }
 
 if (!isset($errorPage)) {
-    GLOBAL $HTML;
-
+	GLOBAL $HTML;
 ?>
 <script type="text/javascript">
-    $(document).ready(function() {
+	$(document).ready(function() {
 <?php
-    $view = 0;
-    foreach ($listChild as $key => $child) {
-        if ( isset($_POST['project'.$child.'VersionId'])) {
-            $view = 1;
+	$view = 0;
+	foreach ($listChild as $key => $child) {
+		if ( isset($_POST['project'.$child.'VersionId'])) {
+			$view = 1;
+		}
 	}
-    }
-    if ( isset($_POST['projectVersionId']) ) {
-        $view = 1;
-    }
-    if ( $view == 0 ) {
+	if ( isset($_POST['projectVersionId']) ) {
+		$view = 1;
+	}
+	if ( $view == 0 ) {
 ?>
-        $("#expandable_filter").hide();
+	$("#expandable_filter").hide();
 <?php
-    }
+	}
 ?>
-    });
+	});
 </script>
 
 <style>
 .notice_title {
-    background-color: #D7E0EB;
-    padding: 10px;
-    font-weight: bold;
-    margin-bottom:0px;
-    cursor: pointer;
-    color: #4F93C3;
+	background-color: #D7E0EB;
+	padding: 10px;
+	font-weight: bold;
+	margin-bottom:0px;
+	cursor: pointer;
+	color: #4F93C3;
 }
 
 .notice_content {
-    border: 1px solid #D7E0EB;
-    padding: 10px;
-    font-weight: bold;
-    -moz-border-radius-bottomright: 8px;
-    -moz-border-radius-bottomleft: 8px;
-    -webkit-border-bottom-right-radius: 8px;
-    -webkit-border-bottom-left-radius: 8px;
-    margin-top:0px;
+	border: 1px solid #D7E0EB;
+	padding: 10px;
+	font-weight: bold;
+	-moz-border-radius-bottomright: 8px;
+	-moz-border-radius-bottomleft: 8px;
+	-webkit-border-bottom-right-radius: 8px;
+	-webkit-border-bottom-left-radius: 8px;
+	margin-top:0px;
 }
 </style>
 
@@ -86,110 +84,110 @@
 
 <div id='expandable_filter' class="notice_content" style='clear: both'>
 <?php
-    include('mantisbt/controler/filter_roadmap.php');
+	include('mantisbt/controler/filter_roadmap.php');
 ?>
 </div>
 
 <?php
-    echo '<h2 style="border-bottom: 1px solid black">Feuille de route</h2>';
-    if (!isset($_POST['projectVersionId'])) {
-	    if (isset($listVersions) && !empty($listVersions)) {
-            $listPrintVersions = $listVersions;
-        }
-    } else {
-        $flipped_projectVersionId = array_flip($_POST['projectVersionId']);
-        foreach ($listVersions as $key => $version) {
-            if (isset($flipped_projectVersionId[$version->id])) {
-                $listPrintVersions[] = $version;
-            }
-        }
-    }
-    if (isset($listPrintVersions) && !empty($listPrintVersions)) {
-    	foreach ($listPrintVersions as $key => $version) {
-	    $idsBug = $clientSOAP->__soapCall('mc_issue_get_list_by_project_for_specific_version', array("username" => $username, "password" => $password, "project" => $idProjetMantis, "version" => $version->name ));
-	    echo	'<fieldset>';
-	    $typeVersion = "Milestone";
-	    if ( $version->released ) {
-	        $typeVersion = "Release";
-	    }
-	    echo	'Version : '.$version->name.' (<i>'.strftime("%d/%m/%Y",strtotime($version->date_order)).'</i> '.$typeVersion.') - <i>'.count($idsBug).' ticket(s)</i>';
-	    echo	'<ul>';
-	    foreach ( $idsBug as $key => $idBug ) {
-	        $defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
-	        if ( !array_key_exists('handler', $defect) || !array_key_exists('name', $defect->handler) ) {
-	            $defect_handler_name = "non-affecte";
-	        } else {
-	            $defect_handler_name = $defect->handler->name;
-	        }
-	        echo	'<li>';
-	        if ( $defect->status->id >= 80 ) {
-	            echo '<strike>';
-	        }
-	        echo	'<a href="?type=group&id='.$id.'&pluginname=mantisbt&idBug='.$defect->id.'&view=viewIssue">'.$defect->id.'</a>: '.$defect->summary.' ('.$defect->resolution->name.') - ('.$defect_handler_name.')';
-	        if ( $defect->status->id >= 80 ) {
-	            echo '</strike>';
-	        }
-	        echo	'</li>';
-	    }
-		echo	'</ul>';
-		echo	'</fieldset>';
-         }
+	echo '<h2 style="border-bottom: 1px solid black">Feuille de route</h2>';
+	if (!isset($_POST['projectVersionId'])) {
+		if (isset($listVersions) && !empty($listVersions)) {
+			$listPrintVersions = $listVersions;
+		}
+	} else {
+		$flipped_projectVersionId = array_flip($_POST['projectVersionId']);
+		foreach ($listVersions as $key => $version) {
+			if (isset($flipped_projectVersionId[$version->id])) {
+				$listPrintVersions[] = $version;
+			}
+		}
+	}
+	if (isset($listPrintVersions) && !empty($listPrintVersions)) {
+		foreach ($listPrintVersions as $key => $version) {
+			$idsBug = $clientSOAP->__soapCall('mc_issue_get_list_by_project_for_specific_version', array("username" => $username, "password" => $password, "project" => $idProjetMantis, "version" => $version->name ));
+			echo	'<fieldset>';
+			$typeVersion = "Milestone";
+			if ( $version->released ) {
+				$typeVersion = "Release";
+			}
+			echo	'Version : '.$version->name.' (<i>'.strftime("%d/%m/%Y",strtotime($version->date_order)).'</i> '.$typeVersion.') - <i>'.count($idsBug).' ticket(s)</i>';
+			echo	'<ul>';
+			foreach ( $idsBug as $key => $idBug ) {
+				$defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
+				if ( !array_key_exists('handler', $defect) || !array_key_exists('name', $defect->handler) ) {
+					$defect_handler_name = "non-affecte";
+				} else {
+					$defect_handler_name = $defect->handler->name;
+				}
+				echo	'<li>';
+				if ( $defect->status->id >= 80 ) {
+					echo '<strike>';
+				}
+				echo	'<a href="?type=group&id='.$id.'&pluginname=mantisbt&idBug='.$defect->id.'&view=viewIssue">'.$defect->id.'</a>: '.$defect->summary.' ('.$defect->resolution->name.') - ('.$defect_handler_name.')';
+				if ( $defect->status->id >= 80 ) {
+					echo '</strike>';
+				}
+				echo	'</li>';
+			}
+			echo	'</ul>';
+			echo	'</fieldset>';
+		}
 
-    if (sizeof($listChild)) {
-        foreach ($listChild as $key => $child) {
-            if (isset($_POST['project'.$child.'VersionId'])) {
-                $resultGroupNameFusionForge = db_query_params ('select groups.group_name, groups.group_id from groups,group_mantisbt
-                                                            where groups.group_id = group_mantisbt.id_group and group_mantisbt.id_mantisbt = $1',
-                                                            array($child));
-                $rowGroupNameFusionForge =& db_fetch_array($resultGroupNameFusionForge);
-		        echo $HTML->boxTop('<a style="color:white;" href="?type=group&id='.$rowGroupNameFusionForge['group_id'].'&pluginname=mantisbt">'.$rowGroupNameFusionForge['group_name'].'</a>');
-		        echo '<fieldset>';
-		        $listChildVersions = $clientSOAP->__soapCall('mc_project_get_versions', array("username" => $username, "password" => $password, "project_id" => $child));
-		        if (!empty($listChildVersions)){
-                    $flipped_projectChildVersionId = array_flip($_POST['project'.$child.'VersionId']);
-			        $listChildPrintVersions = array();
-                    foreach ($listChildVersions as $key => $childVersion) {
-                        if (isset($flipped_projectChildVersionId[$childVersion->id])) {
-                            $listChildPrintVersions[] = $childVersion;
-                        }
-                    }
-			        if (isset($listChildPrintVersions) && !empty($listChildPrintVersions)) {
-        		        foreach ($listChildPrintVersions as $key => $childprintversion){
-               		        echo    '<fieldset>';
-               		        $idsBug = $clientSOAP->__soapCall('mc_issue_get_list_by_project_for_specific_version', array("username" => $username, "password" => $password, "project" => $child, "version" => $childprintversion->name ));
-               		        $typeVersion = "Milestone";
-               		        if ( $childprintversion->released == 1 ) {
-               			        $typeVersion = "Release";
-               		        }
-               		        echo    'Version : '.$childprintversion->name.' (<i>'.strftime("%d/%m/%Y",strtotime($childprintversion->date_order)).'</i> '.$typeVersion.') - <i>'.count($idsBug).'</i>';
-               		        echo    '<ul>';
-               		        foreach ( $idsBug as $key => $idBug ) {
-               			        $defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
-               			        if ( !array_key_exists('handler', $defect) || !array_key_exists('name', $defect->handler) ) {
-               				        $defect_handler_name = "non-affecte";
-               			        } else {
-               				        $defect_handler_name = $defect->handler->name;
-               			        }
-               			        echo    '<li>';
-               			        if ( $defect->status->id >= 80 ) {
-               				        echo '<strike>';
-               			        }
-               			        echo    '<a href="?type=group&id='.$rowGroupNameFusionForge['group_id'].'&pluginname=mantisbt&idBug='.$defect->id.'&view=viewIssue">'.$defect->id.'</a>: '.$defect->summary.' ('.$defect->resolution->name.') - ('.$defect_handler_name.')';
-               			        if ( $defect->status->id >= 80 ) {
-               				        echo '</strike>';
-               			        }
-               			        echo    '</li>';
-               		        }
-               		        echo    '</ul>';
-               		        echo    '</fieldset>';
-        		        }
-			        }
-		        }
-		        echo '</fieldset>';
-		        echo $HTML->boxBottom();
-	        }
-            }
-        }
-    }
+		if (sizeof($listChild)) {
+			foreach ($listChild as $key => $child) {
+				if (isset($_POST['project'.$child.'VersionId'])) {
+					$resultGroupNameFusionForge = db_query_params('select groups.group_name, groups.group_id from groups,group_mantisbt
+											where groups.group_id = group_mantisbt.id_group and group_mantisbt.id_mantisbt = $1',
+											array($child));
+					$rowGroupNameFusionForge = db_fetch_array($resultGroupNameFusionForge);
+					echo $HTML->boxTop('<a style="color:white;" href="?type=group&id='.$rowGroupNameFusionForge['group_id'].'&pluginname=mantisbt">'.$rowGroupNameFusionForge['group_name'].'</a>');
+					echo '<fieldset>';
+					$listChildVersions = $clientSOAP->__soapCall('mc_project_get_versions', array("username" => $username, "password" => $password, "project_id" => $child));
+					if (!empty($listChildVersions)){
+						$flipped_projectChildVersionId = array_flip($_POST['project'.$child.'VersionId']);
+						$listChildPrintVersions = array();
+						foreach ($listChildVersions as $key => $childVersion) {
+							if (isset($flipped_projectChildVersionId[$childVersion->id])) {
+								$listChildPrintVersions[] = $childVersion;
+							}
+						}
+						if (isset($listChildPrintVersions) && !empty($listChildPrintVersions)) {
+							foreach ($listChildPrintVersions as $key => $childprintversion){
+								echo	'<fieldset>';
+								$idsBug = $clientSOAP->__soapCall('mc_issue_get_list_by_project_for_specific_version', array("username" => $username, "password" => $password, "project" => $child, "version" => $childprintversion->name ));
+								$typeVersion = "Milestone";
+								if ( $childprintversion->released == 1 ) {
+									$typeVersion = "Release";
+								}
+								echo	'Version : '.$childprintversion->name.' (<i>'.strftime("%d/%m/%Y",strtotime($childprintversion->date_order)).'</i> '.$typeVersion.') - <i>'.count($idsBug).'</i>';
+								echo	'<ul>';
+								foreach ( $idsBug as $key => $idBug ) {
+									$defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
+									if ( !array_key_exists('handler', $defect) || !array_key_exists('name', $defect->handler) ) {
+										$defect_handler_name = "non-affecte";
+									} else {
+										$defect_handler_name = $defect->handler->name;
+									}
+									echo    '<li>';
+									if ( $defect->status->id >= 80 ) {
+										echo '<strike>';
+									}
+									echo    '<a href="?type=group&id='.$rowGroupNameFusionForge['group_id'].'&pluginname=mantisbt&idBug='.$defect->id.'&view=viewIssue">'.$defect->id.'</a>: '.$defect->summary.' ('.$defect->resolution->name.') - ('.$defect_handler_name.')';
+									if ( $defect->status->id >= 80 ) {
+										echo '</strike>';
+									}
+									echo    '</li>';
+								}
+								echo    '</ul>';
+								echo    '</fieldset>';
+							}
+						}
+					}
+					echo '</fieldset>';
+					echo $HTML->boxBottom();
+				}
+			}
+		}
+	}
 }
 ?>

Modified: trunk/src/plugins/mantisbt/view/viewIssues.php
===================================================================
--- trunk/src/plugins/mantisbt/view/viewIssues.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/view/viewIssues.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -1,9 +1,9 @@
 <?php
-
 /*
- * Copyright 2010, Capgemini
- * Authors: Franck Villaume - capgemini
- *          Antoine Mercadal - capgemini
+ * Copyright 2009, Fabien Dubois - Capgemini
+ * Copyright 2009-2010, Franck Villaume - Capgemini
+ * Copyright 2010, Antoine Mercadal - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -28,513 +28,517 @@
  *  - for a specific user
  */
 
-global $prioritiesImg,$bugPerPage;
+/*
+ * @todo : remove all css and js
+ */
 
+
+global $prioritiesImg, $bugPerPage;
+
 try {
-    /* do not recreate $clientSOAP object if already created by other pages */
-    if (!isset($clientSOAP))
-        $clientSOAP = new SoapClient("http://".forge_get_config('server','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+/* do not recreate $clientSOAP object if already created by other pages */
+	if (!isset($clientSOAP))
+		$clientSOAP = new SoapClient(forge_get_config('server_url','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
 
 } catch (SoapFault $soapFault) {
-    echo    '<div class="warning" >Un problème est survenu lors de la r&eacute;cup&eacute;ration des donn&eacute;es : '.$soapFault->faultstring.'</div>';
+	echo '<div class="warning" >'. _('Technical error occurs during data retrieving'). ' ' .$soapFault->faultstring.'</div>';
 	$errorPage = true;
 }
 
 if (!isset($errorPage)) {
-    echo "<h2 style='border-bottom: 1px solid black'>Filtres</h2>";
+	echo '<h2 style="border-bottom: 1px solid black">'._('Filters'). '</h2>';
 ?>
 <style>
 .notice_title {
-    background-color: #D7E0EB; 
-    padding: 10px; 
-    font-weight: bold; 
-    margin-bottom:0px;
-    cursor: pointer;
-    color: #4F93C3;
+	background-color: #D7E0EB;
+	padding: 10px;
+	font-weight: bold;
+	margin-bottom:0px;
+	cursor: pointer;
+	color: #4F93C3;
 }
 
 .notice_content {
-    border: 1px solid #D7E0EB;
-    padding: 10px; 
-    font-weight: bold; 
-    -moz-border-radius-bottomright: 8px; 
-    -moz-border-radius-bottomleft: 8px; 
-    -webkit-border-bottom-right-radius: 8px;
-    -webkit-border-bottom-left-radius: 8px;
-    margin-top:0px;
+	border: 1px solid #D7E0EB;
+	padding: 10px;
+	font-weight: bold;
+	-moz-border-radius-bottomright: 8px;
+	-moz-border-radius-bottomleft: 8px;
+	-webkit-border-bottom-right-radius: 8px;
+	-webkit-border-bottom-left-radius: 8px;
+	margin-top:0px;
 }
 </style>
 
 <script type="text/javascript">
-    $(document).ready(function() {
-        <?php
-            if ( !isset($_POST["projectStatus"]) && !isset($_POST["projectChildId"]) && !isset($_POST["projectFixers"]) && !isset($_POST["projectReporters"]))
-            {
-            ?>   
-                $("#expandable_filter").hide();
-            <?php 
-            }
-            ?>
-        $("#expandable_ticket").hide();
-    });
+	$(document).ready(function() {
+	<?php
+		if ( !isset($_POST["projectStatus"]) && !isset($_POST["projectChildId"]) && !isset($_POST["projectFixers"]) && !isset($_POST["projectReporters"]))
+		{
+	?>
+		jQuery("#expandable_filter").hide();
+	<?php
+		}
+	?>
+		jQuery("#expandable_ticket").hide();
+	});
 </script>
-<p class="notice_title" onclick='$("#expandable_filter").slideToggle(300)'>Afficher les règles de filtrage</p>
+<p class="notice_title" onclick='jQuery("#expandable_filter").slideToggle(300)'>Afficher les règles de filtrage</p>
 <div id='expandable_filter' class="notice_content" style='clear: both'>
-    <?php
-        include('mantisbt/controler/filter.php');
-    ?>
+	<?php
+		include('mantisbt/controler/filter.php');
+	?>
 </div>
 <br/>
-<?php
-}
-// recuperation des bugs
-$listBug = array();
-try {
-    if ($type == "user"){
-        $idsBugAll = $clientSOAP->__soapCall('mc_issue_get_filtered_by_user', array("username" => $username, "password" => $password, "filter" => $bugfilter ));
-    } else if ($type == "group"){
-        $idsBugAll = $clientSOAP->__soapCall('mc_project_get_issue_headers', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis,  "page_number" => -1, "per_page" => -1, "filter" => $bugfilter));
-    }
-} catch (SoapFault $soapFault) {
-	echo 	'<div class="warning">Un problème est survenu lors de la r&eacute;cup&eacute;ration des donn&eacute;es : '.$soapFault->faultstring.'</div>';
-    $errorPage = true;
-}
+	<?php
+	// recuperation des bugs
+	$listBug = array();
+	try {
+		if ($type == "user"){
+			$idsBugAll = $clientSOAP->__soapCall('mc_issue_get_filtered_by_user', array("username" => $username, "password" => $password, "filter" => $bugfilter ));
+		} else if ($type == "group"){
+			$idsBugAll = $clientSOAP->__soapCall('mc_project_get_issue_headers', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis,  "page_number" => -1, "per_page" => -1, "filter" => $bugfilter));
+		}
+	} catch (SoapFault $soapFault) {
+		echo '<div class="warning" >'. _('Technical error during data retriving :'). ' ' .$soapFault->faultstring.'</div>';
+		$errorPage = true;
+	}
 
-if (!isset($errorPage)) {
-	$pageActuelle = getIntFromRequest('page');
-	if (empty($pageActuelle)) {
-		$pageActuelle = 1;
-	}
-	// calcul pour la pagination
-	$nombreBugs = count ($idsBugAll);
-	$nombreDePages=ceil($nombreBugs/$bugPerPage);
-	// Si la valeur de $pageActuelle (le numéro de la page) est plus grande que $nombreDePages...
-	if($pageActuelle>$nombreDePages) {
-		$pageActuelle=$nombreDePages;
-	}
-	$indexMin = ($pageActuelle - 1) * $bugPerPage;
-	$indexMax = ($pageActuelle * $bugPerPage) -1;
-	// construction du tableau
-	foreach ($idsBugAll as $defect) {
-		$listBugAll[] = array( "id"=> $defect->id, "idPriority"=> $defect->priority->id,
-					"category"=> $defect->category,"project" => $defect->project->name, 
-					"severityId" => $defect->severity->id, "severity" => $defect->severity->name, 
-					"status" => $defect->status->name, "statusId" => $defect->status->id,
-					"last_updated" => $defect->last_updated, "handler" => $defect->handler->name,
-					"summary" => htmlspecialchars($defect->summary,ENT_QUOTES), "view_state" => $defect->view_state->id,
-					"version" => $defect->version, "fixed_in_version" => $defect->fixed_in_version,
-					"target_version" => $defect->target_version
+	if (!isset($errorPage)) {
+		$pageActuelle = getIntFromRequest('page');
+		if (empty($pageActuelle)) {
+			$pageActuelle = 1;
+		}
+		// calcul pour la pagination
+		$nombreBugs = count ($idsBugAll);
+		$nombreDePages=ceil($nombreBugs/$bugPerPage);
+		// Si la valeur de $pageActuelle (le numéro de la page) est plus grande que $nombreDePages...
+		if($pageActuelle>$nombreDePages) {
+			$pageActuelle=$nombreDePages;
+		}
+		$indexMin = ($pageActuelle - 1) * $bugPerPage;
+		$indexMax = ($pageActuelle * $bugPerPage) -1;
+		// construction du tableau
+		foreach ($idsBugAll as $defect) {
+			$listBugAll[] = array( "id"=> $defect->id, "idPriority"=> $defect->priority->id,
+						"category"=> $defect->category,"project" => $defect->project->name, 
+						"severityId" => $defect->severity->id, "severity" => $defect->severity->name, 
+						"status" => $defect->status->name, "statusId" => $defect->status->id,
+						"last_updated" => $defect->last_updated, "handler" => $defect->handler->name,
+						"summary" => htmlspecialchars($defect->summary,ENT_QUOTES), "view_state" => $defect->view_state->id,
+						"version" => $defect->version, "fixed_in_version" => $defect->fixed_in_version,
+						"target_version" => $defect->target_version
 				);
-	}
+		}
 
-	if(count($listBugAll) >0) {
-		foreach ($listBugAll as $key => $defect) {
-			if ( ($indexMin <= $key) && ($indexMax >= $key) ){
-				$listBug[] = $defect;
+		if(count($listBugAll) >0) {
+			foreach ($listBugAll as $key => $defect) {
+				if ( ($indexMin <= $key) && ($indexMax >= $key) ){
+					$listBug[] = $defect;
+				}
 			}
 		}
-	}
 
-    // affichage page
-    $nbligne=0;
-    $boxTitle = 'Tickets';
+		// affichage page
+		$nbligne=0;
+		$boxTitle = 'Tickets';
 
-    echo "<h2 style='border-bottom: 1px solid black'>$boxTitle</h2>";
-	$picto_haut = util_make_url('themes/gforge/images/picto_fleche_haut_marron.png');
-	$picto_bas = util_make_url('themes/gforge/images/picto_fleche_bas_marron.png');
-	$nbligne++;
-	include('jumpToIssue.php');
-    	echo '<table class="innertabs" style="border: 1px solid #3d7c95">';
-	echo    '<tr>';
-	// Priority
-	echo 		'<th class="InText" width="2%">';
-	echo			'<form name="filterprority" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	} else if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		echo "<h2 style='border-bottom: 1px solid black'>$boxTitle</h2>";
+		$picto_haut = util_make_url('themes/gforge/images/picto_fleche_haut_marron.png');
+		$picto_bas = util_make_url('themes/gforge/images/picto_fleche_bas_marron.png');
+		$nbligne++;
+		include('jumpToIssue.php');
+		echo '<table class="innertabs" style="border: 1px solid #3d7c95">';
+		echo	'<tr>';
+		// Priority
+		echo		'<th class="InText" width="2%">';
+		echo			'<form name="filterprority" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		} else if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
 		}
-	}
-	echo				'<input type=hidden name="sort" value="priority" />';
-	echo				'<a class="DataLink" href="javascript:document.filterprority.submit();">P';
-	if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "ASC" ) {
-		echo				'<img src="'.$picto_haut.'">';
-	} else if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// ID
-	echo		'<th class="InText" width="3%">';
-	echo			'<form name="filterid" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	} else if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		echo				'<input type=hidden name="sort" value="priority" />';
+		echo				'<a class="DataLink" href="javascript:document.filterprority.submit();">P';
+		if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "ASC" ) {
+			echo				'<img src="'.$picto_haut.'">';
+		} else if ($bugfilter['sort'] == "priority" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
 		}
-	}
-	echo				'<input type=hidden name="sort" value="id" />';
-	echo				'<a class="DataLink" href="javascript:document.filterid.submit();">ID';
-	if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "ASC" ) {
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// Catégorie
-	echo		'<th class="InText" width="7%">';
-	echo			'<form name="filtercat" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// ID
+		echo		'<th class="InText" width="3%">';
+		echo			'<form name="filterid" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		} else if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
 		}
-	}
-	echo				'<input type=hidden name="sort" value="category_id" />';
-	echo				'<a class="DataLink" href="javascript:document.filtercat.submit();">Cat&eacute;gorie';
-	if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// Projet
-	echo 		'<th class="InText" width="7%">';
-	echo			'<form name="projectid" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		echo				'<input type=hidden name="sort" value="id" />';
+		echo				'<a class="DataLink" href="javascript:document.filterid.submit();">ID';
+		if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "ASC" ) {
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "id" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
 		}
-	}
-	echo				'<input type=hidden name="sort" value="project_id" />';
-	echo				'<a class="DataLink" href="javascript:document.projectid.submit();">Projet';
-	if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// Sévérité
-	echo 		'<th class="InText" width="7%">';
-	echo			'<form name="severity" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// Catégorie
+		echo		'<th class="InText" width="7%">';
+		echo			'<form name="filtercat" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
 		}
-	}
-	echo				'<input type=hidden name="sort" value="severity" />';
-	echo				'<a class="DataLink" href="javascript:document.severity.submit();">S&eacute;v&eacute;rit&eacute;';
-	if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// Etat
-	echo 		'<th class="InText" width="15%">';
-	echo			'<form name="statusid" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		echo				'<input type=hidden name="sort" value="category_id" />';
+		echo				'<a class="DataLink" href="javascript:document.filtercat.submit();">Cat&eacute;gorie';
+		if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "category_id" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
 		}
-	}
-	echo				'<input type=hidden name="sort" value="status" />';
-	echo				'<a class="DataLink" href="javascript:document.statusid.submit();">Etat';
-	if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// Mis a jour (date)
-	echo 		'<th class="InText" width="7%">';
-	echo			'<form name="lastupdate" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// Projet
+		echo 		'<th class="InText" width="7%">';
+		echo			'<form name="projectid" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
 		}
-	}
-	echo				'<input type=hidden name="sort" value="last_updated" />';
-	echo				'<a class="DataLink" href="javascript:document.lastupdate.submit();">Mis à jour';
-	if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// résumé
-	echo 		'<th class="InText" width="29%">';
-	echo			'<form name="summary" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		echo				'<input type=hidden name="sort" value="project_id" />';
+		echo				'<a class="DataLink" href="javascript:document.projectid.submit();">Projet';
+		if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "project_id" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
 		}
-	}
-	echo				'<input type=hidden name="sort" value="summary" />';
-	echo				'<a class="DataLink" href="javascript:document.summary.submit();">R&eacute;sum&eacute;';
-	if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// version de détection
-	echo 		'<th class="InText" width="6%">';
-	echo			'<form name="version" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// Sévérité
+		echo 		'<th class="InText" width="7%">';
+		echo			'<form name="severity" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
 		}
-	}
-	echo				'<input type=hidden name="sort" value="version" />';
-	echo				'<a class="DataLink" href="javascript:document.version.submit();">D&eacute;tect&eacute; en';
-	if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// corrigé en version
-	echo		'<th class="InText" width="6%">';
-	echo			'<form name="fixed" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		echo				'<input type=hidden name="sort" value="severity" />';
+		echo				'<a class="DataLink" href="javascript:document.severity.submit();">S&eacute;v&eacute;rit&eacute;';
+		if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "severity" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
 		}
-	}
-	echo				'<input type=hidden name="sort" value="fixed_in_version" />';
-	echo				'<a class="DataLink" href="javascript:document.fixed.submit();">Corrig&eacute; en';
-	if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	// version cible : Milestone
-	echo		'<th class="InText" width="6%">';
-	echo			'<form name="target" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
-	if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "ASC") {
-		echo			'<input type=hidden name="dir" value="DESC"/>';
-	}else if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "DESC") {
-		echo			'<input type="hidden" name="dir" value="ASC"/>';
-	}
-	if ( isset($bugfilter['show_status'])) {
-		foreach ($bugfilter['show_status'] as $key => $childStatus) {
-			echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// Etat
+		echo 		'<th class="InText" width="15%">';
+		echo			'<form name="statusid" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
 		}
-	}
-	if ( isset($bugfilter['project_id'])) {
-		foreach ($bugfilter['project_id'] as $key => $childId) {
-			echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
 		}
-	}
-	echo				'<input type=hidden name="sort" value="target_version" />';
-	echo				'<a class="DataLink" href="javascript:document.target.submit();">Milestone';
-	if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "ASC" ){
-		echo				'<img src="'.$picto_haut.'">';
-	}else if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "DESC" ) {
-		echo				'<img src="'.$picto_bas.'">';
-	}
-	echo 				'</a>';
-	echo			'</form>';
-	echo 		'</th>';
-	echo	'</tr>';
-	$cpt = 0;
-	$format = "%07d";
-	foreach($listBug as $key => $bug){
-		$nbligne++;
-		if ($nbligne % 2 == 0) {
-			echo	'<tr class="LignePaire">';
-		} else {
-			echo '<tr class="LigneImpaire">';
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
 		}
-		if($prioritiesImg[$bug['idPriority']] != ""){
-			echo		'<td class="InText"><img src="./img/'.$prioritiesImg[$bug['idPriority']].'"></td>';
-		}else{
-			echo		'<td class="InText"></td>';
+		echo				'<input type=hidden name="sort" value="status" />';
+		echo				'<a class="DataLink" href="javascript:document.statusid.submit();">Etat';
+		if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "status" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
 		}
-		echo		'<td class="InText"><a class="DataLink" href="?type='.$type.'&id='.$id.'&pluginname='.$pluginname.'&idBug='.$bug['id'].'&view=viewIssue">'.sprintf($format,$bug['id']).'</a></td>';
-		echo 		'<td class="InText">'.$bug['category'].'</td>';
-		echo 		'<td class="InText">'.$bug['project'].'</td>';
-		echo 		'<td class="InText">';
-		if($bug['severityId'] > 50){
-			echo		'<b>';
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// Mis a jour (date)
+		echo 		'<th class="InText" width="7%">';
+		echo			'<form name="lastupdate" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
 		}
-		echo			$bug['severity'];
-		if($bug['severityId'] > 50){
-			echo		'</b>';
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
 		}
-		echo		'</td>';
-		echo 		'<td class="InText">'.$bug['status'].' ('.$bug['handler'].')</td>';
-		echo 		'<td class="InText">'.strftime("%d/%m/%Y",strtotime($bug['last_updated'])).'</td>';
-		echo 		'<td class="InText">'.$bug['summary'];
-		if ($bug['view_state'] == 50){
-			echo '<img src="./img/protected.gif">';
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
 		}
-		echo 		'</td>';
-		echo 		'<td class="InText">'.$bug['version'].'</td>';
-		echo 		'<td class="InText">'.$bug['fixed_in_version'].'</td>';
-		echo 		'<td class="InText">'.$bug['target_version'].'</td>';
+		echo				'<input type=hidden name="sort" value="last_updated" />';
+		echo				'<a class="DataLink" href="javascript:document.lastupdate.submit();">Mis à jour';
+		if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "last_updated" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
+		}
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// résumé
+		echo 		'<th class="InText" width="29%">';
+		echo			'<form name="summary" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
+		}
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
+		}
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
+		}
+		echo				'<input type=hidden name="sort" value="summary" />';
+		echo				'<a class="DataLink" href="javascript:document.summary.submit();">R&eacute;sum&eacute;';
+		if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "summary" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
+		}
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// version de détection
+		echo 		'<th class="InText" width="6%">';
+		echo			'<form name="version" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
+		}
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
+		}
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
+		}
+		echo				'<input type=hidden name="sort" value="version" />';
+		echo				'<a class="DataLink" href="javascript:document.version.submit();">D&eacute;tect&eacute; en';
+		if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "version" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
+		}
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// corrigé en version
+		echo		'<th class="InText" width="6%">';
+		echo			'<form name="fixed" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
+		}
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
+		}
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
+		}
+		echo				'<input type=hidden name="sort" value="fixed_in_version" />';
+		echo				'<a class="DataLink" href="javascript:document.fixed.submit();">Corrig&eacute; en';
+		if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "fixed_in_version" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
+		}
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
+		// version cible : Milestone
+		echo		'<th class="InText" width="6%">';
+		echo			'<form name="target" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt">';
+		if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "ASC") {
+			echo			'<input type=hidden name="dir" value="DESC"/>';
+		}else if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "DESC") {
+			echo			'<input type="hidden" name="dir" value="ASC"/>';
+		}
+		if ( isset($bugfilter['show_status'])) {
+			foreach ($bugfilter['show_status'] as $key => $childStatus) {
+				echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			}
+		}
+		if ( isset($bugfilter['project_id'])) {
+			foreach ($bugfilter['project_id'] as $key => $childId) {
+				echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+			}
+		}
+		echo				'<input type=hidden name="sort" value="target_version" />';
+		echo				'<a class="DataLink" href="javascript:document.target.submit();">Milestone';
+		if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "ASC" ){
+			echo				'<img src="'.$picto_haut.'">';
+		}else if ($bugfilter['sort'] == "target_version" && $bugfilter['dir'] == "DESC" ) {
+			echo				'<img src="'.$picto_bas.'">';
+		}
+		echo 				'</a>';
+		echo			'</form>';
+		echo 		'</th>';
 		echo	'</tr>';
-		$cpt ++;
-	}
-	echo "</table><br/>";
+		$cpt = 0;
+		$format = "%07d";
+		foreach($listBug as $key => $bug){
+			$nbligne++;
+			if ($nbligne % 2 == 0) {
+				echo	'<tr class="LignePaire">';
+			} else {
+				echo '<tr class="LigneImpaire">';
+			}
+			if($prioritiesImg[$bug['idPriority']] != ""){
+				echo		'<td class="InText"><img src="./img/'.$prioritiesImg[$bug['idPriority']].'"></td>';
+			}else{
+				echo		'<td class="InText"></td>';
+			}
+			echo		'<td class="InText"><a class="DataLink" href="?type='.$type.'&id='.$id.'&pluginname='.$pluginname.'&idBug='.$bug['id'].'&view=viewIssue">'.sprintf($format,$bug['id']).'</a></td>';
+			echo 		'<td class="InText">'.$bug['category'].'</td>';
+			echo 		'<td class="InText">'.$bug['project'].'</td>';
+			echo 		'<td class="InText">';
+			if($bug['severityId'] > 50){
+				echo		'<b>';
+			}
+			echo			$bug['severity'];
+			if($bug['severityId'] > 50){
+				echo		'</b>';
+			}
+			echo		'</td>';
+			echo 		'<td class="InText">'.$bug['status'].' ('.$bug['handler'].')</td>';
+			echo 		'<td class="InText">'.strftime("%d/%m/%Y",strtotime($bug['last_updated'])).'</td>';
+			echo 		'<td class="InText">'.$bug['summary'];
+			if ($bug['view_state'] == 50){
+				echo '<img src="./img/protected.gif">';
+			}
+			echo 		'</td>';
+			echo 		'<td class="InText">'.$bug['version'].'</td>';
+			echo 		'<td class="InText">'.$bug['fixed_in_version'].'</td>';
+			echo 		'<td class="InText">'.$bug['target_version'].'</td>';
+			echo	'</tr>';
+			$cpt ++;
+		}
+		echo "</table><br/>";
 
 
-    // Ajout de ticket
-    if ($type == "group")
-    {
-        ?>
-            <p class="notice_title" onclick='$("#expandable_ticket").slideToggle(300);'>Soumettre un ticket</p>
-            <div id='expandable_ticket' class="notice_content">
-                <?php include("addIssue.php") ?>
-            </div>
-            <br/>
-        <?php
-    }
-    
-	// Creation de la pagination
-    echo    '<div align="center">';
-	for($i=1; $i<=$nombreDePages; $i++)
-	{
-		if($i==$pageActuelle) //Si il s'agit de la page actuelle...
+		// Ajout de ticket
+		if ($type == "group") {
+		?>
+			<p class="notice_title" onclick='$("#expandable_ticket").slideToggle(300);'>Soumettre un ticket</p>
+			<div id='expandable_ticket' class="notice_content">
+			<?php include("addIssue.php") ?>
+			</div>
+			<br/>
+		<?php
+		}
+
+		// Creation de la pagination
+		echo '<div align="center">';
+		for($i=1; $i<=$nombreDePages; $i++)
 		{
-			echo '| <b>'.$i.'</b>';
-		} else {
-			echo '<form style="display:inline" name="page'.$i.'" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt&page='.$i.'" >';
-			echo 	'<input type="hidden" name="sort" value="'.$bugfilter['sort'].'" />';
-			echo 	'<input type="hidden" name="dir" value="'.$bugfilter['dir'].'" />';
-			if ( isset($bugfilter['show_status'])) {
-				foreach ($bugfilter['show_status'] as $key => $childStatus) {
-					echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+			if($i==$pageActuelle) //Si il s'agit de la page actuelle...
+			{
+				echo '| <b>'.$i.'</b>';
+			} else {
+				echo '<form style="display:inline" name="page'.$i.'" method="post" action="?type='.$type.'&id='.$id.'&pluginname=mantisbt&page='.$i.'" >';
+				echo 	'<input type="hidden" name="sort" value="'.$bugfilter['sort'].'" />';
+				echo 	'<input type="hidden" name="dir" value="'.$bugfilter['dir'].'" />';
+				if ( isset($bugfilter['show_status'])) {
+					foreach ($bugfilter['show_status'] as $key => $childStatus) {
+						echo	'<input type="hidden" name="projectStatus[]" value="'.$childStatus.'"/>';
+					}
 				}
-			}
-			if ( isset($bugfilter['project_id'])) {
-				foreach ($bugfilter['project_id'] as $key => $childId) {
-					echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+				if ( isset($bugfilter['project_id'])) {
+					foreach ($bugfilter['project_id'] as $key => $childId) {
+						echo	'<input type="hidden" name="projectChildId[]" value="'.$childId.'"/>';
+					}
 				}
+				echo '| <a href="javascript:document.page'.$i.'.submit();">'.$i.'</a>';
+				echo '</form>';
 			}
-			echo '| <a href="javascript:document.page'.$i.'.submit();">'.$i.'</a>';
-			echo '</form>';
 		}
+		echo 	'</div>';
 	}
-	echo 	'</div>';
 }
 
 ?>

Modified: trunk/src/plugins/mantisbt/www/admin/index.php
===================================================================
--- trunk/src/plugins/mantisbt/www/admin/index.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/www/admin/index.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -1,8 +1,8 @@
 <?php
-
 /*
- * Copyright 2010 (c) : Franck Villaume - Capgemini
  * Admin MantisBT page
+ * Copyright 2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
  *
  * This file is part of FusionForge.
  *
@@ -24,19 +24,20 @@
 $action = getStringFromRequest('action');
 $view = getStringFromRequest('view');
 
-switch($action) {
+switch ($action) {
 	case "addCategory":
 	case "addVersion":
 	case "renameCategory":
 	case "deleteCategory":
 	case "deleteVersion":
-	case "updateVersion":
+	case "updateVersion": {
 		include ("mantisbt/action/admin/$action.php");
 		break;
+	}
 }
 
 // submenu
-$labelTitle = array ();
+$labelTitle = array();
 $labelTitle[] = _('Roadmap');
 $labelTitle[] = _('Tickets');
 $labelPage = array();
@@ -44,31 +45,43 @@
 $labelPage[] = "/plugins/mantisbt/?type=group&id=".$id."&pluginname=".$pluginname;
 $userperm = $group->getPermission($user);
 if ( $userperm->isAdmin() ) {
-        $labelTitle[] = _('Admin');
-        $labelPage[] = "/plugins/mantisbt/?type=admin&id=".$id."&pluginname=".$pluginname;
-        $labelTitle[] = _('Stats');
-        $labelPage[] = "/plugins/mantisbt/?type=admin&id=".$id."&pluginname=".$pluginname."&view=stat";
+	$labelTitle[] = _('Administration');
+	$labelPage[] = "/plugins/mantisbt/?type=admin&id=".$id."&pluginname=".$pluginname;
+	$labelTitle[] = _('Statistics');
+	$labelPage[] = "/plugins/mantisbt/?type=admin&id=".$id."&pluginname=".$pluginname."&view=stat";
 }
 
-echo $HTML->subMenu( $labelTitle, $labelPage );
+echo $HTML->subMenu($labelTitle, $labelPage);
 
-switch($view) {
+switch ($view) {
 	case "editVersion":
-	case "stat":
+	case "stat": {
 		include ("mantisbt/view/admin/$view.php");
-		exit;
-	default:
+		break;
+	}
+	default: {
 		/* affichage principal */
-		echo '<table><tr><td valign="top">';
-		include ("mantisbt/view/admin/viewCategorie.php");
-		echo '</td><td valign="top">';
-		include ("mantisbt/view/admin/viewVersion.php");
-		echo '</td></tr><tr><td valign="top">';
-		include ("mantisbt/view/admin/addCategory.php");
-		echo '</td><td valign="top">';
-		include ("mantisbt/view/admin/addVersion.php");
-		echo '</td></tr></table>';
+		if (!isset($clientSOAP)) {
+			try {
+				$clientSOAP = new SoapClient(forge_get_config('server_url','mantisbt')."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
+			} catch (SoapFault $soapFault) {
+				echo '<div class="warning" >'. _('Technical error occurs during data retrieving'). ' ' .$soapFault->faultstring.'</div>';
+				$errorPage = true;
+			}
+		}
+		if (!isset($errorPage)) {
+			echo '<table><tr><td valign="top">';
+			include ("mantisbt/view/admin/viewCategorie.php");
+			echo '</td><td valign="top">';
+			include ("mantisbt/view/admin/viewVersion.php");
+			echo '</td></tr><tr><td valign="top">';
+			include ("mantisbt/view/admin/addCategory.php");
+			echo '</td><td valign="top">';
+			include ("mantisbt/view/admin/addVersion.php");
+			echo '</td></tr></table>';
+		}
 		break;
+	}
 }
 
 ?>

Modified: trunk/src/plugins/mantisbt/www/group/index.php
===================================================================
--- trunk/src/plugins/mantisbt/www/group/index.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/www/group/index.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -1,9 +1,11 @@
 <?php
 
 /*
- * Copyright 2010 (c) : Franck Villaume - Capgemini
  * Project MantisBT page
  *
+ * Copyright 2009-2010, Franck Villaume - Capgemini
+ * http://fusionforge.org
+ *
  * This file is part of FusionForge.
  *
  * FusionForge is free software; you can redistribute it and/or modify
@@ -30,16 +32,18 @@
 	case "addIssue":
 	case "deleteNote":
 	case "addAttachment":
-	case "deleteAttachment":
+	case "deleteAttachment": {
 		include ("mantisbt/action/$action.php");
 		break;
+	}
 	case "updateNote":
 	case "privateNote":
-	case "publicNote":
+	case "publicNote": {
 		include ("mantisbt/action/updateNote.php");
 		break;
+	}
 }
-				
+
 // submenu
 $labelTitle = array ();
 $labelTitle[] = _('Roadmap');
@@ -49,9 +53,9 @@
 $labelPage[] = "/plugins/mantisbt/?type=group&id=".$id."&pluginname=".$pluginname;
 $userperm = $group->getPermission($user);
 if ( $userperm->isAdmin() ) {
-	$labelTitle[] = _('Admin');
+	$labelTitle[] = _('Administration');
 	$labelPage[] = "/plugins/mantisbt/?type=admin&id=".$id."&pluginname=".$pluginname;
-	$labelTitle[] = _('Stats');
+	$labelTitle[] = _('Statistics');
 	$labelPage[] = "/plugins/mantisbt/?type=admin&id=".$id."&pluginname=".$pluginname."&view=stat";
 }
 
@@ -61,24 +65,28 @@
 switch ($view) {
 	case "editIssue":
 	case "viewNote":
-	case "addIssue":	
-	case "addAttachment":	
-	case "roadmap":
+	case "addIssue":
+	case "addAttachment":
+	case "roadmap": {
 		include("mantisbt/view/$view.php");
 		break;
-	case "viewIssue":
+	}
+	case "viewIssue": {
 		include("mantisbt/view/$view.php");
 		include('mantisbt/view/viewNote.php');
 		include('mantisbt/view/viewAttachment.php');
 		break;
+	}
 	case "editNote":
-	case "addNote":
+	case "addNote": {
 		include("mantisbt/view/addOrEditNote.php");
 		break;
+	}
 	/* viewAllIssues is the default page */
-	default:
+	default: {
 		include('mantisbt/view/viewIssues.php');
 		break;
+	}
 }
 
 ?>

Modified: trunk/src/plugins/mantisbt/www/index.php
===================================================================
--- trunk/src/plugins/mantisbt/www/index.php	2010-11-22 20:56:27 UTC (rev 11603)
+++ trunk/src/plugins/mantisbt/www/index.php	2010-11-23 12:46:41 UTC (rev 11604)
@@ -121,6 +121,7 @@
 			} else {
 				// do the job
 				mantisbt_Project_Header(array('title'=>$pluginname . ' Project Plugin!', 'pagename'=>"$pluginname", 'sectionvals'=>array(group_getname($id))));
+				html_use_tooltips();
 				include ('mantisbt/www/group/index.php');
 			}
 			break;
@@ -157,6 +158,7 @@
 			if (!is_int($password)) {
 				// do the job
 				mantisbt_User_Header(array('title'=>sprintf(_('My %s'),$pluginname),'pagename'=>"$pluginname",'sectionvals'=>array($realuser->getUnixName())));
+				html_use_tooltips();
 				include ('mantisbt/www/user/index.php');
 			} else {
 				exit_error(_('Impossible de récupérer les identifiants de connexions depuis le LDAP'),'home');
@@ -178,7 +180,8 @@
 			//only project admin can access here
 			if ( $userperm->isAdmin() ) {
 				// DO THE STUFF FOR THE PROJECT ADMINISTRATION PART HERE
-				mantisbt_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));	
+				mantisbt_Project_Header(array('title'=>$pluginname . ' Project Plugin!','pagename'=>"$pluginname",'sectionvals'=>array(group_getname($id))));
+				html_use_tooltips();	
 				include ('mantisbt/www/admin/index.php');
 			} else {
 				exit_permission_denied(_('You are not Admin of this project'),'home');




More information about the Fusionforge-commits mailing list