Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/style.php96
1 files changed, 96 insertions, 0 deletions
diff --git a/lib/style.php b/lib/style.php
index 622e764..2fe2992 100644
--- a/lib/style.php
+++ b/lib/style.php
@@ -74,3 +74,99 @@ function print_footer() {
</html>
<?php
}
+
+/**********************************************************************
+ * *
+ * Functions for generating and diplaying listings of packages *
+ * *
+ **********************************************************************/
+
+function query_package_listing() {
+}
+
+function print_package_listing($list, $sorts, $print_order_links) {
+
+ print " <table class=\"results\">\n";
+ print " <thead>\n";
+ print " <tr>\n";
+
+ foreach ($sorts as $get => $sort) {
+ print " <th>\n";
+ if ($print_order_links) {
+ print " <a href=\"?";
+ print
+ substr(
+ str_replace(
+ "&sort=" . $_GET["sort"] . "&",
+ "&",
+ "&" . $_SERVER["QUERY_STRING"] . "&"
+ ),
+ 1) . "sort=";
+ if ($_GET["sort"] == $get)
+ print "-";
+ print $get . "\" title=\"Sort packages by " . $sort["title"] . "\">" . $sort["label"] . "</a>\n";
+ } else
+ print " " . $sort["label"] . "\n";
+ print " </th>\n";
+ }
+
+ print " </tr>\n";
+ print " </thead>\n";
+ print " <tbody>\n";
+ $oddity = "odd";
+ foreach ($list as $row) {
+ print " <tr class=\"" . $oddity . "\">\n";
+ print " <td>\n";
+ print " " . $row["arch"] . "\n";
+ print " </td>\n";
+ print " <td>\n";
+ print " " . $row["repo"] . "\n";
+ print " </td>\n";
+ print " <td>\n";
+ print " <a href=\"" . $row["repo"] . "/" . $row["pkgname"] ."/\" ";
+ print "title=\"View package details for " . $row["pkgname"] . "\">" . $row["pkgname"] . "</a>\n";
+ print " </td>\n";
+ print " <td>\n";
+ print " " . $row["version"] . "\n";
+ print " </td>\n";
+ print " <td>\n";
+ print " ";
+ if ($row["has_issues"])
+ print "has open bug reports";
+ else
+ print "&nbsp;";
+ print "\n";
+ print " </td>\n";
+ print " <td>\n";
+ print " ";
+ if (isset($row["build_date"]))
+ print $row["build_date"];
+ else
+ print "&nbsp;";
+ print "\n";
+ print " </td>\n";
+ print " <td>\n";
+ print " ";
+ if (isset($row["move_date"]))
+ print $row["move_date"];
+ else
+ print "&nbsp;";
+ print "\n";
+ print " </td>\n";
+ print " <td>\n";
+ print " ";
+ if ($row["is_to_be_deleted"])
+ print "to be deleted";
+ else
+ print "&nbsp;";
+ print "\n";
+ print " </td>\n";
+ print " </tr>\n";
+ if ($oddity == "odd" )
+ $oddity = "even";
+ else
+ $oddity = "odd";
+ }
+ print " </tbody>\n";
+ print " </table>\n";
+}