Commit 53e16502 authored by Aaron Wells's avatar Aaron Wells Committed by Gerrit Code Review
Browse files

Merge "Bug 1568631: Adding skins for group homepages"

parents 3b5e863e 3b193503
......@@ -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,
)
);
......
......@@ -296,7 +296,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;
......
......@@ -248,7 +248,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