/[soft]/dashboard/Report/Box/00_Project.php
ViewVC logotype

Contents of /dashboard/Report/Box/00_Project.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1697 - (show annotations) (download)
Tue Jun 21 12:24:45 2011 UTC (12 years, 10 months ago) by rda
File size: 1670 byte(s)
better dates
1 <?php
2 /**
3 * Project reporting box.
4 *
5 * PHP version 5
6 *
7 * @category Dashboard
8 * @package Buildsystem
9 * @author Romain d'Alverny <rda@mageia.org>
10 * @license MIT License, see LICENSE.txt
11 * @link http://svnweb.mageia.org/svn/soft/dashboard/
12 */
13
14 /**
15 */
16 class Report_Box_Project extends Report_Box
17 {
18 /**
19 */
20 var $title = "Project info";
21
22 /**
23 */
24 function _get_var_definitions() {
25 return array(
26 'age' => ':render',
27 'age_mageia_1' => ':render',
28 // 'next' => ':render',
29 'contribs' => '%d registered contributors',
30 // 'packagers' => '%d packagers',
31 );
32 }
33
34 function _render_value_age()
35 {
36 $today = time();
37 $myBirthDate = strtotime("2010-09-18 19:00:00");
38 return array(
39 't' => sprintf("I'm %d days old.", round(abs($today-$myBirthDate)/60/60/24)),
40 'c' => 'ok',
41 's' => 0
42 );
43 }
44
45 function _render_value_age_mageia_1()
46 {
47 $today = time();
48 $myBirthDate = strtotime("2011-06-01 00:00:00");
49 return array(
50 't' => sprintf("Mageia 1 is %d days old.", round(abs($today-$myBirthDate)/60/60/24)),
51 'c' => 'ok',
52 's' => 0
53 );
54 }
55
56 function _render_value_next()
57 {
58 $today = time();
59 $release = strtotime("2011-06-01 19:00:00");
60 return array(
61 't' => sprintf("Next release in %d days.", round(abs($today-$release)/60/60/24)),
62 'c' => 'ok',
63 's' => 0
64 );
65 }
66
67 function _get_links()
68 {
69 return 'View people stats, ...';
70 }
71
72 }

Properties

Name Value
svn:keywords Id,Author,Date,Rev

  ViewVC Help
Powered by ViewVC 1.1.30