Commit 1885a18d authored by Lisa Seeto's avatar Lisa Seeto

Bug 1827811: Notes block

do not show note contents when displayed in a modal.
if comments not allowed but license metadata is on, display details link and open model with license data.
make small change to setting of licensemetadata smarty variable
get rid of comments/details links and use the new block header instead.

Change-Id: I9183292278d06a3766ae08b0376237fda8d7206c
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
parent 8df0061e
......@@ -66,7 +66,9 @@ class PluginBlocktypeTextbox extends MaharaCoreBlocktype {
list($commentcount, $comments) = ArtefactTypeComment::get_artefact_comments_for_view($artefact, $view, $instance->get('id'), true, $editing, $versioning);
$smarty->assign('commentcount', $commentcount);
$smarty->assign('comments', $comments);
$smarty->assign('license', (int)get_config('licensemetadata'));
$smarty->assign('blockid', $instance->get('id'));
$smarty->assign('artefactid', $artefact->get('id'));
return $smarty->fetch('blocktype:textbox:content.tpl');
}
......
......@@ -1009,6 +1009,7 @@ class ArtefactTypeHtml extends ArtefactType {
}
$smarty->assign('view', (isset($options['viewid']) ? $options['viewid'] : null));
$smarty->assign('modal', (isset($options['modal']) ? $options['modal'] : false));
$smarty->assign('artefacttype', $this->get('artefacttype'));
return array(
'html' => $smarty->fetch('artefact.tpl'),
'javascript'=>''
......
......@@ -5,7 +5,9 @@
</p>
{/if}
{if $modal && !$artefacttype == 'html'}
<p>{$description|clean_html|safe}</p>
{/if}
{if isset($attachments)}
<div class="has-attachment card collapsible">
......
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