issue: display assignments in overview
[minimedit.git] / issue / index.php
index d07a7863af8a57528077c5de10233c5d70d7e61a..419156f70c6ed0909b171223755d1caeb21eaa69 100644 (file)
@@ -14,9 +14,10 @@ if ($id) {
        $Article->title .= ': '.htmlspecialchars($Issue->subject);
        print "<h2>{$Article->title}</h2>\n";
        print $Issue->body;
+       $author = $Issue->author ? new User('profile/'.$Issue->author, FALSE) : NULL;
        printf('<p><em>%s</em>%s <small class=date>%s</small></p>'."\n",
                'Geplaatst',
-               $Issue->author ? " door <strong>{$Issue->author}</strong>" : '',
+               $author ? " door <strong>{$author->name}</strong>" : '',
                showdate(preg_split('/\D/', $Issue->created))
        );
        if ($Issue->assign) {
@@ -60,11 +61,12 @@ $query = $Db->query($sql, [$Page]);
 ob_start();
 print '<ul>';
 while ($row = $query->fetch()) {
-       printf('<li><a href="%s">%s <small class="date">%s</small></a>',
+       printf('<li><a href="%s">%s <small class="date">%s</small>%s</a>',
                "/$Page/{$row->id}/{$row->link}",
                sprintf($row->closed ? '<strike>%s</strike>' : '%s',
                        htmlspecialchars($row->subject)),
-               showdate(array_slice(preg_split('/\D/', $row->updated), 0, 3))
+               showdate(array_slice(preg_split('/\D/', $row->updated), 0, 3)),
+               isset($row->assign) ? ' <em class="right">'.$row->assign.'</em>' : ''
        );
        print "</li>\n";
 }