Commit f7431a3a authored by Lisa Seeto's avatar Lisa Seeto

Bug 1827811: Journal changes

Journal changes:
Change the modal contents to not show post contents or attached files.
Recent posts and Tagged posts (if not in full display) now expandable with post contents and comment links.
Attached files on page block now links only to download and not to display further metadata.
Cleaned up artefact.php links.
remove metada that will show on entry on page from also showing in modal
stop background page scrolling when the modal is opened and "Advanced licensing" is selected.
add the blogpost_render_in_modal.tpl file
get rid of scrolling for data-toggle collapse
add block-header to journal, journal entry
add titles as modal links for recent posts and tagged journal entries
add comments and details icons for recent posts and tagged journal entries
fix things from code review

behatnotneeded

Change-Id: Ic63ebf9fe42e7848559b5e009584fdff0a40770f
Signed-off-by: default avatarLisa Seeto <lisaseeto@catalyst.net.nz>
parent be7af61f
......@@ -54,7 +54,7 @@ if (!empty($ancestors)) {
$pathitem = artefact_instance_from_id($ancestor);
if (artefact_in_view($pathitem, $viewid)) {
$artefactpath[] = array(
'url' => get_config('wwwroot') . 'view/view.php?id=' . $viewid,
'url' => get_config('wwwroot') . 'artefact/blog/view/index.php?id=' . $pathitem->get('id') ,
'title' => $pathitem->display_title(),
);
$artefactok = true;
......
......@@ -98,8 +98,7 @@ else {
'name' => implode(' ', array($owner[0]->firstname, $owner[0]->lastname)),
'uri' => sanitize_url($personal_site),
);
$link = get_config('wwwroot') . 'artefact/artefact.php?artefact=' .
$artefactid . '&view=' . $viewid;
$link = get_config('wwwroot') . 'artefact/blog/view/index.php?id=' . $artefactid;
$selflink = get_config('wwwroot') . 'artefact/blog/atom.php?artefact=' .
$artefactid . '&view=' . $viewid;
......@@ -176,8 +175,7 @@ else {
}
$posts[] = array(
'title' => $post->get('title'),
'link' => get_config('wwwroot') . 'artefact/artefact.php?artefact=' .
$post->get('id') . '&view=' . $viewid,
'link' => get_config('wwwroot') . 'view/view.php?id=' . $viewid . '&modal=1&artefact=' . $post->get('id'),
'id' => implode(',', array(get_config('wwwroot'), $post->get('id'), $viewid)),
'description' => $post->get('description'),
'mtime' => atom_date($postid->mtime),
......
......@@ -88,8 +88,7 @@ class PluginBlocktypeBlog extends MaharaCoreBlocktype {
$smarty = smarty_core();
if (isset($configdata['viewid'])) {
$artefacturl = get_config('wwwroot') . 'artefact/artefact.php?artefact=' . $blog->get('id') . '&view='
. $configdata['viewid'];
$artefacturl = get_config('wwwroot') . 'view/view.php?id=' . $configdata['viewid'] . '&modal=1&artefact= ' . $blog->get('id');
$smarty->assign('artefacttitle', '<a href="' . $artefacturl . '">' . hsc($blog->get('title')) . '</a>');
if ($exporter && $posts['count'] > $limit) {
$posts['pagination'] = '<a href="' . $artefacturl . '">'
......
......@@ -43,26 +43,28 @@ class PluginBlocktypeBlogpost extends MaharaCoreBlocktype {
$result = '';
$artefactid = isset($configdata['artefactid']) ? $configdata['artefactid'] : null;
$smarty = smarty_core();
if ($artefactid) {
require_once(get_config('docroot') . 'artefact/lib.php');
$artefact = $instance->get_artefact_instance($artefactid);
$smarty->assign('artefactid', $artefactid);
$configdata['hidetitle'] = true;
$configdata['countcomments'] = true;
$configdata['viewid'] = $instance->get('view');
$configdata['blockid'] = $instance->get('id');
$configdata['editing'] = $editing;
$result = $artefact->render_self($configdata);
$result = $result['html'];
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'), true, $editing, $versioning);
}
$smarty = smarty_core();
if ($artefactid) {
$smarty->assign('commentcount', $commentcount);
$smarty->assign('comments', $comments);
$smarty->assign('allowcomments', $artefact->get('allowcomments'));
}
$smarty->assign('editing', $editing);
$smarty->assign('blockid', $instance->get('id'));
$smarty->assign('html', $result);
return $smarty->fetch('blocktype:blogpost:blogpost.tpl');
}
......
......@@ -90,7 +90,7 @@ class PluginBlocktypeRecentposts extends MaharaCoreBlocktype {
$blogids = $configdata['artefactids'];
$artefactids = implode(', ', array_map('db_quote', $blogids));
$mostrecent = get_records_sql_array(
'SELECT a.title, ' . db_format_tsfield('a.ctime', 'ctime') . ', p.title AS parenttitle, a.id, a.parent, ' . db_format_tsfield('a.mtime', 'mtime') . '
'SELECT a.title, a.description, a.allowcomments, ' . db_format_tsfield('a.ctime', 'ctime') . ', p.title AS parenttitle, a.id, a.parent, ' . db_format_tsfield('a.mtime', 'mtime') . '
FROM {artefact} a
JOIN {artefact} p ON a.parent = p.id
JOIN {artefact_blog_blogpost} ab ON (ab.blogpost = a.id AND ab.published = 1)
......@@ -122,6 +122,11 @@ class PluginBlocktypeRecentposts extends MaharaCoreBlocktype {
}
$blog = new ArtefactTypeBlog($data->parent);
$data->parenttitle = $blog->display_title();
$data->commentcount = count_records_select('artefact_comment_comment', "onartefact = ? AND private = ? AND deletedby IS NULL AND hidden= ?", array($data->id, 0, 0));
if ($tags = ArtefactType::artefact_get_tags($data->id)) {
$data->tags = $tags;
}
$data->owner = $blog->get('owner');
}
$smarty = smarty_core();
......@@ -129,6 +134,9 @@ class PluginBlocktypeRecentposts extends MaharaCoreBlocktype {
$smarty->assign('view', $instance->get('view'));
$smarty->assign('blockid', $instance->get('id'));
$smarty->assign('editing', $editing);
$smarty->assign('licensemetadata', get_config('licensemetadata') ? true : false);
$smarty->assign('canviewblog', $data->owner == $USER->get('id'));
if ($editing) {
// Get id and title of configued blogs
$recentpostconfigdata = $instance->get('configdata');
......
......@@ -184,6 +184,7 @@ class PluginBlocktypeTaggedposts extends MaharaCoreBlocktype {
$smarty = smarty_core();
$smarty->assign('view', $view);
$smarty->assign('licensemetadata', get_config('licensemetadata') ? true : false);
$viewownerdisplay = null;
// Display all posts, from all blogs, owned by this user
$tagsin = $tagsout = array();
......@@ -234,6 +235,7 @@ class PluginBlocktypeTaggedposts extends MaharaCoreBlocktype {
// get comments for this post
$result->commentcount = count_records_select('artefact_comment_comment', "onartefact = {$result->id} AND private = 0 AND deletedby IS NULL AND hidden=0");
$allowcomments = $artefact->get('allowcomments');
$smarty->assign('allowcomments', $allowcomments);
if (empty($result->commentcount) && empty($allowcomments)) {
$result->commentcount = null;
}
......
......@@ -101,7 +101,9 @@ $string['postbodydesc'] = ' ';
$string['postedon'] = 'Posted on';
$string['updatedon'] = 'Last updated';
$string['postedbyon'] = 'Posted by %s on %s';
$string['postedby'] = 'Posted by';
$string['posttitle'] = 'Title';
$string['createdin'] = 'Created in';
$string['posts'] = 'entries';
$string['nposts'] = array(
'1 entry',
......
......@@ -343,28 +343,20 @@ class ArtefactTypeBlog extends ArtefactType {
$template = 'artefact:blog:viewposts.tpl';
$baseurl = get_config('wwwroot') . 'artefact/artefact.php?artefact=' . $this->id;
if (!empty($options['viewid'])) {
$baseurl .= '&view=' . $options['viewid'];
}
$pagination = array(
'baseurl' => $baseurl,
//baseurl will be set in the jsonscript
'baseurl' => '',
'id' => 'blogpost_pagination',
'datatable' => 'postlist',
'jsonscript' => 'artefact/blog/posts.json.php',
);
ArtefactTypeBlogpost::render_posts($posts, $template, $options, $pagination);
$smarty = smarty_core();
if (isset($options['viewid'])) {
$smarty->assign('artefacttitle', '<a href="' . get_config('wwwroot') . 'artefact/artefact.php?artefact='
. $this->get('id') . '&view=' . $options['viewid']
. '">' . hsc($this->get('title')) . '</a>');
$smarty->assign('view', $options['viewid']);
}
else {
$smarty->assign('artefacttitle', hsc($this->get('title')));
$smarty->assign('view', null);
}
......@@ -873,19 +865,8 @@ class ArtefactTypeBlogPost extends ArtefactType {
}
$smarty->assign('notpublishedblogpost', $notpublishedblogpoststr);
}
$artefacturl = get_config('wwwroot') . 'artefact/artefact.php?artefact=' . $this->get('id');
if (isset($options['viewid'])) {
$artefacturl .= '&view=' . $options['viewid'];
}
$smarty->assign('artefacturl', $artefacturl);
if (empty($options['hidetitle'])) {
if (isset($options['viewid'])) {
$smarty->assign('artefacttitle', '<a href="' . $artefacturl . '">' . hsc($this->get('title')) . '</a>');
}
else {
$smarty->assign('artefacttitle', hsc($this->get('title')));
}
}
$smarty->assign('artefacttitle', hsc($this->get('title')));
// We need to make sure that the images in the post have the right viewid associated with them
$postcontent = $this->get('description');
......@@ -903,6 +884,9 @@ class ArtefactTypeBlogPost extends ArtefactType {
else {
$smarty->assign('license', false);
}
$smarty->assign('commentsallowed', $this->get('allowcomments'));
$smarty->assign('licensemetadata', get_config('licensemetadata') ? true : false);
$smarty->assign('editing', isset($options['editing']) ? $options['editing'] : false);
$attachments = $this->get_attachments();
if ($attachments) {
......@@ -911,7 +895,6 @@ class ArtefactTypeBlogPost extends ArtefactType {
$f = artefact_instance_from_id($attachment->id);
$attachment->size = $f->describe_size();
$attachment->iconpath = $f->get_icon(array('id' => $attachment->id, 'viewid' => isset($options['viewid']) ? $options['viewid'] : 0));
$attachment->viewpath = get_config('wwwroot') . 'artefact/artefact.php?artefact=' . $attachment->id . '&view=' . (isset($options['viewid']) ? $options['viewid'] : 0);
$attachment->downloadpath = get_config('wwwroot') . 'artefact/file/download.php?file=' . $attachment->id;
if (isset($options['viewid'])) {
$attachment->downloadpath .= '&view=' . $options['viewid'];
......@@ -928,7 +911,25 @@ class ArtefactTypeBlogPost extends ArtefactType {
if ($this->ctime != $this->mtime) {
$smarty->assign('updatedon', get_string('updatedon', 'artefact.blog') . ' ' . format_date($this->mtime));
}
return array('html' => $smarty->fetch('artefact:blog:render/blogpost_renderfull.tpl'),
if (!empty($options['modal'])) {
if ($parent = artefact_instance_from_id($this->get('parent'))) {
$smarty->assign('parentblogtitle', $parent->get('title'));
}
if ($this->get('owner') != $USER->get('id')) {
$smarty->assign('postedby', $by);
}
$smarty->assign('postedon', format_date($this->ctime));
if ($this->ctime != $this->mtime) {
$smarty->assign('lastmodifieddate', format_date($this->mtime));
}
if (isset($options['viewid'])) {
$smarty->assign('view', $options['viewid']);
}
}
$template = empty($options['modal']) ? 'artefact:blog:render/blogpost_renderfull.tpl' : 'artefact:blog:render/blogpost_render_in_modal.tpl';
return array('html' => $smarty->fetch($template),
'javascript' => '',
'attachments' => $attachments);
}
......@@ -1083,6 +1084,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
require_once(get_config('docroot') . 'lib/view.php');
$view = new View($viewoptions['viewid']);
$artefact = artefact_instance_from_id($post->id);
if (!isset ($viewoptions['versioning'])) {
$viewoptions['versioning'] = false;
}
......@@ -1129,6 +1131,8 @@ class ArtefactTypeBlogPost extends ArtefactType {
$smarty = smarty_core();
$smarty->assign('options', $options);
$smarty->assign('posts', $posts['data']);
$smarty->assign('modal', (isset($options['modal']) ? $options['modal'] : false));
$smarty->assign('license', get_config('licensemetadata') ? true : false);
$posts['tablerows'] = $smarty->fetch($template);
......
......@@ -43,31 +43,5 @@ if ($blockid = param_integer('block', null)) {
);
ArtefactTypeBlogpost::render_posts($posts, $template, $configdata, $pagination);
}
else {
// No block, we're just rendering the blog by itself.
$limit = param_integer('limit', ArtefactTypeBlog::pagination);
$blogid = param_integer('artefact');
$viewid = param_integer('view');
if (!can_view_view($viewid)) {
json_reply(true, get_string('accessdenied', 'error'));
}
$options = array(
'viewid' => $viewid,
'countcomments' => true,
);
$posts = ArtefactTypeBlogpost::get_posts($blogid, $limit, $offset, $options);
$template = 'artefact:blog:viewposts.tpl';
$baseurl = get_config('wwwroot') . 'artefact/artefact.php?artefact=' . $blogid . '&view=' . $viewid;
$pagination = array(
'baseurl' => $baseurl,
'id' => 'blogpost_pagination',
'datatable' => 'postlist',
'jsonscript' => 'artefact/blog/posts.json.php',
);
ArtefactTypeBlogpost::render_posts($posts, $template, $options, $pagination);
}
json_reply(false, array('data' => $posts));
......@@ -1608,7 +1608,7 @@ function delete_comment_submit(Pieform $form, $values) {
$commentoptions->artefact = $artefact;
$commentoptions->blockid = $blockid;
if (isset($values['threaded'])) {
$commentoptions->threaded = $values['threaded'];
$commentoptions->threaded = $values['threaded'];
}
$newlist = ArtefactTypeComment::get_comments($commentoptions);
......
......@@ -1403,7 +1403,7 @@ class BlockInstance {
$artefact = $this->get_artefact_instance($configdata['artefactid']);
$smarty->assign('allowcomments', $artefact->get('allowcomments'));
if (!$artefact->get('allowcomments')) {
$smarty->assign('allowdetails', (int)get_config('licensemetadata'));
$smarty->assign('justdetails', (int)get_config('licensemetadata'));
}
else {
$commentoptions = ArtefactTypeComment::get_comment_options();
......
......@@ -1227,7 +1227,9 @@ $(function() {
jQuery(function($) {
$(document).on('click', 'a', function(event) {
if ($(this.hash).length && location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') &&
!$(this).is('[class^="carousel"]')) {
!$(this).is('[class^="carousel"]') &&
!$(this).is('[data-toggle="collapse"]') &&
!($('body').hasClass('modal-open'))) {
event.preventDefault();
var target = $(this.hash);
var headerheight = 0;
......
......@@ -84,6 +84,9 @@ function addFeedbackSuccess(form, data) {
var commentlink = ' ' + get_string('commentsanddetails', 'artefact.comment', data.data.count);
$('.commentlink').filter('[data-artefactid=' + data.data.artefact + ']').html('<span class="icon icon-comments" role="presentation" aria-hidden="true"></span>' + commentlink);
//For brief comments and details previews when there is no block comments and details header
$('.comment-count-preview').filter('[data-artefactid=' + data.data.artefact + ']').html('<span class="icon icon-comments" role="presentation" aria-hidden="true"></span> (' + data.data.count + ')');
resetFeedbackReplyto();
formSuccess(form, data);
......@@ -240,11 +243,18 @@ function delete_comment_from_modal_submit(form, data) {
newlink += '<span class="bh-margin-left icon icon-link" role="presentation" aria-hidden="true"></span>';
newlink += ' ' + get_string('Details', 'artefact.comment');
$('.commentlink').filter('[data-artefactid=' + data.data.artefact + ']').html(newlink);
//For brief comments and details previews when there is no block comments and details header
$('.comment-count-preview').filter('[data-artefactid=' + data.data.artefact + ']').html('');
}
else {
var commentlink = ' ' + get_string('commentsanddetails', 'artefact.comment', data.data.count);
$('.commentlink').filter('[data-artefactid=' + data.data.artefact + ']').html('<span class="icon icon-comments" role="presentation" aria-hidden="true"></span>' + commentlink);
//For brief comments and details previews when there is no block comments and details header
$('.comment-count-preview').filter('[data-artefactid=' + data.data.artefact + ']').html('<span class="icon icon-comments" role="presentation" aria-hidden="true"></span> (' + data.data.count + ')');
}
if ($('#configureblock').hasClass('closed')) {
formSuccess(form, data);
}
......@@ -314,10 +324,12 @@ jQuery(function($) {
if (!$('#details-btn').hasClass('active')) {
$('#details-btn').addClass('active');
headers.removeClass('d-none');
$('.comments-details').removeClass('d-none');
}
else {
$('#details-btn').removeClass('active');
headers.addClass('d-none');
$('.comments-details').addClass('d-none');
}
});
......
......@@ -881,6 +881,7 @@ $string['more...'] = 'More...';
$string['moreoptions'] = 'More options';
$string['moreoptionsfor'] = 'More options for "%s"';
$string['details'] = 'details';
$string['Details'] = 'Details';
$string['nohelpfound'] = 'There was no help found for this item.';
$string['nohelpfoundpage'] = 'There was no help found for this page.';
$string['couldnotgethelp'] = 'An error occurred trying to retrieve the help page.';
......
{if !$editing}
{if !$allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$artefactid
blockid=$blockid
commentcount=$commentcount
allowcomments=$allowcomments
justdetails=$justdetails}
{/if}
{$html|safe}
{$comments|safe}
\ No newline at end of file
......@@ -26,27 +26,58 @@
<div class="recentblogpost list-group">
{foreach from=$mostrecent item=post}
<div class="list-group-item">
<a class="modal_link outer-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$post->id}">
<a class="outer-link collapsed" data-toggle="collapse" href="#recent_post_{$post->id}" aria-expanded="false">
<span class="sr-only">{$post->title}</span>
</a>
<h4 class="list-group-item-heading text-inline">
{$post->title}
<h4 class={if !($editing)}"list-group-item-heading text-inline"{else}"title"{/if}>
{if !($editing)}
<a class="modal_link inner-link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$post->id}">
{$post->title}
</a>
{else}
{$post->title}
{/if}
</h4>
<span class="text-small">
{str tag='postedin' section='blocktype.blog/recentposts'}
<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->parent}&amp;view={$view}" class="inner-link">
{$post->parenttitle}
</a>
</span>
<span class="metadata">
{str tag='postedon' section='blocktype.blog/recentposts'}
{$post->displaydate}
<br>
{if $post->updateddate}
{str tag='updatedon' section='blocktype.blog/recentposts'}
{$post->updateddate}
<span class="comments-details d-none comments-details-mg-left comment-count-preview" data-artefactid="{$post->id}">
{if $post->commentcount > 0}
<span class="comment_count" role="presentation" aria-hidden="true"></span>
<span class="icon icon-comments" role="presentation" aria-hidden="true"></span>
({$post->commentcount})
{/if}
</span>
<span class="comments-details d-none icon icon-search-plus bh-margin-left" role="presentation" aria-hidden="true"></span>
<div>
<span class="text-small">
{str tag='postedin' section='blocktype.blog/recentposts'}
{if $canviewblog}
<a href="{$WWWROOT}artefact/blog/view/index.php?id={$post->parent}" class="inner-link">
{$post->parenttitle}
</a>
{else}
{$post->parenttitle}
{/if}
</span>
<span class="metadata">
{str tag='postedon' section='blocktype.blog/recentposts'}
{$post->displaydate}
<br>
{if $post->updateddate}
{str tag='updatedon' section='blocktype.blog/recentposts'}
{$post->updateddate}
{/if}
</span>
</div>
<span class="icon icon-chevron-down collapse-indicator float-right" role="presentation" aria-hidden="true"></span>
</div>
<div id="recent_post_{$post->id}" class="collapse content-text">
{if $post->tags}
<div class="tags metadata">
<span class="icon icon-tags left" role="presentation" aria-hidden="true"></span>
<strong>{str tag=tags}:</strong>
{list_tags owner=$post->owner tags=$post->tags}
</div>
{/if}
<span>{$post->description|safe}</span>
</div>
{/foreach}
</div>
......@@ -40,9 +40,7 @@
{foreach from=$results item=post}
<div class="post list-group-item">
<h4 class="list-group-heading">
<a class="modal_link list-group-heading" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$post->id}">
{$post->title}
</a>
{$post->title}
</h4>
<div class="postdetails metadata">
<span class="icon icon-regular icon-calendar-alt left" role="presentation" aria-hidden="true"></span>
......@@ -57,21 +55,9 @@
<div class="detail list-group-item-detail">
{$post->description|clean_html|safe}
</div>
{if $post->attachments}
{$post->attachments|safe}
{/if}
{if !$editing}
{if $post->commentcount != null}
<div class="comments clearfix">
<a id="comment_link_{$post->id}" class="commentlink link-blocktype" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$post->id}">
<span class="icon icon-comments" role="presentation" aria-hidden="true"></span>
{str tag=commentsanddetails section=artefact.comment arg1=$post->commentcount}
</a>
</div>
{/if}
{/if}
</div>
{/foreach}
</div>
......@@ -80,10 +66,27 @@
<div class="taggedposts list-group">
{foreach from=$results item=post}
<div class="list-group-item">
<h4 class="list-group-item-heading">
<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&amp;view={$view}">
<a class="outer-link collapsed" data-toggle="collapse" href="#tagged_post_{$post->id}" aria-expanded="false">
<span class="sr-only">{$post->title}</span>
</a>
<h4 class={if !($editing)}"list-group-item-heading text-inline"{else}"title"{/if}>
{if !($editing)}
<a class="modal_link inner-link list-group-heading" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$blockid}" data-artefactid="{$post->id}">
{$post->title}
</a>
{else}
{$post->title}
</a>
{/if}
</h4>
<span class="comments-details d-none comments-details-mg-left comment-count-preview" data-artefactid="{$post->id}">
{if $post->commentcount > 0}
<span class="comment_count" role="presentation" aria-hidden="true"></span>
<span class="icon icon-comments" role="presentation" aria-hidden="true"></span>
({$post->commentcount})
{/if}
</span>
<span class="comments-details d-none icon icon-search-plus bh-margin-left" role="presentation" aria-hidden="true"></span>
<div>
<span class="metadata">
{str tag='postedon' section='blocktype.blog/taggedposts'}
{$post->displaydate}
......@@ -93,7 +96,11 @@
{$post->updateddate}
{/if}
</span>
</h4>
</div>
<span class="icon icon-chevron-down collapse-indicator float-right" role="presentation" aria-hidden="true"></span>
</div>
<div id="tagged_post_{$post->id}" class="collapse content-text">
<span>{$post->description|safe}</span>
</div>
{/foreach}
</div>
......
......@@ -8,9 +8,6 @@
{str tag='shortcutnewentry' section='artefact.blog'}
</a>
{/if}
{if !$options.hidetitle}
<h2>{$artefacttitle|safe}</h2>
{/if}
<div id="blogdescription" class="content-text">{$description|clean_html|safe}
{if $tags}
......
<table class="filedata table-sm modal-segment-heading">
<tr>
<th>{str tag=createdin section=artefact.blog}:</th>
<td>{$parentblogtitle}</td>
</tr>
{if $postedby}
<tr>
<th>{str tag=postedby section=artefact.blog}:</th>
<td>{$postedby}</td>
</tr>
{/if}
<tr>
<th>{str tag=postedon section=artefact.blog}:</th>
<td>{$postedon}</td>
</tr>
{if $lastmodifieddate}
<tr>
<th>{str tag=updatedon section=artefact.blog}:</th>
<td>{$lastmodifieddate}</td>
</tr>
{/if}
{if $artefacttags}
<tr>
<th>{str tag=tags section=mahara}:</th>
<td>{list_tags owner=$owner tags=$artefacttags view=$view}</td>
</tr>
{/if}
{if $license}
<tr>
<th>{str tag=License section=artefact.file}:</th>
<td>{$license|safe}</td>
</tr>
{/if}
</table>
......@@ -26,9 +26,9 @@
{/if}
<span class="title list-group-item-heading inline">
<a href="{$item->viewpath}" class="inner-link">
<span class="inner-link">
{$item->title}
</a>
</span>
<span class="metadata"> -
[{$item->size|display_size}]
</span>
......
......@@ -5,9 +5,9 @@
<div id="blogpost-{$postid}" class="card-body flush">
{if $artefacttitle && $simpledisplay}
<h2 class="title">
{$artefacttitle|safe}
</h2>
<h2 class="title">
{$artefacttitle|safe}
</h2>
{/if}
<div class="postdetails metadata">
......@@ -21,29 +21,31 @@
</div>
{if $artefacttags}
<div class="tags metadata">
<span class="icon icon-tags" role="presentation" aria-hidden="true"></span>
<strong>{str tag=tags}:</strong>
{list_tags owner=$artefactowner tags=$artefacttags view=$artefactview}
</div>
<div class="tags metadata">
<span class="icon icon-tags" role="presentation" aria-hidden="true"></span>
<strong>{str tag=tags}:</strong>
{list_tags owner=$artefactowner tags=$artefacttags view=$artefactview}
</div>
{/if}
<div class="postcontent">
{$artefactdescription|clean_html|safe}
{$artefactdescription|clean_html|safe}
</div>
{if $license}
<div class="license">
{$license|safe}
</div>
<div class="license">
{$license|safe}
</div>
{/if}
{if isset($attachments)}
{if isset($attachments) && !$modal}
{include file="artefact:blog:render/blogpost_renderattachments.tpl" attachments=$attachments postid=$postid}
{/if}
</div>
{else}
<div>
{$notpublishedblogpost|safe}
</div>
<div>
{$notpublishedblogpost|safe}
</div>
{/if}
{foreach from=$posts item=post}
{if !$options.editing}
{if !$post->allowcomments}
{assign var="justdetails" value=true}
{/if}
{include
file='header/block-comments-details-header.tpl'
artefactid=$post->id
blockid=$options.blockid
commentcount=$post->commentcount
allowcomments=$post->allowcomments
justdetails=$justdetails}
{/if}
<div class="post list-group-item clearfix flush">
<div class="post-heading">
<h4 class="title">
<a class="modal_link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$options.blockid}" data-artefactid="{$post->id}">
{if !$options.editing}
<a class="modal_link" data-toggle="modal-docked" data-target="#configureblock" href="#" data-blockid="{$options.blockid}" data-artefactid="{$post->id}">