9 * @author Christian Weiske <cweiske@cweiske.de>
10 * @copyright 2014 Christian Weiske
11 * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
12 * @link http://cweiske.de/bdrem.htm
17 * Renders events in a HTML table.
21 * @author Christian Weiske <cweiske@cweiske.de>
22 * @copyright 2014 Christian Weiske
23 * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3
24 * @version Release: @package_version@
25 * @link http://cweiske.de/bdrem.htm
27 class Renderer_HtmlTable extends Renderer
33 protected $httpContentType = 'text/html; charset=utf-8';
36 * Render the events in a HTML table
38 * @param array $arEvents Event objects to render
40 * @return string HTML table
42 public function render($arEvents)
48 <th colspan="2">Days</th>
59 foreach ($arEvents as $event) {
60 $class = 'd' . $event->days;
61 if ($event->days < 0) {
63 } else if ($event->days == 0) {
69 '<tr class="h-event ' . trim($class) . '">'
70 . '<td class="icon"></td>'
71 . '<td class="r">%d</td>'
72 . '<td class="r">%s</td>'
73 . '<td class="p-name">%s</td>'
74 . '<td class="p-summary p-category">%s</td>'
75 . '<td class="dt-start"><time class="value" datetime="%s">%s</time></td>'
80 htmlspecialchars($event->title),
81 htmlspecialchars($event->type),
83 $this->getLocalDate($event->date),
84 strftime('%a', strtotime($event->localDate))