From b31b4ec03edd60820b8e4a8d596de9bc2e14d21b Mon Sep 17 00:00:00 2001 From: Loui Chang Date: Sat, 24 Jan 2009 01:22:19 -0500 Subject: Add package details template (pkg_details.php) Signed-off-by: Loui Chang --- web/template/pkg_details.php | 174 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) create mode 100644 web/template/pkg_details.php (limited to 'web/template/pkg_details.php') diff --git a/web/template/pkg_details.php b/web/template/pkg_details.php new file mode 100644 index 0000000..ffe735c --- /dev/null +++ b/web/template/pkg_details.php @@ -0,0 +1,174 @@ +".$row["Category"].""; + $edit_cat .= "  ("; + $edit_cat .= __("change category").")"; +} +else { + $edit_cat = $row['Category']; +} + +if ($row["MaintainerUID"]) { + $maintainer = username_from_id($row["MaintainerUID"]); + if ($SID) { + $maintainer = '' . $maintainer . ''; + } + +} else { + $maintainer = "None"; +} + +# In case of wanting to put a custom message +$msg = __('unknown'); +$license = empty($row['License']) ? $msg : $row['License']; + +# Print the timestamps for last updates +$updated_time = ($row["ModifiedTS"] == 0) ? "(unknown)" : gmdate("r", intval($row["ModifiedTS"])); +$submitted_time = ($row["SubmittedTS"] == 0) ? "(unknown)" : gmdate("r", intval($row["SubmittedTS"])); + +?> +
+
+
+ +

+
+ ' . $row['URL'] ?>
+ +

+ +

+
+
+ +

+ +

+ +

+ +
+ +
+

+ +

+".__("Tarball")." :: ".__("Files")." :: PKGBUILD"; + } + elseif ($row['LocationID'] == 3) { + echo "CVS"; + } + + if ($row["OutOfDate"] == 1) { + echo "
".__("This package has been flagged out of date.").""; + } +?> +

+ 0 || count($requiredby) > 0) { + echo '

'; + } + + if (count($deps) > 0) { + + echo "". __("Dependencies").""; + + while (list($k, $darr) = each($deps)) { + $url = " ".$darr[1].$darr[3].""; + else echo " ".$darr[1].$darr[3].""; + } + + if (count($requiredby) > 0) { + echo '
'; + } + } + + if (count($requiredby) > 0) { + + echo "". __("Required by").""; + + while (list($k, $darr) = each($requiredby)) { + $url = " " . $darr[1] . $darr[3] . ""; + } + else { + print "".$darr[1].$darr[3].""; + } + } + + } + + if (count($deps) > 0 || count($requiredby) > 0) { + echo '

'; + } + + + # $sources[0] = 'src'; + $sources = package_sources($row["ID"]); + + if (count($sources) > 0) { + +?> +
+
+".$src."
\n"; + } + else + { + # It is presumably an internal source + if ($row["LocationID"] == 2) { + echo "".$src."
\n"; + } elseif ($row["LocationID"] == 3) { + echo ""; + echo $src."
\n"; + } + } + } +?> +
+ + +
+
-- cgit v1.2.3-70-g09d2