--- web/html/packages.php | 4 ++++ web/template/actions_form.php | 12 +++++++++++- web/template/pkg_search_results.php | 4 ++++ 3 files changed, 19 insertions(+), 1 deletions(-) diff --git a/web/html/packages.php b/web/html/packages.php index 472f6a2..48924b6 100644 --- a/web/html/packages.php +++ b/web/html/packages.php @@ -45,6 +45,10 @@ if ($_POST['action'] == "do_Flag" || isset($_POST['do_Flag'])) { $output = pkg_vote($atype, $ids, True); } elseif ($_POST['action'] == "do_UnVote" || isset($_POST['do_UnVote'])) { $output = pkg_vote($atype, $ids, False); +} elseif ($_POST['action'] == "do_ProposeDeletion" || isset($_POST['do_ProposeDeletion'])) { + $output = pkg_propose_deletion($atype, $ids, True); +} elseif ($_POST['action'] == "do_UnProposeDeletion" || isset($_POST['do_UnProposeDeletion'])) { + $output = pkg_propose_deletion($atype, $ids, False); } elseif ($_POST['action'] == "do_Delete" || isset($_POST['do_Delete'])) { if (isset($_POST['confirm_Delete'])) { $output = pkg_delete($atype, $ids); diff --git a/web/template/actions_form.php b/web/template/actions_form.php index d1559f5..006f9ef 100644 --- a/web/template/actions_form.php +++ b/web/template/actions_form.php @@ -43,7 +43,17 @@ if ($row["MaintainerUID"] == 0) { echo "<input type='submit' class='button' name='do_Disown'"; echo " value='".__("Disown Packages")."'>\n"; } - + +if ($row["DeletionProposed"] == 0) { + echo "<input type='submit' class='button' name='do_ProposeDeletion'"; + echo " value='".__("Propose for deletion")."'>\n"; +} else if ($atype == "Trusted User" || $atype == "Developer") { + echo "<input type='submit' class='button' name='do_UnProposeDeletion'"; + echo " value='".__("Cancel deletion proposal")."'>\n"; +} else { + echo __("Deletion proposed"); +} + if ($atype == "Trusted User" || $atype == "Developer") { echo "<input type='submit' class='button' name='do_Delete'"; echo " value='".__("Delete Packages")."'>\n"; diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php index bb898df..f2ce5c0 100644 --- a/web/template/pkg_search_results.php +++ b/web/template/pkg_search_results.php @@ -107,6 +107,10 @@ for ($i = 0; $row = mysql_fetch_assoc($result); $i++) { <?php endif; ?> <option value='do_Notify'><?php print __("Notify") ?></option> <option value='do_UnNotify'><?php print __("UnNotify") ?></option> + <option value='do_ProposeDeletion'><?php print __("Propose Deletion") ?></option> + <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> + <option value='do_UnProposeDeletion'><?php print __("Cancel Deletion Proposal") ?></option> + <?php endif; ?> </select> <?php if ($atype == "Trusted User" || $atype == "Developer"): ?> <input type='checkbox' name='confirm_Delete' value='1' /> <?php print __("Confirm") ?> -- 1.7.2.3