Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
6343d5f2
Commit
6343d5f2
authored
Nov 19, 2014
by
Robert Lyon
Committed by
Gerrit Code Review
Nov 19, 2014
Browse files
Merge "Adding comment display to folder artefact (Bug #1037531)"
parents
ca3c2d92
318c7051
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/blocktype/folder/lib.php
View file @
6343d5f2
...
...
@@ -47,13 +47,24 @@ class PluginBlocktypeFolder extends PluginBlocktype {
// This can be either an image or profileicon. They both implement
// render_self
$result
=
''
;
if
(
isset
(
$configdata
[
'artefactid'
]))
{
$folder
=
$instance
->
get_artefact_instance
(
$configdata
[
'artefactid'
]);
$result
=
$folder
->
render_self
(
$configdata
);
$artefactid
=
isset
(
$configdata
[
'artefactid'
])
?
$configdata
[
'artefactid'
]
:
null
;
if
(
$artefactid
)
{
$artefact
=
$instance
->
get_artefact_instance
(
$artefactid
);
$result
=
$artefact
->
render_self
(
$configdata
);
$result
=
$result
[
'html'
];
}
return
$result
;
require_once
(
get_config
(
'docroot'
)
.
'artefact/comment/lib.php'
);
require_once
(
get_config
(
'docroot'
)
.
'lib/view.php'
);
$view
=
new
View
(
$configdata
[
'viewid'
]);
list
(
$commentcount
,
$comments
)
=
ArtefactTypeComment
::
get_artefact_comments_for_view
(
$artefact
,
$view
,
$instance
->
get
(
'id'
));
}
$smarty
=
smarty_core
();
if
(
$artefactid
)
{
$smarty
->
assign
(
'commentcount'
,
$commentcount
);
$smarty
->
assign
(
'comments'
,
$comments
);
}
$smarty
->
assign
(
'html'
,
$result
);
return
$smarty
->
fetch
(
'blocktype:folder:folder.tpl'
);
}
public
static
function
has_config
()
{
...
...
htdocs/artefact/file/blocktype/folder/theme/raw/folder.tpl
0 → 100644
View file @
6343d5f2
{
$html
|
safe
}
{
if
$commentcount
||
$commentcount
===
0
}
{
$comments
|
safe
}
{/
if
}
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