We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 594454ce authored by Robin Millette's avatar Robin Millette

Single anchor to include thumbnail and title for attachment

parent 7923e84f
......@@ -198,23 +198,22 @@ class AttachmentListItem extends Widget
$attr = $this->linkAttr();
$text = $this->linkTitle();
$this->out->element('a', $attr, $text);
$this->out->elementStart('a', $attr);
$this->out->element('span', null, $text);
function showNoticeAttachment()
function showRepresentation() {
$thumbnail = File_thumbnail::staticGet('file_id', $this->attachment->id);
if (!empty($thumbnail)) {
$this->out->elementStart('a', $this->linkAttr()/*'href' => $this->linkTo()*/);
$this->out->element('img', array('alt' => 'nothing to say', 'src' => $thumbnail->url, 'width' => $thumbnail->width, 'height' => $thumbnail->height));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment