[Fusionforge-commits] r11751 - trunk/src/plugins/mantisbt/view/admin

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Thu Dec 9 17:59:50 CET 2010


Author: nerville
Date: 2010-12-09 17:59:50 +0100 (Thu, 09 Dec 2010)
New Revision: 11751

Modified:
   trunk/src/plugins/mantisbt/view/admin/viewVersion.php
Log:
cleanup

Modified: trunk/src/plugins/mantisbt/view/admin/viewVersion.php
===================================================================
--- trunk/src/plugins/mantisbt/view/admin/viewVersion.php	2010-12-09 16:56:02 UTC (rev 11750)
+++ trunk/src/plugins/mantisbt/view/admin/viewVersion.php	2010-12-09 16:59:50 UTC (rev 11751)
@@ -1,8 +1,6 @@
 <?php
-
 /*
- * Copyright 2010, Capgemini
- * Authors: Franck Villaume - capgemini
+ * Copyright 2010, Franck Villaume - Capgemini
  *
  * This file is part of FusionForge.
  *
@@ -27,52 +25,52 @@
 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));
 
-    $listVersions = $clientSOAP->__soapCall('mc_project_get_versions', array("username" => $username, "password" => $password, "project_id" => $idProjetMantis));
+	$listVersions = $clientSOAP->__soapCall('mc_project_get_versions', 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 Versions');
-    echo '<table class="innertabs">';
-    echo	'<tr>';
-    echo            '<td class="FullBoxTitle">Version</td>';
-    echo		'<td class="FullBoxTitle">Date Livraison</td>';
-    echo		'<td class="FullBoxTitle">Type</td>';
-    echo 		'<td class="FullBoxTitle">Action</td>';
-    echo	'</tr>';
-    $i = 0;
-    foreach ($listVersions as $key => $version){
-	    if ( $i % 2 == 0 ) {
-		    echo '<tr class="LignePaire">';
-	    } else {
-		    echo '<tr class="LigneImpaire">';
-	    }
-	    echo '<td class="InText">'.$version->name.'</td>';
-	    echo '<td class="InText">'.strftime("%d/%m/%Y",strtotime($version->date_order)).'</td>';
-	    /* est-ce une version release ? */
-	    if ( $version->released ) {
-		    echo '<td class="InText">Release</td>';
-	    /* juste une milestone alors */
-	    } else {
-		    echo '<td class="InText">Milestone</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="?type='.$type.'&id='.$id.'&pluginname='.$pluginname.'&view=editVersion&idVersion='.$version->id.'" style="color:white;font-size:0.8em;font-weight:bold;">Modifier</a>
-		    </div>
-		    <div style="display:inline"><img src="'.util_make_url('themes/gforge/images/bouton_droit.png').'"></img></div>';
-	    echo '</td></tr>';
-	    $i++;
-    }
-    echo '</table>';
-    echo $HTML->boxBottom();
+	echo $HTML->boxTop('Gestion des Versions');
+	echo '<table class="innertabs">';
+	echo	'<tr>';
+	echo		'<td class="FullBoxTitle">Version</td>';
+	echo		'<td class="FullBoxTitle">Date Livraison</td>';
+	echo		'<td class="FullBoxTitle">Type</td>';
+	echo 		'<td class="FullBoxTitle">Action</td>';
+	echo	'</tr>';
+	$i = 0;
+	foreach ($listVersions as $key => $version){
+		if ( $i % 2 == 0 ) {
+			echo '<tr class="LignePaire">';
+		} else {
+			echo '<tr class="LigneImpaire">';
+		}
+		echo '<td class="InText">'.$version->name.'</td>';
+		echo '<td class="InText">'.strftime("%d/%m/%Y",strtotime($version->date_order)).'</td>';
+		/* est-ce une version release ? */
+		if ( $version->released ) {
+			echo '<td class="InText">Release</td>';
+		/* juste une milestone alors */
+		} else {
+			echo '<td class="InText">Milestone</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="?type='.$type.'&id='.$id.'&pluginname='.$pluginname.'&view=editVersion&idVersion='.$version->id.'" style="color:white;font-size:0.8em;font-weight:bold;">Modifier</a>
+			</div>
+			<div style="display:inline"><img src="'.util_make_url('themes/gforge/images/bouton_droit.png').'"></img></div>';
+		echo '</td></tr>';
+		$i++;
+	}
+	echo '</table>';
+	echo $HTML->boxBottom();
 }
 
 ?>




More information about the Fusionforge-commits mailing list