From fac33d8147d039f2255daac37fe440c7f692b5b1 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 15 Jan 2006 21:11:43 +0000 Subject: [PATCH] r740: Product explainer is in place --- explain.php | 84 +++++++++++++++++++++++++++++++++++ templates/explain_product.tpl | 35 +++++++++++++++ templates/explain_row.tpl | 4 ++ 3 files changed, 123 insertions(+) create mode 100644 explain.php create mode 100644 templates/explain_product.tpl create mode 100644 templates/explain_row.tpl diff --git a/explain.php b/explain.php new file mode 100644 index 0000000..8ef882a --- /dev/null +++ b/explain.php @@ -0,0 +1,84 @@ +datastore['product'] AS $product) + { + if ($product['componentmother']) + { + $components["$product[componentmother]"]["$product[productid]"] = $product; + } + else + { + $products["$product[productid]"] = $product; + } + } + + foreach ($bugsys->datastore['version'] AS $version) + { + $versions["$version[productid]"]["$version[versionid]"] = $version; + } + + // global versions + foreach ($versions['0'] AS $version) + { + $left = $version['version']; + $right = null; + eval('$globalversions .= "' . $template->fetch('explain_row') . '";'); + } + + foreach ($products AS $product) + { + $left = $product['title']; + $right = $product['description']; + $trextra = ' style="background-color: ' . $stylevar['alt_colour'] . '"'; + eval('$productlist .= "' . $template->fetch('explain_row') . '";'); + + foreach ($components["$product[productid]"] AS $component) + { + $left = '  ›   ' . $component['title']; + $right = $component['description']; + $trextra = ''; + eval('$productlist .= "' . $template->fetch('explain_row') . '";'); + } + } + + eval('$template->flush("' . $template->fetch('explain_product') . '");'); +} + +/*=====================================================================*\ +|| ################################################################### +|| # $HeadURL$ +|| # $Id$ +|| ################################################################### +\*=====================================================================*/ +?> \ No newline at end of file diff --git a/templates/explain_product.tpl b/templates/explain_product.tpl new file mode 100644 index 0000000..4d6fddc --- /dev/null +++ b/templates/explain_product.tpl @@ -0,0 +1,35 @@ +$doctype + + +$headinclude + {$bugsys->options['trackertitle']} - {@"Products"} + + + + +$header + +

{@"Explication of Products"}

+ + + + + + + + + + $globalversions +
{@"Global Versions"}
{@"These versions are avaliable for every product, component, and version."}
+
+ +
+ + + + + +$productlist +
{@"Products"} (components are in white)
+ +$footer \ No newline at end of file diff --git a/templates/explain_row.tpl b/templates/explain_row.tpl new file mode 100644 index 0000000..4eb5af7 --- /dev/null +++ b/templates/explain_row.tpl @@ -0,0 +1,4 @@ + + $left + $right + -- 2.43.5