* @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 ); } function _get_links() { return 'View people stats, ...'; } }