Update of /cvsroot/phpbt/phpbt/templates/default
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13431/templates/default
Modified Files:
buglist.html
Log Message:
RFE #467256 -- Multiple-bug update feature
RFE #591584 -- Enhancement: Changing multiple bugs
Allow (project) admins to alter several bugs from a query list at the same time
Index: buglist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/buglist.html,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- buglist.html 22 Aug 2005 20:40:08 -0000 1.16
+++ buglist.html 24 Sep 2005 21:53:43 -0000 1.17
@@ -1,3 +1,16 @@
+<?php
+ $project_id = 0;
+ if (isset($_GET['projects']) && is_numeric($_GET['projects'])) {
+ $project_id = (int)$_GET['projects'];
+ }
+ $mass_update = false;
+ if (!empty($_SESSION['uid']) && isset($perm) && $perm->have_perm_proj($project_id)) {
+ $mass_update = true;
+ }
+?>
+<form action="bug.php" method="post">
+<input type="hidden" name="op" value="mass_update">
+<input type="hidden" name="last_modified_date" value="<?php echo empty($now) ? time() : $now; ?>">
<table class="bordertable" align="center" style="width: 100%">
<tr>
<?php for ($i = 0, $colcount = count($db_fields); $i < $colcount; $i++) {
@@ -18,9 +31,18 @@
<tr class="bugrow<?php echo ($i % 2 != 0) ? ' alt' : ''; ?>">
<?php } ?>
<?php
+ $n = 1;
foreach ($bugs[$i] as $var => $val) {
if ($var == 'bug_link_id') $bugid = $val;
- elseif ($var != 'severity_color' && $var != 'priority_color') echo '<td>'.format_bug_col($val, $var, $bugid, $i).'</td>';
+ elseif ($var != 'severity_color' && $var != 'priority_color') {
+ echo '<td>';
+ if ($mass_update && $n==1) {
+ echo "<input type=\"checkbox\" name=\"bugids[]\" value=\"$bugid\"> ";
+ }
+ echo format_bug_col($val, $var, $bugid, $i);
+ echo '</td>';
+ $n = $n + 1;
+ }
}
?>
</tr>
@@ -28,6 +50,7 @@
<?php } ?>
</table>
<?php include('admin/pagination.html'); ?>
+<div class="noprint">
<?php if ($has_excel) { ?>
<div align="center">
<a href="query.php?xl=1"><?php echo translate("Download to spreadsheet"); ?></a>
@@ -49,3 +72,48 @@
}
echo $paramstr; ?>"><?php echo translate("Edit this query"); ?></a>
</div>
+<?php if ($mass_update) { ?>
+ <hr>
+ <table border="0" width="100%" cellspacing="0" cellpadding="2">
+ <tr>
+<?php if ($project_id > 0) { ?>
+ <td><?php echo translate("Component"); ?>:
+ <select name="component_id"><option value="-1" selected>No Change</option><?php build_select('component', -1, $projects) ?></select></td>
+ <td><?php echo translate("Version"); ?>:
+ <select name="version_id"><option value="-1" selected>No Change</option><?php build_select('version', -1, $projects) ?></select></td>
+ </tr><tr>
+<?php } ?>
+ <td><?php echo translate("Priority"); ?>:
+ <select name="priority"><option value="-1" selected>No Change</option><?php build_select('priority', -1) ?></select></td>
+ <td><?php echo translate("Status"); ?>:
+ <select name="status_id"><option value="-1" selected>No Change</option><?php build_select('status', -1) ?></select></td>
+ </tr><tr>
+ <td><?php echo translate("Severity"); ?>:
+ <select name="severity_id"><option value="-1" selected>No Change</option><?php build_select('severity', -1) ?></select></td>
+ <td><?php echo translate("Resolution"); ?>:
+ <select name="resolution_id"><option value="-1" selected>No Change</option><option value="0"><?php echo translate("None"); ?></option><?php build_select('resolution', -1) ?></select></td>
+ </tr><tr>
+ <td><?php echo translate("Assigned to"); ?>:
+ <?php if (isset($perm) && ($perm->have_perm('EditAssignment') or $perm->have_perm_proj($projects))) { ?>
+ <select name="assigned_to"><option value="-1" selected>No Change</option><option value="0"><?php echo translate("None"); ?></option><?php build_select('owner', -1) ?></select></td>
+ <?php } else { ?>
+
+ <?php echo lookup('assigned_to', $assigned_to); ?>
+ <input type="hidden" name="assigned_to" value="<?php echo $assigned_to ?>">
+ </td>
+ <?php } ?>
+ </tr>
+ <tr class="noprint">
+ <td valign="top" colspan=2><?php echo translate("Additional comments"); ?>:<br>
+ <textarea name="comments" rows="6" cols="55" wrap="virtual" <?php echo $disabled ?>><?php echo isset($_POST['comments']) ? $_POST['comments'] : ''; ?></textarea>
+ <br><br>
+ <div align="left">
+ <?php echo translate("Supress notification email"); ?> <input type="checkbox" name="suppress_email" value="1">
+ <input type="submit" value="Submit">
+ </div>
+ </td>
+ </tr>
+ </table>
+<?php } ?>
+</div>
+</form>
|