Commit 2046f3d8 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Merged 6a4c3e325dc54dedfc7cabbffdd03e2a792d0b15

parent 90d88b20
......@@ -874,6 +874,14 @@ class ArtefactTypeImage extends ArtefactTypeFile {
else {
$height = $this->get('height');
}
if ((isset($options['width']) || isset($options['height'])) && isset($options['viewid'])) {
$url = get_config('wwwroot') . 'view/view.php?artefact=' . $this->get('id')
. '&view=' . $options['viewid'];
if (isset($options['path'])) {
$url .= '&path=' . $options['path'];
}
$smarty->assign('url', $url);
}
$smarty->assign('height', $height ? $height : '');
return $smarty->fetch('artefact:file:image_renderfull.tpl');
}
......
{if isset($url)}
<a href="{$url}">
{/if}
<img src="{$src}" width="{$width}" height="{$height}" alt="{$title}">
{if isset($url)}
</a>
{/if}
Supports Markdown
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