Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
mahara
mahara
Commits
67af239e
Commit
67af239e
authored
Oct 31, 2019
by
Cecilia Vela Gurovic
Committed by
Gerrit Code Review
Oct 31, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Bug 1850566: Render the profile page in new layout if needed"
parents
5f2dc258
1f934e13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
3 deletions
+30
-3
htdocs/artefact/internal/export/html/lib.php
htdocs/artefact/internal/export/html/lib.php
+7
-2
htdocs/theme/raw/plugintype/artefact/internal/export/html/templates/profilepage.tpl
...e/artefact/internal/export/html/templates/profilepage.tpl
+23
-1
No files found.
htdocs/artefact/internal/export/html/lib.php
View file @
67af239e
...
...
@@ -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"
);
...
...
htdocs/theme/raw/plugintype/artefact/internal/export/html/templates/profilepage.tpl
View file @
67af239e
{
include
file
=
"export:html:header.tpl"
}
{
if
$newlayout
}
<script>
$
(
function
()
{
var
options
=
{
verticalMargin
:
10
,
float
:
true
,
ddPlugin
:
false
,
};
var
grid
=
$
(
'
.grid-stack
'
);
grid
.
gridstack
(
options
);
grid
=
$
(
'
.grid-stack
'
).
data
(
'
gridstack
'
);
// should add the blocks one by one
var
blocks
=
{
json_encode
arg
=
$blocks
}
;
loadGrid
(
grid
,
blocks
);
jQuery
(
document
).
trigger
(
'
blocksloaded
'
);
});
</script>
<div
class=
"container-fluid"
>
<div
class=
"grid-stack"
>
</div>
</div>
{
else
}
{
$view
|
safe
}
{/
if
}
{
include
file
=
"export:html:footer.tpl"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment