[Fusionforge-commits] r12414 - trunk/src/plugins/mantisbt/view
Franck VILLAUME
nerville at fusionforge.org
Mon Feb 28 11:00:14 CET 2011
Author: nerville
Date: 2011-02-28 11:00:13 +0100 (Mon, 28 Feb 2011)
New Revision: 12414
Modified:
trunk/src/plugins/mantisbt/view/addOrEditNote.php
trunk/src/plugins/mantisbt/view/viewIssue.php
trunk/src/plugins/mantisbt/view/viewNote.php
Log:
make it work ... numerous fix
Modified: trunk/src/plugins/mantisbt/view/addOrEditNote.php
===================================================================
--- trunk/src/plugins/mantisbt/view/addOrEditNote.php 2011-02-28 09:50:23 UTC (rev 12413)
+++ trunk/src/plugins/mantisbt/view/addOrEditNote.php 2011-02-28 10:00:13 UTC (rev 12414)
@@ -50,13 +50,13 @@
if (!isset($errorPage)){
if($view == "editNote"){
- $labelboxTitle = 'Modifier la note';
+ $labelboxTitle = _('Modify note');
$actionform = 'updateNote';
- $labelButtonSubmit = 'Mettre à jour';
+ $labelButtonSubmit = _('Update');
} else {
- $labelboxTitle = 'Ajouter la note';
+ $labelboxTitle = _('Add note');
$actionform = 'addNote';
- $labelButtonSubmit = 'Valider';
+ $labelButtonSubmit = _('Submit');
}
echo '<div align="center" id="add_edit_note">';
Modified: trunk/src/plugins/mantisbt/view/viewIssue.php
===================================================================
--- trunk/src/plugins/mantisbt/view/viewIssue.php 2011-02-28 09:50:23 UTC (rev 12413)
+++ trunk/src/plugins/mantisbt/view/viewIssue.php 2011-02-28 10:00:13 UTC (rev 12414)
@@ -121,8 +121,8 @@
}
</style>
<script type="text/javascript">
- $(document).ready(function() {
- $("#expandable_edition").hide();
+ jQuery(document).ready(function() {
+ jQuery("#expandable_edition").hide();
});
</script>
Modified: trunk/src/plugins/mantisbt/view/viewNote.php
===================================================================
--- trunk/src/plugins/mantisbt/view/viewNote.php 2011-02-28 09:50:23 UTC (rev 12413)
+++ trunk/src/plugins/mantisbt/view/viewNote.php 2011-02-28 10:00:13 UTC (rev 12414)
@@ -22,23 +22,28 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+global $mantisbt;
+global $mantisbtConf;
+global $username;
+global $password;
+global $group_id;
+global $idBug;
+
//$msg is coming from previous soap error
if (empty($msg)) {
- if (!isset($defect)){
- /* 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));
+ if (!isset($defect)){
+ /* do not recreate $clientSOAP object if already created by other pages */
+ if (!isset($clientSOAP))
+ $clientSOAP = new SoapClient($mantisbtConf['url']."/api/soap/mantisconnect.php?wsdl", array('trace'=>true, 'exceptions'=>true));
- $defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
- }
+ $defect = $clientSOAP->__soapCall('mc_issue_get', array("username" => $username, "password" => $password, "issue_id" => $idBug));
+ }
- $boxTitle = 'Notes';
+ echo '<h2 style="border-bottom: 1px solid black">'._('Notes').'</h2>';
- echo "<h2 style='border-bottom: 1px solid black'>Notes</h2>";
-
- if (isset($defect->notes)){
- echo '<table class="innertabs">';
- foreach ($defect->notes as $key => $note){
+ if (isset($defect->notes)){
+ echo '<table class="innertabs">';
+ foreach ($defect->notes as $key => $note){
echo '<tr>';
echo '<td width="10%" class="FullBoxTitle">';
echo '('.sprintf($format,$note->id).')';
@@ -50,18 +55,18 @@
echo date("Y-m-d G:i",strtotime($note->date_submitted));
echo '</td>';
echo '<td width="9%" class="FullBoxTitle">';
- echo '<input type=button name="upNote" value="Modifier" onclick="window.location.href=\'?type='.$type.'&id='.$id.'&pluginname='.$pluginname.'&idBug='.$defect->id.'&idNote='.$note->id.'&view=editNote\'">';
- echo '<input type=button name="delNote" value="Supprimer" onclick="window.location.href=\'?type='.$type.'&id='.$id.'&pluginname='.$pluginname.'&idBug='.$defect->id.'&idNote='.$note->id.'&action=deleteNote&view=viewIssue\'">';
+ echo '<input type=button name="upNote" value="'._('Modify').'" onclick="window.location.href=\'?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'&idBug='.$defect->id.'&idNote='.$note->id.'&view=editNote\'">';
+ echo '<input type=button name="delNote" value="'._('Delete').'" onclick="window.location.href=\'?type='.$type.'&group_id='.$group_id.'&pluginname='.$mantisbt->name.'&idBug='.$defect->id.'&idNote='.$note->id.'&action=deleteNote&view=viewIssue\'">';
echo "</td>";
echo '<td class="FullBox">';
echo '<textarea disabled name="description" style="width:99%; background-color:white; color:black; border: none;" row="3">'.htmlspecialchars($note->text, ENT_QUOTES).'</textarea>';
echo "</td>";
echo '</tr>';
- }
- echo "</table>";
- } else {
- echo "Il n'y a pas de notes pour ce ticket.";
- }
+ }
+ echo "</table>";
+ } else {
+ echo '<p class="warning">'._('No notes for this ticket').'</p>';
+ }
?>
<style>
@@ -86,12 +91,12 @@
}
</style>
<script type="text/javascript">
- $(document).ready(function() {
- $("#expandable_note").hide();
- });
+ jQuery(document).ready(function() {
+ jQuery("#expandable_note").hide();
+ });
</script>
-<p class="notice_title" onclick='$("#expandable_note").slideToggle(300)'>Ajouter une note</p>
+<p class="notice_title" onclick='jQuery("#expandable_note").slideToggle(300)'><?php echo _('Add note') ?></p>
<div id='expandable_note' class="notice_content">
<?php
include("addOrEditNote.php");
More information about the Fusionforge-commits
mailing list