5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * http://fusionforge.org
8 * This file is part of FusionForge. FusionForge is free software;
9 * you can redistribute it and/or modify it under the terms of the
10 * GNU General Public License as published by the Free Software
11 * Foundation; either version 2 of the Licence, or (at your option)
14 * FusionForge is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 /* view version of a dedicated group in MantisBt */
34 /* do not recreate $clientSOAP object if already created by other pages */
35 if (!isset($clientSOAP))
36 $clientSOAP = new SoapClient($mantisbtConf['url']."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
38 $listVersions = $clientSOAP->__soapCall('mc_project_get_versions', array("username" => $username, "password" => $password, "project_id" => $mantisbtConf['id_mantisbt']));
39 } catch (SoapFault $soapFault) {
40 echo '<div class="warning" >'. _('Technical error occurs during data retrieving:'). ' ' .$soapFault->faultstring.'</div>';
44 if (!isset($errorPage)){
45 echo $HTML->boxTop(_('Manage versions'));
46 if (sizeof($listVersions)) {
49 echo '<td>'._('Version').'</td>';
50 echo '<td>'._('Description').'</td>';
51 echo '<td>'._('Target Date').'</td>';
52 echo '<td>'._('Type').'</td>';
53 echo '<td>'._('Action').'</td>';
56 foreach ($listVersions as $key => $version){
57 echo '<tr '.$HTML->boxGetAltRowStyle($i).'">';
58 echo '<td>'.$version->name.'</td>';
59 (isset($version->description))? $description_value = $version->description : $description_value = '';
60 echo '<td>'.$description_value.'</td>';
61 echo '<td>'.strftime("%d/%m/%Y",strtotime($version->date_order)).'</td>';
62 /* est-ce une version release ? */
63 if ( $version->released ) {
64 echo '<td>Release</td>';
65 /* juste une milestone alors */
67 echo '<td>Milestone</td>';
70 echo '<a href="?type=admin&group_id='.$group_id.'&pluginname='.$mantisbt->name.'&view=editVersion&idVersion='.$version->id.'" ">'._('Update').'</a>';
76 echo '<p class="warning">'._('No versions').'</p>';
78 echo $HTML->boxBottom();