|
From: Ulf E. <ulf...@us...> - 2005-08-22 19:44:58
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7041/templates/default/admin Modified Files: wrap.html Added Files: priority-edit.html prioritylist.html Log Message: RFE #759250 - Table Driven Priorities. --- NEW FILE: priority-edit.html --- <script type="text/javascript" language="JavaScript"> var nameString = '<?php echo translate("Please enter a name"); ?>'; var descString = '<?php echo translate("Please enter a description"); ?>'; function checkForm(frm) { if (frm.priority_name.value == '') { alert(nameString); frm.priority_name.focus(); return false; } if (frm.priority_desc.value == '') { alert(descString); frm.priority_desc.focus(); return false; } return true; } </script> <b><?php echo $page_title; ?> </b> <hr size="1"> <form method="post" onsubmit="return checkForm(this)"> <table border='0'> <?php if($error) { ?> <tr> <td colspan="2" class="error"> <?php echo $error; ?> </td> </tr> <?php } ?> <tr> <td align="right" valign="top"> <?php echo translate("Name"); ?>: </td> <td> <input type="text" size="20" maxlength="40" name="priority_name" value="<?php echo stripslashes(htmlspecialchars($priority_name)); ?>"> </td> </tr> <tr> <td align="right" valign="top"> <?php echo translate("Description"); ?>: </td> <td> <textarea name="priority_desc" cols="20" rows="5" wrap="virtual"><?php echo stripslashes(htmlspecialchars($priority_desc)); ?> </textarea> </td> </tr> <tr> <td align="right" valign="top"> <?php echo translate("Sort Order"); ?>: </td> <td> <input type="text" size="3" maxlength="3" name="sort_order" value="<?php echo $sort_order; ?>"> </td> </tr> <tr> <td align="right" valign="top"> <?php echo translate("Row Color"); ?>: </td> <td> <input type="text" size="11" maxlength="10" name="priority_color" value="<?php echo $priority_color; ?>"> </td> </tr> <tr> <td align="right" valign="top"> </td> <td> <input type='submit' name='submit' value='<?php echo translate("Submit"); ?>'> <input type="hidden" name="priority_id" value="<?php echo $priority_id; ?>"> <input type="hidden" name="use_js" value="<?php echo $_REQUEST['use_js']; ?>"> <input type="hidden" name="op" value="save"> </td> </tr> </table> <br> </form> --- NEW FILE: prioritylist.html --- <script language="JavaScript"> <!-- function popupPriority(id) { window.open('priority.php?op=edit&use_js=1&priority_id='+id, 'ewin', 'dependent=yes,width=350,height=300,scrollbars=1'); } // --> </script> <table border="0" width="100%"> <tr> <td valign="top"> <b> <?php echo $page_title; ?></b> - <a href="priority.php?op=edit&priority_id=0" onClick="popupPriority(0); return false;"><?php echo translate("Add new priority"); ?></a> <hr size="1"> <table class="bordertable" align="center"> <tr> <th class="<?php echo $headers['name']['class']; ?>"><a href="<?php echo $headers['name']['url']; ?>"><?php echo translate("Name"); ?></a></th> <th class="<?php echo $headers['description']['class']; ?>"><a href="<?php echo $headers['description']['url']; ?>"><?php echo translate("Description"); ?></a></th> <th class="<?php echo $headers['sortorder']['class']; ?>"><a href="<?php echo $headers['sortorder']['url']; ?>"><?php echo translate("Sort Order"); ?></a></th> <th><?php echo translate("Delete"); ?></th> </tr> <?php for ($i = 0, $count = count($priorities); $i < $count; $i++) { ?> <tr> <td><a href="priority.php?op=edit&priority_id=<?php echo $priorities[$i]['priority_id']; ?>" onClick="popupPriority(<?php echo $priorities[$i]['priority_id']; ?>); return false;"><?php echo stripslashes(htmlspecialchars($priorities[$i]['priority_name'])); ?></a></td> <td> <?php echo $priorities[$i]['priority_desc']; ?></td> <td align="center"><?php echo $priorities[$i]['sort_order']; ?></td> <td align="center"> <?php if(!$priorities[$i]['bug_count']) { ?> <a href="priority.php?op=del&priority_id=<?php echo $priorities[$i]['priority_id']; ?>" onClick="return confirm('<?php echo translate("Are you sure you want to delete this priority?"); ?>')"><?php echo translate("Delete"); ?></a> <?php } ?> </td> </tr> <?php } ?> </table> <?php include('pagination.html'); ?> <br> <div class="info"> <?php echo translate("Items with a Sort Order = 0 will not be selectable by users."); ?> <br> <?php echo translate("Only those items that have no bugs referencing them can be deleted."); ?> </div> </td> </tr> </table> Index: wrap.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/wrap.html,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- wrap.html 25 Oct 2004 12:07:03 -0000 1.24 +++ wrap.html 22 Aug 2005 19:44:47 -0000 1.25 @@ -31,6 +31,7 @@ <li><a href="status.php" class="navlink"><?php echo translate("Statuses"); ?></a></li> <li><a href="resolution.php" class="navlink"><?php echo translate("Resolutions"); ?></a></li> <li><a href="severity.php" class="navlink"><?php echo translate("Severities"); ?></a></li> + <li><a href="priority.php" class="navlink"><?php echo translate("Priorities"); ?></a></li> <li><a href="os.php" class="navlink"><?php echo translate("Operating Systems"); ?></a></li> <li><a href="database.php" class="navlink"><?php echo translate("Databases"); ?></a></li> <li><a href="site.php" class="navlink"><?php echo translate("Sites"); ?></a></li> |