summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgfuncs.inc
diff options
context:
space:
mode:
authorsimo <simo>2005-06-11 04:55:30 +0200
committersimo <simo>2005-06-11 04:55:30 +0200
commit52d6df0f62987597963c775db930b47a76ef23c8 (patch)
treebfb91610429526739cc27f1a089587f9f695f40a /web/lib/pkgfuncs.inc
parent0a199a929a563ce2191450ced2fde5e304eb83bf (diff)
downloadaur-52d6df0f62987597963c775db930b47a76ef23c8.tar.gz
aur-52d6df0f62987597963c775db930b47a76ef23c8.tar.xz
Reorganized package details page
Diffstat (limited to 'web/lib/pkgfuncs.inc')
-rw-r--r--web/lib/pkgfuncs.inc87
1 files changed, 54 insertions, 33 deletions
diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index b3e51d84..525bc67b 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -384,9 +384,59 @@ function package_details($id=0, $SID="") {
print "</td></tr>\n";
print "</table></td>";
print "</tr>\n";
+ print "<tr>\n";
+ print " <td colspan='2'><img src='/images/pad.gif' height='2'>";
+ print "</td></tr>\n";
+ print "</table>\n";
+ print "</center>\n";
+ print " </td>\n";
+ print "</tr>\n";
+
+ print "</table><br />\n";
- # Display package comments
+ # Actions Bar
+ #
+ if ($SID) {
+ print "<table cellspacing='3' class='boxSoft'>\n";
+ print "<tr><td class='boxSoftTitle' align='right'><span class='f3'>".__("Actions")."</span></td></tr>\n";
+ print "<tr>\n";
+ print "<td class='boxSoft'><form action='/packages.php' method='post'>\n";
+ print "<input type='hidden' name='IDs[".$row["ID"]."]' value='1'>\n";
+ print "<input type='hidden' name='ID' value='".$row["ID"]."'>\n";
+ # Voting Button
+ #
+ $q = "SELECT * FROM PackageVotes WHERE UsersID = ".uid_from_sid($SID);
+ $q.= " AND PackageID = ".$row["ID"];
+ if (!mysql_num_rows(db_query($q, $dbh))) {
+ print "<input type='submit' class='button' name='do_Vote'";
+ print " value='".__("Vote")."'>";
+ } else {
+ print "<input type='submit' class='button' name='do_UnVote'";
+ print " value='".__("Un-Vote")."'>";
+ }
+ # Comment Nofify Button
+ #
+ $q = "SELECT * FROM CommentNotify WHERE UserID = ".uid_from_sid($SID);
+ $q.= " AND PkgID = ".$row["ID"];
+ if (!mysql_num_rows(db_query($q, $dbh))) {
+ print "<input type='submit' class='button' name='do_Notify'";
+ print " value='".__("Notify")."' title='".__("New Comment Notification")."'>";
+ } else {
+ print "<input type='submit' class='button' name='do_UnNotify'";
+ print " value='".__("UnNotify")."' title='".__("No New Comment Notification")."'>";
+ }
+ print "</form></td></tr>\n";
+ print "</table><br />\n";
+ }
+
+ # Comments
#
+ print "<table cellspacing='3' class='boxSoft'>\n";
+ print "<tr><td class='boxSoftTitle' align='right'><span class='f3'>".__("Comments")."</span></td></tr>\n";
+ print "<tr>\n";
+ print "<td class='boxSoft'>";
+
+ print "<table width='100%'>\n";
$comments = package_comments($row["ID"]);
if (!empty($comments)) {
while (list($indx, $carr) = each($comments)) {
@@ -431,42 +481,13 @@ function package_details($id=0, $SID="") {
print __("Add Comment")."\">";
print "</form>\n";
print " </td>";
- if ($SID) {
- print "<td><form action='/packages.php' method='post'>\n";
- print "<input type='hidden' name='IDs[".$row["ID"]."]' value='1'>\n";
- print "<input type='hidden' name='ID' value='".$row["ID"]."'>\n";
- # Voting Button
- #
- $q = "SELECT * FROM PackageVotes WHERE UsersID = ".uid_from_sid($SID);
- $q.= " AND PackageID = ".$row["ID"];
- if (!mysql_num_rows(db_query($q, $dbh))) {
- print "<input type='submit' class='button' name='do_Vote'";
- print " value='".__("Vote")."'>";
- } else {
- print "<input type='submit' class='button' name='do_UnVote'";
- print " value='".__("Un-Vote")."'>";
- }
- # Comment Nofify Button
- #
- $q = "SELECT * FROM CommentNotify WHERE UserID = ".uid_from_sid($SID);
- $q.= " AND PkgID = ".$row["ID"];
- if (!mysql_num_rows(db_query($q, $dbh))) {
- print "<input type='submit' class='button' name='do_Notify'";
- print " value='".__("Notify")."'>";
- } else {
- print "<input type='submit' class='button' name='do_UnNotify'";
- print " value='".__("UnNotify")."'>";
- }
- print "</form></td>\n";
- }
print "</tr>\n";
print "</table>\n";
- print "</center>\n";
- print " </td>\n";
- print "</tr>\n";
- print "</table>\n";
+
+ print "</td></tr></table>\n";
+
}
}
return;