Commit ce1cb750 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Improvements to artefact base render_self function



Calling smarty_core() rather than smarty() in this function is more
efficient.  Also updates the html template from one designed for
rendering views to something more appropriate.

Change-Id: I877e175a3095c53c89c341bcac6eaa12c942a4bb
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent ac249bf5
......@@ -681,12 +681,12 @@ abstract class ArtefactType {
* A dummy method, giving graceful output, if this method is not implemented in the relevant child class
*/
public function render_self($options) {
$smarty = smarty();
$smarty->assign('viewtitle', $this->get('title'));
$smarty->assign('viewdescription', $this->get('description'));
$smarty = smarty_core();
$smarty->assign('title', $this->get('title'));
$smarty->assign('description', $this->get('description'));
return array(
'html' => $smarty->fetch('view/viewcontent.tpl'),
'html' => $smarty->fetch('artefact.tpl'),
'javascript'=>''
);
}
......
<h2>{$title}</h2>
<p>{$description|clean_html|safe}</p>
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