Commit 14a19d55 authored by Richard Mansfield's avatar Richard Mansfield

Use microheader on view/artefact page for consistency

Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 51008e7e
{include file="header.tpl"}
{if $microheaders}{include file="viewmicroheader.tpl"}{else}{include file="header.tpl"}{/if}
<h2>
<a href="{$WWWROOT}view/view.php?id={$viewid}">{$viewtitle|escape}</a>{if $ownername} {str tag=by section=view}
......@@ -30,4 +30,4 @@
<div>{$objectionform}</div>
</div>
{include file="footer.tpl"}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
\ No newline at end of file
......@@ -146,6 +146,20 @@ $smarty->assign('artefact', $content);
$smarty->assign('artefactpath', $artefactpath);
$smarty->assign('INLINEJAVASCRIPT', $javascript);
if (get_config('viewmicroheaders')) {
$smarty->assign('microheaders', true);
$smarty->assign('microheadertitle', $view->display_title(true, false));
if ($USER->is_logged_in()) {
$smarty->assign('userdisplayname', display_name($USER, null, true));
if (!empty($_SERVER['HTTP_REFERER'])) {
$page = get_config('wwwroot') . 'view/artefact.php?id=' . $artefactid . '&view=' . $viewid;
if ($_SERVER['HTTP_REFERER'] != $page) {
$smarty->assign('backurl', $_SERVER['HTTP_REFERER']);
}
}
}
}
$smarty->assign('viewid', $viewid);
$smarty->assign('viewtitle', $view->get('title'));
$smarty->assign('feedback', $feedback);
......
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