Commit 67af239e authored by Cecilia Vela Gurovic's avatar Cecilia Vela Gurovic Committed by Gerrit Code Review

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

parents 5f2dc258 1f934e13
...@@ -33,8 +33,13 @@ class HtmlExportInternal extends HtmlExportArtefactPlugin { ...@@ -33,8 +33,13 @@ class HtmlExportInternal extends HtmlExportArtefactPlugin {
$smarty->assign('breadcrumbs', array(array('text' => 'Profile page', 'path' => 'profilepage.html'))); $smarty->assign('breadcrumbs', array(array('text' => 'Profile page', 'path' => 'profilepage.html')));
$view = $this->exporter->get('user')->get_profile_view(); $view = $this->exporter->get('user')->get_profile_view();
$outputfilter = new HtmlExportOutputFilter('../../', $this->exporter); $outputfilter = new HtmlExportOutputFilter('../../', $this->exporter);
if (!$view->uses_new_layout()) {
$smarty->assign('view', $outputfilter->filter($view->build_rows(false, true))); $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'); $content = $smarty->fetch('export:html/internal:profilepage.tpl');
if (!file_put_contents($this->fileroot . 'profilepage.html', $content)) { if (!file_put_contents($this->fileroot . 'profilepage.html', $content)) {
throw new SystemException("Unable to write profile page"); throw new SystemException("Unable to write profile page");
{include file="export:html:header.tpl"} {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">
{$view|safe} {$view|safe}
{include file="export:html:footer.tpl"} {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