From 36b44f371bd240fe448d7a22f7295581c9b35633 Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Mon, 5 Jan 2009 15:59:59 -0500 Subject: Move package comments to a template. Change layout in the process. Signed-off-by: Loui Chang --- web/lib/pkgfuncs.inc | 69 +++++++------------------------------------ web/template/pkg_comments.php | 38 ++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 58 deletions(-) create mode 100644 web/template/pkg_comments.php (limited to 'web') diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index 9535f18..b6e93c5 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -524,71 +524,24 @@ function package_details($id=0, $SID="") { } echo " \n"; + echo "
\n"; + + # Add Comments + echo "
\n"; + echo "\n"; + echo "\n"; + echo "
\n"; echo " \n"; echo "\n"; - echo "\n
\n\n"; + echo "\n
"; } - # Comments - # - echo "
\n"; - echo "
".__("Comments")."
\n"; - echo "
\n"; - echo " \n"; - if (isset($_COOKIE['AURSID'])) { - echo ""; - //echo "
\n"; - } + # Print Comments $comments = package_comments($row["ID"]); if (!empty($comments)) { - while (list($indx, $carr) = each($comments)) { - - echo " \n"; - echo " \n"; - echo " \n"; - } - } else { - print "\n"; + include('pkg_comments.php'); } - echo "
"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo "
\n"; - echo "
\n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo " \n"; - echo "
"; - if (canDeleteComment($carr["ID"], $atype, $SID)) { - $durl = ""; - - echo $durl . "  "; - } - if ($SID) { - echo __("Comment by: %h%s%h on %h%s%h", - array("",$carr["UserName"],"", - "",gmdate("Ymd [H:i:s]",$carr["CommentTS"]),"")); - } else { - echo __("Comment by: %h%s%h on %h%s%h", - array("",$carr["UserName"],"", - "",gmdate("Ymd [H:i:s]",$carr["CommentTS"]),"")); - } - echo "
"; - echo "\n"; - echo nl2br(htmlspecialchars($carr["Comments"])); - echo "
\n"; - echo "
None
\n"; - echo "
\n"; - echo "
\n"; } } return; diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php new file mode 100644 index 0000000..7bcf708 --- /dev/null +++ b/web/template/pkg_comments.php @@ -0,0 +1,38 @@ +
+ + + + + + + + + +
+ + '; + + echo $durl; + } + if ($SID) { + echo __("Comment by: %h%s%h on %s", + "", + $carr["UserName"], "", gmdate("Y m d [H:i:s]", $carr["CommentTS"])); + } else { + echo __("Comment by: %h%s%h on %s", + "", $carr["UserName"], "", + gmdate("Y m d [H:i:s]", $carr["CommentTS"])); + } +?> + +
+
+
+
-- cgit v1.2.3-70-g09d2