Commit e174049b authored by Robert Lyon's avatar Robert Lyon

Bug 1588606: Properly checking for site templates

An oversite when Bug 1397110 was tested

behatnotneeded

Change-Id: I1772d27bb1ec099a26149551f82cf6ea365bb780
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent d8285e3e
......@@ -20,11 +20,14 @@
</a>
{/if}
</div>
{if !$issitetemplate}
<div class="with-heading">
{if !$issitetemplate}
<a href="{$displaylink}">
{str tag=displayview section=view}
</a>
{else}
&nbsp;
{/if}
{if $edittitle || $viewtype == 'profile'}
<a href="{$WWWROOT}view/access.php?id={$viewid}{if $collectionid}&collection={$collectionid}{/if}{if $new}&new=1{/if}">
<span class="icon icon-unlock-alt" role="presentation" aria-hidden="true"></span>
......@@ -32,5 +35,4 @@
</a>
{/if}
</div>
{/if}
......@@ -88,7 +88,7 @@ else if ($view->get('type') == 'dashboard') {
}
else if ($view->get('type') == 'grouphomepage') {
$title = get_string('grouphomepage', 'view');
if ($view->get('template') !== View::SITE_TEMPLATE) {
if ($view->get('template') != View::SITE_TEMPLATE) {
$groupurl = group_homepage_url(get_record('group', 'id', $view->get('group')), false);
}
define('TITLE', $title);
......@@ -292,6 +292,6 @@ else {
}
$smarty->assign('issiteview', isset($institution) && ($institution == 'mahara'));
$smarty->assign('isssitetemplate', ($view->get('template') === View::SITE_TEMPLATE ? true : false));
$smarty->assign('isssitetemplate', ($view->get('template') == View::SITE_TEMPLATE ? true : false));
$smarty->assign('PAGEHEADING', $state);
$smarty->display('view/blocks.tpl');
......@@ -189,7 +189,7 @@ $smarty->assign('edittitle', $view->can_edit_title());
$smarty->assign('displaylink', $view->get_url());
$smarty->assign('new', $new);
$smarty->assign('issiteview', $view->get('institution') == 'mahara');
$smarty->assign('issitetemplate', ($view->get('template') === View::SITE_TEMPLATE ? true : false));
$smarty->assign('issitetemplate', ($view->get('template') == View::SITE_TEMPLATE ? true : false));
$smarty->assign('PAGEHEADING', $state);
$smarty->display('view/layout.tpl');
......
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