summaryrefslogtreecommitdiffstats
path: root/web/template
diff options
context:
space:
mode:
Diffstat (limited to 'web/template')
-rw-r--r--web/template/pkg_comments.php23
-rw-r--r--web/template/pkg_details.php23
2 files changed, 31 insertions, 15 deletions
diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php
index 02171a0..e4a9da1 100644
--- a/web/template/pkg_comments.php
+++ b/web/template/pkg_comments.php
@@ -3,20 +3,25 @@
$uid = uid_from_sid($SID);
while (list($indx, $carr) = each($comments)) { ?>
<div class="comment-header"><?php
- if (canDeleteCommentArray($carr, $atype, $uid)) {
- $durl = '<a href="pkgedit.php?del_Comment=1';
- $durl.= '&comment_id=' . $carr['ID'] . '&ID=' . $row['ID'];
- $durl.= '"><img src="images/x.png" border="0"';
- $durl.= ' alt="' . __("Delete comment") . '"></a> ';
-
- echo $durl;
- }
if ($SID) {
$carr['UserName'] = "<a href=\"account.php?Action=AccountInfo&amp;ID={$carr['UsersID']}\">{$carr['UserName']}</a>";
}
- echo __('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS']));
+ $commentHeader =__('Comment by: %s on %s', $carr['UserName'], gmdate('r', $carr['CommentTS']));
+
+ if (canDeleteCommentArray($carr, $atype, $uid)) {
+ $durl = '<form method="POST" action="packages.php?ID='.$row['ID'].'">';
+ $durl.= '<input type="hidden" name="action" value="do_DeleteComment">';
+ $durl.= '<input type="hidden" name="comment_id" value="'.$carr['ID'].'">';
+ $durl.= '<input type="image" src="images/x.png" border="0" ';
+ $durl.= ' alt="'.__("Delete comment").'" name="submit" value="1" ';
+ $durl.= ' width="19" height="18">&nbsp;';
+
+ $commentHeader = $durl.$commentHeader."</form>";
+ }
+
+ echo $commentHeader;
?></div>
<blockquote class="comment-body">
<div>
diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php
index a4b8f95..7c6356d 100644
--- a/web/template/pkg_details.php
+++ b/web/template/pkg_details.php
@@ -4,13 +4,24 @@ $pkgid = intval($_REQUEST['ID']);
if ($row["Location"] == "unsupported" and ($uid == $row["MaintainerUID"] or
($atype == "Developer" or $atype == "Trusted User"))) {
- $edit_cat = "<a href='pkgedit.php?change_Category=1&amp;ID=";
- $edit_cat .= $pkgid ."'>".$row["Category"]."</a>";
- $edit_cat .= " &nbsp;<span class='fix'>(";
- $edit_cat .= __("change category").")</span>";
+ $catarr = pkgCategories();
+ $edit_cat = "<form method='POST' action='packages.php?ID=".$pkgid."'>\n";
+ $edit_cat.= "<input type='hidden' name='action' value='do_ChangeCategory'>";
+ $edit_cat.= $row['Location']." :: ";
+ $edit_cat.= "<select name='category_id'>\n";
+ foreach ($catarr as $cid => $catname) {
+ $edit_cat.= "<option value='$cid'";
+ if ($cid == $row["CategoryID"]) {
+ $edit_cat.="selected";
+ }
+ $edit_cat.=">".$catname."</option>";
+ }
+ $edit_cat.= "</select>&nbsp;<input type='submit' value='Change category'>";
+ $edit_cat.= "</form>";
+
}
else {
- $edit_cat = $row['Category'];
+ $edit_cat = $row['Location']." :: ".$row['Category'];
}
if ($row["MaintainerUID"]) {
@@ -49,7 +60,7 @@ $out_of_date_time = ($row["OutOfDateTS"] == 0) ? $msg : gmdate("r", intval($row[
</p>
<p>
- <span class='f3'><?php echo $row['Location'] . ' :: ' . $edit_cat ?></span><br />
+ <span class='f3'><?php echo $edit_cat ?></span><br />
<span class='f3'><?php echo __('Maintainer') .': ' . $maintainer ?></span><br />
<span class='f3'><?php echo $votes ?></span>
</p>