From f7d13b5b368f1432b9a1eb1798f94a70b9dc03b7 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Sat, 5 Apr 2014 02:06:54 +0200 Subject: Add package base detail pages This adds package base details pages, similar to the package details pages. Each package base details page contains general information (package base name, category, submitter, maintainer, ...) and links to all the corresponding packages. As on the package details pages, comments and links to several package actions are also provided. Signed-off-by: Lukas Fleischer --- web/html/index.php | 16 +++++++++++++++ web/html/pkgbase.php | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 web/html/pkgbase.php (limited to 'web/html') diff --git a/web/html/index.php b/web/html/index.php index 542d594c..e79955ec 100644 --- a/web/html/index.php +++ b/web/html/index.php @@ -69,6 +69,22 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) { } } + include get_route('/' . $tokens[1]); +} elseif (!empty($tokens[1]) && '/' . $tokens[1] == get_pkgbase_route()) { + if (!empty($tokens[2])) { + /* TODO: Create a proper data structure to pass variables from + * the routing framework to the individual pages instead of + * initializing arbitrary variables here. */ + $pkgbase_name = $tokens[2]; + $base_id = pkgbase_from_name($pkgbase_name); + + if (!$base_id) { + header("HTTP/1.0 404 Not Found"); + include "./404.php"; + return; + } + } + include get_route('/' . $tokens[1]); } elseif (!empty($tokens[1]) && '/' . $tokens[1] == get_user_route()) { if (!empty($tokens[2])) { diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php new file mode 100644 index 00000000..e0c9af69 --- /dev/null +++ b/web/html/pkgbase.php @@ -0,0 +1,55 @@ + + +