Commit 1f934e13 authored by Robert Lyon's avatar Robert Lyon

Bug 1850566: Render the profile page in new layout if needed


Change-Id: Ia343293ff05362e9e59c6f758b6a3a0d574c7e16
Signed-off-by: Robert Lyon's avatarRobert Lyon <>
parent 8b1df015
......@@ -33,8 +33,13 @@ class HtmlExportInternal extends HtmlExportArtefactPlugin {
$smarty->assign('breadcrumbs', array(array('text' => 'Profile page', 'path' => 'profilepage.html')));
$view = $this->exporter->get('user')->get_profile_view();
$outputfilter = new HtmlExportOutputFilter('../../', $this->exporter);
$smarty->assign('view', $outputfilter->filter($view->build_rows(false, true)));
if (!$view->uses_new_layout()) {
$smarty->assign('view', $outputfilter->filter($view->build_rows(false, true)));
else {
$smarty->assign('newlayout', true);
$smarty->assign('blocks', $view->get_blocks(false, true));
$content = $smarty->fetch('export:html/internal:profilepage.tpl');
if (!file_put_contents($this->fileroot . 'profilepage.html', $content)) {
throw new SystemException("Unable to write profile page");
{include file="export:html:header.tpl"}
{if $newlayout}
$(function () {
var options = {
verticalMargin: 10,
float: true,
ddPlugin: false,
var grid = $('.grid-stack');
grid = $('.grid-stack').data('gridstack');
// should add the blocks one by one
var blocks = {json_encode arg=$blocks};
loadGrid(grid, blocks);
<div class="container-fluid">
<div class="grid-stack">
{include file="export:html:footer.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