fix CS
[bdrem.git] / src / bdrem / Renderer / HtmlTable.php
index 2c792f85ee77f9de9d5fbe96126416088f9883aa..68cfd5294bcadcf883162bdda148812743fa4984 100644 (file)
@@ -1,10 +1,44 @@
 <?php
+/**
+ * Part of bdrem
+ *
+ * PHP version 5
+ *
+ * @category  Tools
+ * @package   Bdrem
+ * @author    Christian Weiske <cweiske@cweiske.de>
+ * @copyright 2014 Christian Weiske
+ * @license   http://www.gnu.org/licenses/agpl.html GNU AGPL v3
+ * @link      http://cweiske.de/bdrem.htm
+ */
 namespace bdrem;
 
+/**
+ * Renders events in a HTML table.
+ *
+ * @category  Tools
+ * @package   Bdrem
+ * @author    Christian Weiske <cweiske@cweiske.de>
+ * @copyright 2014 Christian Weiske
+ * @license   http://www.gnu.org/licenses/agpl.html GNU AGPL v3
+ * @version   Release: @package_version@
+ * @link      http://cweiske.de/bdrem.htm
+ */
 class Renderer_HtmlTable extends Renderer
 {
+    /**
+     * HTTP content type
+     * @var string
+     */
     protected $httpContentType = 'text/html; charset=utf-8';
 
+    /**
+     * Render the events in a HTML table
+     *
+     * @param array $arEvents Event objects to render
+     *
+     * @return string HTML table
+     */
     public function render($arEvents)
     {
         $s = <<<HTM
@@ -32,19 +66,22 @@ HTM;
                 $class .= ' next';
             }
             $s .= sprintf(
-                '<tr class="' . trim($class) . '">'
+                '<tr class="h-event ' . trim($class) . '">'
                 . '<td class="icon"></td>'
                 . '<td class="r">%d</td>'
                 . '<td class="r">%s</td>'
-                . '<td>%s</td>'
-                . '<td>%s</td>'
-                . '<td>%s</td>'
+                . '<td class="p-name">%s</td>'
+                . '<td class="p-summary p-category">%s</td>'
+                . '<td class="dt-start">'
+                . '<time class="value" datetime="%s">%s</time>'
+                . '</td>'
                 . '<td>%s</td>'
                 . "</tr>\n",
                 $event->days,
                 $event->age,
                 htmlspecialchars($event->title),
                 htmlspecialchars($event->type),
+                $event->date,
                 $this->getLocalDate($event->date),
                 strftime('%a', strtotime($event->localDate))
             );