5 * Copyright 2009-2011, Franck Villaume - Capgemini
6 * Copyright 2010, Antoine Mercadal - Capgemini
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.
35 $clientSOAP = new SoapClient($mantisbtConf['url']."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
36 $defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
37 }catch (SoapFault $soapFault) {
38 echo '<div class="warning" >'. _('Technical error occurs during data retrieving:'). ' ' .$soapFault->faultstring.'</div>';
43 if (!isset($errorPage)){
44 echo '<h2>'._('Attached files').'</h2>';
45 $boxTitle = 'Fichiers attachés (<a style="color:#FFFFFF;font-size:0.8em" href="?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'&idBug='.$idBug.'&view=addAttachment">Ajouter un fichier</a>)';
46 if (isset($defect->attachments) && count($defect->attachments) > 0) {
47 echo '<table class="innertabs">';
49 echo '<td>'._('Filename').'</td>';
50 echo '<td>'._('Actions').'</td>';
52 foreach ($defect->attachments as $key => $attachement){
54 echo '<td>'.$attachement->filename.'</td>';
56 echo '<input type=button value="'._('Download').'" onclick="window.location.href=\'getAttachment.php/'.$group_id.'/'.$attachement->id.'/'.$attachement->filename.'\'">';
58 echo '<input type=button value="'._('Delete').'" onclick="window.location.href=\'?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'&idBug='.$idBug.'&idAttachment='.$attachement->id.'&action=deleteAttachment&view=viewIssue\'">';
65 echo '<p class="warning">'._('No attached files for this ticket').'</p>';
69 <script type="text/javascript">
70 jQuery(document).ready(function() {
71 jQuery("#expandable_file").hide();
78 <p class="notice_title" onclick='jQuery("#expandable_file").slideToggle(300)'><?php echo _('Add file') ?></p>
79 <div id='expandable_file' class="notice_content">
81 include 'addAttachment.php';