5 * Copyright 2010-2011, Franck Villaume - Capgemini
6 * Copyright 2014, Franck Villaume - TrivialDev
7 * http://fusionforge.org
9 * This file is part of FusionForge. FusionForge is free software;
10 * you can redistribute it and/or modify it under the terms of the
11 * GNU General Public License as published by the Free Software
12 * Foundation; either version 2 of the Licence, or (at your option)
15 * FusionForge is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License along
21 * with FusionForge; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 /* view version of a dedicated group in MantisBt */
35 /* do not recreate $clientSOAP object if already created by other pages */
36 if (!isset($clientSOAP))
37 $clientSOAP = new SoapClient($mantisbtConf['url'].'/api/soap/mantisconnect.php?wsdl', array('trace' => true, 'exceptions' => true));
39 $listVersions = $clientSOAP->__soapCall('mc_project_get_versions', array('username' => $username, 'password' => $password, 'project_id' => $mantisbtConf['id_mantisbt']));
40 } catch (SoapFault $soapFault) {
41 echo $HTML->warning_msg(_('Technical error occurs during data retrieving')._(': ').$soapFault->faultstring);
45 if (!isset($errorPage)){
46 echo $HTML->boxTop(_('Manage versions'));
47 if (sizeof($listVersions)) {
48 $titleArr = array(_('Version'), _('Description'), _('Target Date'), _('Type'), _('Actions'));
49 echo $HTML->listTableTop($titleArr);
50 foreach ($listVersions as $key => $version){
52 $cells[][] = $version->name;
53 (isset($version->description))? $description_value = $version->description : $description_value = '';
54 $cells[][] = $description_value;
55 $cells[][] = strftime(_("%d/%m/%Y"),strtotime($version->date_order));
56 if ( $version->released ) {
57 $cells[][] = _('Release');
59 $cells[][] = _('Milestone');
61 $cells[][] = util_make_link('/plugins/'.$mantisbt->name.'/?type=admin&group_id='.$group_id.'&view=editVersion&idVersion='.$version->id, _('Update'));
62 echo $HTML->multiTableRow(array('class' => $HTML->boxGetAltRowStyle($key, true)), $cells);
64 echo $HTML->listTableBottom();
66 echo $HTML->information(_('No versions'));
68 echo $HTML->boxBottom();