aboutsummaryrefslogtreecommitdiffstats
path: root/Report/Box/00_Project.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2011-05-17 11:14:07 +0000
committerRomain d'Alverny <rda@mageia.org>2011-05-17 11:14:07 +0000
commitb79461f88ffdc54b220181685d4c4a0d2fec245e (patch)
treebfb70086dcd8faebc2be53640da21169fb1f4a03 /Report/Box/00_Project.php
parentd08c07b68d0e88d863f597fe5e9ed72d84229ab7 (diff)
downloaddashboard-b79461f88ffdc54b220181685d4c4a0d2fec245e.tar
dashboard-b79461f88ffdc54b220181685d4c4a0d2fec245e.tar.gz
dashboard-b79461f88ffdc54b220181685d4c4a0d2fec245e.tar.bz2
dashboard-b79461f88ffdc54b220181685d4c4a0d2fec245e.tar.xz
dashboard-b79461f88ffdc54b220181685d4c4a0d2fec245e.zip
Add project-level box
Diffstat (limited to 'Report/Box/00_Project.php')
-rw-r--r--Report/Box/00_Project.php56
1 files changed, 56 insertions, 0 deletions
diff --git a/Report/Box/00_Project.php b/Report/Box/00_Project.php
new file mode 100644
index 0000000..7e310c2
--- /dev/null
+++ b/Report/Box/00_Project.php
@@ -0,0 +1,56 @@
+<?php
+/**
+ * Project reporting box.
+ *
+ * PHP version 5
+ *
+ * @category Dashboard
+ * @package Buildsystem
+ * @author Romain d'Alverny <rda@mageia.org>
+ * @license MIT License, see LICENSE.txt
+ * @link http://svnweb.mageia.org/svn/soft/dashboard/
+*/
+
+/**
+*/
+class Report_Box_Project extends Report_Box
+{
+ /**
+ */
+ var $title = "Project info";
+
+ /**
+ */
+ function _get_var_definitions() {
+ return array(
+ 'age' => ':render',
+ 'next' => ':render'
+// 'contribs' => '%d registered contributors',
+// 'packagers' => '%d packagers',
+ );
+ }
+
+ function _render_value_age()
+ {
+ $today = time();
+ $myBirthDate = strtotime("2010-09-18 19:00:00");
+ return array(
+ 't' => sprintf("I'm %d days old.", round(abs($today-$myBirthDate)/60/60/24)),
+ 'c' => 'ok',
+ 's' => 0
+ );
+ }
+
+ function _render_value_next()
+ {
+ $today = time();
+ $release = strtotime("2011-06-01 19:00:00");
+ return array(
+ 't' => sprintf("Next release in %d days.", round(abs($today-$release)/60/60/24)),
+ 'c' => 'ok',
+ 's' => 0
+ );
+
+ }
+
+}