Commit 03dc2cc6 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1568631: Adding skins for group homepages



behatnotneeded

Change-Id: Id81a439cf2166ed04663099331540e579feec13c
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
(cherry picked from commit 3b193503)
(cherry picked from commit 62744917)
parent c9b8ff02
......@@ -80,11 +80,25 @@ $inlinejs = "addLoadEvent( function() {\n" . join("\n", $blocktype_js['initjs'])
$headers = array_merge($headers, $view->get_all_blocktype_css());
// Set up skin, if the page has one
$viewskin = $view->get('skin');
$owner = $view->get('owner');
$issiteview = $view->get('institution') == 'mahara';
if ($viewskin && get_config('skins') && can_use_skins($owner, false, $issiteview) && (!isset($THEME->skins) || $THEME->skins !== false)) {
$skin = array('skinid' => $viewskin, 'viewid' => $view->get('id'));
}
else {
$skin = false;
}
$smarty = smarty(
$javascript,
$headers,
array(),
array('stylesheets' => array('style/views.css'))
array(
'stylesheets' => array('style/views.css'),
'skin' => $skin,
)
);
......
......@@ -297,7 +297,6 @@ $owner = $view->get('owner');
$issiteview = $view->get('institution') == 'mahara';
if ($viewskin && get_config('skins') && can_use_skins($owner, false, $issiteview) && (!isset($THEME->skins) || $THEME->skins !== false)) {
$skin = array('skinid' => $viewskin, 'viewid' => $view->get('id'));
$skindata = unserialize(get_field('skin', 'viewskin', 'id', $viewskin));
}
else {
$skin = false;
......
......@@ -230,7 +230,6 @@ $viewskin = $view->get('skin');
$issiteview = $view->get('institution') == 'mahara';
if ($viewskin && get_config('skins') && can_use_skins($owner, false, $issiteview) && (!isset($THEME->skins) || $THEME->skins !== false)) {
$skin = array('skinid' => $viewskin, 'viewid' => $view->get('id'));
$skindata = unserialize(get_field('skin', 'viewskin', 'id', $viewskin));
}
else {
$skin = false;
......
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