From ff3a29ea075b661b5110572325bcd9db78518051 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Fri, 23 Jan 2009 18:25:41 -0500 Subject: Move actions form into template. Signed-off-by: Loui Chang --- web/lib/pkgfuncs.inc | 66 +------------------------------------------ web/template/actions_form.php | 60 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+), 65 deletions(-) create mode 100644 web/template/actions_form.php (limited to 'web') diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 3257c77..e328c30 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -465,75 +465,11 @@ function package_details($id=0, $SID="") { echo " \n"; echo " \n"; echo "\n\n"; - echo "
\n\n"; - # Actions Bar # if ($SID) { - echo "
\n"; - echo "
".__("Actions")."
\n"; - echo "
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - # Voting Button - # - $q = "SELECT * FROM PackageVotes WHERE UsersID = ". $uid; - $q.= " AND PackageID = ".$row["ID"]; - if (!mysql_num_rows(db_query($q, $dbh))) { - echo " "; - } else { - echo ""; - } - # Comment Nofify Button - # - $q = "SELECT * FROM CommentNotify WHERE UserID = ". $uid; - $q.= " AND PkgID = ".$row["ID"]; - if (!mysql_num_rows(db_query($q, $dbh))) { - echo ""; - } else { - echo ""; - } - - if ($row["OutOfDate"] == 0) { - echo "\n"; - } else { - echo "\n"; - } - - if ($row["MaintainerUID"] == 0) { - echo "\n"; - } else if ($uid == $row["MaintainerUID"] || - $atype == "Trusted User" || $atype == "Developer") { - echo "\n"; - } - - if ($atype == "Trusted User" || $atype == "Developer") { - echo "\n"; - } - - echo "
\n"; - echo "
\n"; - - # Add Comments - echo "
\n"; - echo "\n"; - echo "\n"; - echo "
\n"; - echo "
\n"; - echo "
\n"; - echo "\n
"; + include('actions_form.php'); } # Print Comments diff --git a/web/template/actions_form.php b/web/template/actions_form.php new file mode 100644 index 0000000..6299819 --- /dev/null +++ b/web/template/actions_form.php @@ -0,0 +1,60 @@ +
+
+ ]' value='1'> + + "; + } else { + echo " "; + } + + # Comment Notify Button + # + $q = "SELECT * FROM CommentNotify WHERE UserID = ". $uid; + $q.= " AND PkgID = ".$row["ID"]; + if (!mysql_num_rows(db_query($q, $dbh))) { + echo " "; + } else { + echo " "; + } + +if ($row["OutOfDate"] == 0) { + echo "\n"; +} else { + echo "\n"; + } + +if ($row["MaintainerUID"] == 0) { + echo "\n"; +} else if ($uid == $row["MaintainerUID"] || + $atype == "Trusted User" || $atype == "Developer") { + echo "\n"; + } + + if ($atype == "Trusted User" || $atype == "Developer") { + echo "\n"; + } +?> + +
+
+ +
+ + +
+
-- cgit v1.2.3-70-g09d2