-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.tmpl
77 lines (71 loc) · 2.43 KB
/
index.tmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title>Leaderboard | rewardjs</title>
<!--[if lt IE 9]><script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
<style>
body {
border-top: 5px solid #8BC657;
background-color: #F1E6C2;
color: black;
padding: 0; margin: 0;
}
header { display: block; padding-top: 25px; }
header a { padding: 0 39px; }
header a img { border: none; }
section.body { margin: 0 20px; }
.body h3 {
font-family: Georgia,"Times New Roman",Times,serif;
font-size: 22px;
}
.body table {
width: 640px;
}
</style>
</head>
<body>
<header>
<a title="rewardjs" href="http://rewardjs.com">
<img alt="rewardjs" src="http://rewardjs.com/wp-uploads/2011/05/rewardjs-header.png"/>
</a>
</header>
<section class="body">
<h3><?php
if ($report == 'today') {
echo "Today's Leaders";
} else if ($report == 'week') {
echo "This Week's Leaders";
} else if ($report == 'all') {
echo "Month's Leaders";
} else if ($report == 'lastweek') {
echo "Last Week";
}
if ($date_start != $date_end) {
echo " $date_start - $date_end";
} else {
echo " $date_start";
}
?></h3>
<?php
if (count($commits) == 0) {
echo "<p>Bummer! No tickets found for this timeframe!</p>";
} else {
echo "<table border='1'><thead><th>Rank</th><th>Committer</th>";
echo "<th>Bugs closed</th></thead><tbody>";
foreach ($commits as $i=>$item) {
echo "<tr><td>" . ((integer)$i+1) . "</td>";
echo "<td><a href='https://github.com/" . $item['author'] . "'>".$item['author']."</a></td>";
echo "<td>" . $item['count'] . "</td></tr>";
}
echo "</tbody></table>";
}
?>
<a href="?report=today">Today</a> |
<a href="?report=<?php echo date("Y-m-d", strtotime("1 day ago")); ?>">Yesterday</a> |
<a href="?report=week">This Week</a> |
<a href="?report=lastweek">Last Week</a> |
<a href="?report=all">May</a>
</section>
</body>
</html>