Commit ed5c2891 authored by Pat Kira's avatar Pat Kira Committed by Robert Lyon

Style feedback modal and annotation block (BUG 1465107)

behatnotneeded

Change-Id: I5ac5becac82a0e4801fe095c09d5041bab0fc871
parent 8d2dd779
......@@ -322,8 +322,7 @@ class PluginBlocktypeAnnotation extends SystemBlocktype {
public static function get_instance_javascript(BlockInstance $bi) {
return array(
array(
'file' => 'js/annotation.js',
'initjs' => 'connectAddAnnotationFeedbackForms(); connectAnnotationFeedbackLinks();',
'file' => 'js/annotation.js'
)
);
}
......
......@@ -59,7 +59,7 @@ $elements['message'] = array(
'rules' => array('maxlength' => 8192),
);
$elements['ispublic'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('makepublic', 'artefact.annotation'),
'defaultvalue' => !$annotationfeedback->get('private'),
);
......
......@@ -1099,7 +1099,7 @@ class ArtefactTypeAnnotationfeedback extends ArtefactType {
'rules' => array('maxlength' => 8192),
);
$form['elements']['ispublic'] = array(
'type' => 'checkbox',
'type' => 'switchbox',
'title' => get_string('makepublic', 'artefact.annotation'),
'defaultvalue' => !$defaultprivate,
);
......
......@@ -718,7 +718,7 @@ class ArtefactTypeComment extends ArtefactType {
'class' => 'center',
'url' => $data->baseurl,
'jsonscript' => $data->jsonscript,
'datatable' => ($onview) ? 'feedbacktable' : 'commentlist',
'datatable' => 'feedbacktable',
'count' => $data->count,
'limit' => $data->limit,
'offset' => $data->offset,
......@@ -740,7 +740,6 @@ class ArtefactTypeComment extends ArtefactType {
$form = array(
'name' => 'add_feedback_form',
'method' => 'post',
//'class' => 'js-hidden',
'plugintype' => 'artefact',
'pluginname' => 'comment',
'jsform' => true,
......
......@@ -142,25 +142,26 @@ function updateTextContent(a) {
jQuery('#instconf_tagsreadonly_display').innerHTML = a.safetags;
jQuery('#instconf_makecopy').prop('checked', false);
if (a.editable == 1) {
addElementClass('instconf_textreadonly_header', 'hidden');
addElementClass('instconf_textreadonly_container', 'hidden');
addElementClass('instconf_readonlymsg_container', 'hidden');
addElementClass('instconf_licensereadonly_header', 'hidden');
addElementClass('instconf_licensereadonly_container', 'hidden');
addElementClass('instconf_tagsreadonly_header', 'hidden');
addElementClass('instconf_tagsreadonly_container', 'hidden');
removeElementClass('instconf_text_header', 'hidden');
removeElementClass('instconf_text_container', 'hidden');
jQuery('#instconf_textreadonly_header').addClass('hidden');
jQuery('#instconf_textreadonly_container').addClass('hidden');
jQuery('#instconf_readonlymsg_container').addClass('hidden');
jQuery('#instconf_licensereadonly_header').addClass('hidden');
jQuery('#instconf_licensereadonly_container').addClass('hidden');
jQuery('#instconf_tagsreadonly_header').addClass('hidden');
jQuery('#instconf_tagsreadonly_container').addClass('hidden');
jQuery('#instconf_text_header').removeClass('hidden');
jQuery('#instconf_text_container').removeClass('hidden');
if (jQuery('#instconf_license_header').length) {
// only deal with these if the license metadata is enabled
removeElementClass('instconf_license_header', 'hidden');
removeElementClass('instconf_license_container', 'hidden');
removeElementClass('instconf_license_description', 'hidden');
removeElementClass('instconf_license_advanced_fieldset', 'hidden');
jQuery('#instconf_license_header').removeClass('hidden');
jQuery('#instconf_license_container').removeClass('hidden');
jQuery('#instconf_license_description').removeClass('hidden');
jQuery('#instconf_license_advanced_fieldset').removeClass('hidden');
}
removeElementClass('instconf_tags_header', 'hidden');
removeElementClass('instconf_tags_container', 'hidden');
removeElementClass('instconf_tags_description', 'hidden');
jQuery('#instconf_tags_header').removeClass('hidden');
jQuery('#instconf_tags_container').removeClass('hidden');
jQuery('#instconf_tags_description').removeClass('hidden');
var blockcountmsg = jQuery('#instconf_otherblocksmsg_container');
if (blockcountmsg && jQuery('#textbox_blockcount')) {
var otherblockcount = 0;
......@@ -194,26 +195,26 @@ function updateTextContent(a) {
}
}
else {
addElementClass('instconf_text_header', 'hidden');
addElementClass('instconf_text_container', 'hidden');
addElementClass('instconf_otherblocksmsg_container', 'hidden');
jQuery('#instconf_text_header').addClass('hidden');
jQuery('#instconf_text_container').addClass('hidden');
jQuery('#instconf_otherblocksmsg_container').addClass('hidden');
if (jQuery('#instconf_license_header').length) {
// only deal with these if the license metadata is enabled
addElementClass('instconf_license_header', 'hidden');
addElementClass('instconf_license_container', 'hidden');
addElementClass('instconf_license_description', 'hidden');
addElementClass('instconf_license_advanced_fieldset', 'hidden');
jQuery('#instconf_license_header').addClass('hidden');
jQuery('#instconf_license_container').addClass('hidden');
jQuery('#instconf_license_description').addClass('hidden');
jQuery('#instconf_license_advanced_fieldset').addClass('hidden');
}
addElementClass('instconf_tags_header', 'hidden');
addElementClass('instconf_tags_container', 'hidden');
addElementClass('instconf_tags_description', 'hidden');
removeElementClass('instconf_textreadonly_header', 'hidden');
removeElementClass('instconf_textreadonly_container', 'hidden');
removeElementClass('instconf_readonlymsg_container', 'hidden');
removeElementClass('instconf_licensereadonly_header', 'hidden');
removeElementClass('instconf_licensereadonly_container', 'hidden');
removeElementClass('instconf_tagsreadonly_header', 'hidden');
removeElementClass('instconf_tagsreadonly_container', 'hidden');
jQuery('#instconf_tags_header').addClass('hidden');
jQuery('#instconf_tags_container').addClass('hidden');
jQuery('#instconf_tags_description').addClass('hidden');
jQuery('#instconf_textreadonly_header').removeClass('hidden');
jQuery('#instconf_textreadonly_container').removeClass('hidden');
jQuery('#instconf_readonlymsg_container').removeClass('hidden');
jQuery('#instconf_licensereadonly_header').removeClass('hidden');
jQuery('#instconf_licensereadonly_container').removeClass('hidden');
jQuery('#instconf_tagsreadonly_header').removeClass('hidden');
jQuery('#instconf_tagsreadonly_container').removeClass('hidden');
}
}
connect('chooseartefactlink', 'onclick', function(e) {
......@@ -236,38 +237,38 @@ forEach(getElementsByTagAndClassName('a', 'copytextboxnote', 'instconf'), functi
}
});
jQuery('#instconf_makecopy').prop('checked', true);
addElementClass('instconf_textreadonly_header', 'hidden');
addElementClass('instconf_textreadonly_container', 'hidden');
addElementClass('instconf_readonlymsg_container', 'hidden');
addElementClass('instconf_otherblocksmsg_container', 'hidden');
addElementClass('instconf_licensereadonly_header', 'hidden');
addElementClass('instconf_licensereadonly_container', 'hidden');
addElementClass('instconf_tagsreadonly_header', 'hidden');
addElementClass('instconf_tagsreadonly_container', 'hidden');
removeElementClass('instconf_text_header', 'hidden');
removeElementClass('instconf_text_container', 'hidden');
jQuery('#instconf_textreadonly_header').addClass('hidden');
jQuery('#instconf_textreadonly_container').addClass('hidden');
jQuery('#instconf_readonlymsg_container').addClass('hidden');
jQuery('#instconf_otherblocksmsg_container').addClass('hidden');
jQuery('#instconf_licensereadonly_header').addClass('hidden');
jQuery('#instconf_licensereadonly_container').addClass('hidden');
jQuery('#instconf_tagsreadonly_header').addClass('hidden');
jQuery('#instconf_tagsreadonly_container').addClass('hidden');
jQuery('#instconf_text_header').removeClass('hidden');
jQuery('#instconf_text_container').removeClass('hidden');
if (jQuery('#instconf_license_header').length) {
// only deal with these if the license metadata is enabled
removeElementClass('instconf_license_header', 'hidden');
removeElementClass('instconf_license_container', 'hidden');
removeElementClass('instconf_license_description', 'hidden');
removeElementClass('instconf_license_advanced_fieldset', 'hidden');
jQuery('#instconf_license_header').removeClass('hidden');
jQuery('#instconf_license_container').removeClass('hidden');
jQuery('#instconf_license_description').removeClass('hidden');
jQuery('#instconf_license_advanced_fieldset').removeClass('hidden');
}
removeElementClass('instconf_tags_header', 'hidden');
removeElementClass('instconf_tags_container', 'hidden');
removeElementClass('instconf_tags_description', 'hidden');
jQuery('#instconf_tags_header').removeClass('hidden');
jQuery('#instconf_tags_container').removeClass('hidden');
jQuery('#instconf_tags_description').removeClass('hidden');
});
});
augment_tags_control('instconf_tags');
if (jQuery('#instconf_license').length) {
removeElementClass('instconf_license', 'hidden');
jQuery('#instconf_license').removeClass('hidden');
}
if (jQuery('#instconf_license_advanced_fieldset').length) {
removeElementClass(getFirstElementByTagAndClassName('fieldset', null, 'instconf_license_advanced_fieldset'), 'hidden');
}
if (jQuery('#instconf_artefactids_upload_browse')) {
// addElementClass('instconf_artefactids_upload_browse', 'hidden');
// removeElementClass('instconf_artefactids_open_upload_browse_container', 'hidden');
jQuery('#instconf_artefactids_upload_browse').addClass('hidden');
jQuery('#instconf_artefactids_open_upload_browse_container').removeClass('hidden');
}
EOF;
}
......@@ -378,7 +379,6 @@ EOF;
),
'chooseartefact' => array(
'type' => 'html',
'class' => 'nojs-hidden-block',
'value' => '<a id="chooseartefactlink" href="#" class="btn btn-default">'
. get_string('usecontentfromanothertextbox1', 'blocktype.internal/textbox') . '</a>',
),
......
......@@ -133,7 +133,7 @@ var Paginator = function(id, list, heading, script, extradata) {
this.updateResults = function (data, params, changedPage) {
var container = self.isTable ? getFirstElementByTagAndClassName('tbody', null, self.list) : self.list,
listdata = self.isTable || data.data.tablerows.length ? data.data.tablerows : data.data.html,
listdata = data.data.html ? data.data.html : data.data.tablerows,
paginationdata = data.data.pagination;
if (listdata === undefined || listdata.length === 0) {
......@@ -216,7 +216,7 @@ var Paginator = function(id, list, heading, script, extradata) {
}
// Fire event to let listseners know to reattach listeners
window.dispatchEvent(new Event('pageupdated'));
jQuery(document).trigger('pageupdated', [ data ]);
self.params = params;
};
......
......@@ -70,21 +70,20 @@ function isTinyMceUsed() {
return (typeof(tinyMCE) != 'undefined' && typeof(tinyMCE.get('add_feedback_form_message')) != 'undefined');
}
addLoadEvent(function () {
if ($('toggle_watchlist_link')) {
connect('toggle_watchlist_link', 'onclick', function (e) {
e.stop();
jQuery(function($j) {
if ($j('#toggle_watchlist_link').length) {
$j('#toggle_watchlist_link').click(function (e) {
e.preventDefault();
e.stopPropagation();
if (typeof artefactid === 'undefined') {
artefactid = null;
artefactid = 0;
}
sendjsonrequest(config.wwwroot + 'view/togglewatchlist.json.php', {'view': viewid, 'artefact': artefactid}, 'POST', function(data) {
$('toggle_watchlist_link').innerHTML = data.newtext;
});
});
}
});
jQuery(function($j) {
$j(".copyview").each(function() {
$j(this).click(function(e) {
if (e.target.href.match(/collection=(.*)/)) {
......
......@@ -308,6 +308,11 @@ function ArtefactChooserSelect(artefacts) {
self.init();
}
// reattach listeners when page has finished updating
jQuery(window).on('pageupdated', {}, function(e, data) {
new ArtefactChooserSelect(data.data.artefactdata);
});
new ArtefactChooserSelect(acSelectArtefacts);
EOF;
......
......@@ -51,6 +51,7 @@ function pieform_renderer_div(Pieform $form, $element) {/*{{{*/
if (!isset($element['isformgroup'])) {
$element['isformgroup'] = true;
}
if (isset($element['type'])) {
$element['isformgroup'] = $element['type'] === 'button' ? false : $element['isformgroup'];
}
......@@ -58,7 +59,7 @@ function pieform_renderer_div(Pieform $form, $element) {/*{{{*/
// add form-group classes to all real form fields
$formgroupclass = $element['isformgroup'] ? 'form-group' : '';
if(isset($element['class'])){
if (isset($element['class'])) {
// remove form-control class and btn class (these should be on the element only)
$element['class'] = str_replace("btn-", " ", $element['class']);
......
......@@ -6200,7 +6200,7 @@ function create_view_form($group=null, $institution=null, $template=null, $colle
$form['elements']['submitcollection'] = array(
'type' => 'button',
'usebuttontag' => true,
'class' => 'btn btn-sm btn-default',
'class' => 'btn-sm btn-default',
'value' => get_string('copycollection', 'collection'),
);
}
......@@ -6210,7 +6210,7 @@ function create_view_form($group=null, $institution=null, $template=null, $colle
'value' => $template,
);
$form['elements']['submit']['value'] = get_string('copyview', 'view');
$form['elements']['submit']['class'] = 'btn btn-default btn-sm mrm';
$form['elements']['submit']['class'] = 'btn-default btn-sm mrm';
$form['name'] .= $template;
}
return $form;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -66,8 +66,9 @@ jQuery(function($) {
return '<div class="modal-loading"></div>';
};
dock.init = function(){
$('[data-toggle="modal-docked"]').on('click', function(e){
dock.init = function(scope){
scope.find('[data-toggle="modal-docked"]').on('click', function(e){
e.preventDefault();
var targetID = $(this).attr('data-target'),
......@@ -76,12 +77,15 @@ jQuery(function($) {
dock.show(target, false, true);
});
$('[data-dismiss="modal-docked"]').on('click', function(e){
scope.find('[data-dismiss="modal-docked"]').on('click', function(e){
e.preventDefault();
dock.hide();
});
scope.find('.submitcancel').on('click', function(){
dock.hide();
});
};
dock.init();
dock.init($(document));
});
......@@ -10,7 +10,7 @@ jQuery(function($) {
function init() {
//reattach listeners when page has finished updating
$(window).on('pageupdated',function(){
$(window).on('pageupdated',function() {
attachNotificationEvents();
});
......
......@@ -107,6 +107,15 @@ jQuery(function($) {
}
}
/*
* Initialise masonry for thumbnail gallery
*/
function initThumbnailMasonry() {
$('.js-masonry.thumbnails').masonry({
itemSelector: '.thumb'
});
}
function handleInputDropdown(context) {
var val = context.find('select').find('option:selected').text();
......@@ -133,6 +142,7 @@ jQuery(function($) {
$(window).on('resize colresize', function(){
carouselHeight();
initThumbnailMasonry();
});
$('.modal-docked-right').on('click',function(e) {
......
<div id="annotationfeedbackview_{$blockid}" class="annotation-feedback">
{if $annotationfeedback}
<div class="annotationfeedback">
{if $annotationfeedbackcount > 0}
<a id="feedback_{$blockid}" class="placeannotationfeedback" data-toggle="modal-docked" data-target="#annotation_feedback_{$blockid}" href="#">
{str tag=Annotationfeedback section=artefact.annotation} ({$annotationfeedbackcount})
</a>
{else}
{if $allowfeedback && !$editing}
{if !$editing}
<div id="annotationfeedbackview_{$blockid}" class="annotation-feedback">
<ul id="annotationfeedbacktable_{$blockid}"class="annotationfeedbacktable flush list-group list-group-lite list-unstyled">
{$annotationfeedback->tablerows|safe}
</ul>
{$annotationfeedback->pagination|safe}
{if $allowfeedback}
<div class="annotationfeedback">
<a id="feedback_{$blockid}" class="placeannotationfeedback" data-toggle="modal-docked" data-target="#annotation_feedback_{$blockid}" href="#">
<span class="icon icon-plus text-success prs"></span>
{str tag=placeannotationfeedback section=artefact.annotation}
</a>
{/if}
</div>
{/if}
</div>
{/if}
{if !$editing}
<div id="annotation_feedback_{$blockid}" class="feedbacktable modal modal-docked">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button class="close" data-dismiss="modal-docked">
<span class="times">&times;</span>
<span class="sr-only">{str tag=Close}</span>
</button>
<h4 class="modal-title">
{if $annotationfeedbackcount > 0}
<span class="icon icon-lg icon-annotation"></span>
{str tag=Annotationfeedback section=artefact.annotation}
{else}
<div id="annotation_feedback_{$blockid}" class="feedbacktable modal modal-docked">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button class="close" data-dismiss="modal-docked">
<span class="times">&times;</span>
<span class="sr-only">{str tag=Close}</span>
</button>
<h4 class="modal-title">
<span class="icon icon-lg icon-annotation"></span>
{str tag=placeannotationfeedback section=artefact.annotation}
</h4>
</div>
<div class="modal-body">
{if $allowfeedback && !$editing}
<div id="add_annotation_feedback_{$blockid}" class="mbxl">
{$addannotationfeedbackform|safe}
</div>
{/if}
</h4>
</div>
<div class="modal-body">
{if $allowfeedback && !$editing}
<div id="add_annotation_feedback_{$blockid}" class="mbxl">
{$addannotationfeedbackform|safe}
<script type="application/javascript">
var annotationfeedbacklinkinblock = true;
</script>
</div>
{/if}
<hr />
<ul id="annotationfeedbacktable_{$blockid}"class="annotationfeedbacktable flush list-group list-group-lite list-unstyled">
{$annotationfeedback->tablerows|safe}
</ul>
</div>
</div>
</div>
</div>
{/if}
</div>
{/if}
......@@ -16,7 +16,7 @@
{if $item->author}
</a>
{/if}
<br />
<span class="postedon text-small">
......@@ -47,24 +47,24 @@
<div>
{$item->description|safe|clean_html}
</div>
{if $item->attachmessage}
<div class="attachmessage">
{$item->attachmessage}
</div>
{/if}
<div class="metadata">
{if $item->pubmessage}
<em class="privatemessage">
{$item->pubmessage} -
{$item->pubmessage} -
</em>
{/if}
{if $item->makepublicform}
{$item->makepublicform|safe}
{/if}
{if $item->makepublicrequested}
<span class="icon icon-lock text-default prs"></span>
{/if}
......
<div class="panel-body">
<ul class="recentblogpost list-group list-unstyled">
{foreach from=$mostrecent item=post}
<li class="list-group-link list-group-item pl0 pr0">
<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&amp;view={$view}">
<ul class="recentblogpost list-group list-group-link">
{foreach from=$mostrecent item=post}
<li class="list-group-item list-group-item-link">
<h4 class="list-group-item-heading mb0">
<a href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&amp;view={$view}" class="">
{$post->title}
<span class="metadata">
{str tag='postedin' section='blocktype.blog/recentposts'}
{str tag='postedin' section='blocktype.blog/recentposts'}
{$post->parenttitle}
{str tag='postedon' section='blocktype.blog/recentposts'}
{$post->displaydate}
</span>
</a>
</li>
{/foreach}
</ul>
</div>
</h4>
</li>
{/foreach}
</ul>
{if ($editing)}
{if (count($blogs) == 1)}
<a class="panel-footer {if (count($blogs) != 1)} hidden{/if}">
......@@ -25,14 +25,14 @@
<div class="panel-footer">
<label class="text" for="blogselect_{$blockid}">{str tag='shortcutaddpost' section='artefact.blog'}</label>
<div class="input-group">
<select id="blogselect_{$blockid}" class="select form-control">
{foreach from=$blogs item=blog}
<option value="{$blog->id}"> {$blog->title} </option>
{/foreach}
</select>
<span class="input-group-btn">
<a class="btn btn-default btnshortcut">
<a class="btn btn-default btnshortcut">
<span class="icon icon-plus text-success prs"></span> {str tag='shortcutgo' section='artefact.blog'}
</a>
</span>
......@@ -40,4 +40,3 @@
</div>
{/if}
{/if}
{if ($editing)}
<div class="shortcut nojs-hidden-block mtl">
<div class="alert alert-default {if (count($blogs) == 1)}hidden{/if}">
<label class="text">{str tag='shortcutaddpost' section='artefact.blog'}: </label>
<div class="panel-footer mtl {if (count($blogs) == 1)}hidden{/if}">
<label class="text">{str tag='shortcutaddpost' section='artefact.blog'} </label>
<div class="input-group">
<span class="picker">
<select id="blogselect_{$blockid}" class="select form-control">{foreach from=$blogs item=blog}<option value="{$blog->id}"> {$blog->title} </option>{/foreach}</select>
</span>
<input class="select" type="hidden" value="{$tagselect}">
<span class="input-group-btn">
<a class="btn btnshortcut btn-success">{str tag='shortcutgo' section='artefact.blog'}</a>
<a class="btn btnshortcut btn-default">
<span class="icon icon-plus text-success prs"></span>
{str tag='shortcutgo' section='artefact.blog'}
</a>
</span>
</div>
</div>
......@@ -57,47 +60,48 @@
{$post->description|clean_html|safe}
</div>
{if $post->commentcount != null}
<div class="comments ptm pbl">
{if $post->commentcount > 0}
<a id="block_0{$post->id}{$blockid}" class="commentlink" data-toggle="modal" data-target="#feedbacktable_0{$post->id}{$blockid}" href="#">
{str tag=Comments section=artefact.comment} ({$post->commentcount})
</a>
{else}
{if $post->allowcomments}
<a class="addcomment" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">
{str tag=addcomment section=artefact.comment}
<span class="icon icon-arrow-right text-success pls"></span>
</a>
{if !$editing}
{if $post->commentcount != null}
<div class="comments ptm pbl">
{if $post->commentcount > 0}
<a id="block_0{$post->id}{$blockid}" class="commentlink" data-toggle="modal-docked" data-target="#feedbacktable_0{$post->id}{$blockid}" href="#">
{str tag=Comments section=artefact.comment} ({$post->commentcount})
</a>
{else}
{if $post->allowcomments}
<a class="addcomment" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view}">
{str tag=addcomment section=artefact.comment}
</a>
{/if}
{/if}
{/if}
</div>
<div id="feedbacktable_0{$post->id}{$blockid}" class="feedbacktable modal modal-docked modal-docked-right">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header clearfix">
<button class="deletebutton close" data-dismiss="modal">
<span class="times">&times;</span>
<span class="sr-only">{str tag=Close}</span>
</button>
<h4 class="modal-title pull-left">
<span class="icon icon-lg icon-comments prm"></span>
{str tag=Comments section=artefact.comment} -
{$post->title}
</h4>
{if $post->allowcomments}
<a class="addcomment pull-right" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$options.viewid}">
{str tag=addcomment section=artefact.comment}
<span class="icon icon-arrow-right pls"></span>
</a>
{/if}
</div>
<div class="modal-body">
{$post->comments->tablerows|safe}
</div>
<div id="feedbacktable_0{$post->id}{$blockid}" class="feedbacktable modal modal-docked">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header clearfix">
<button class="close" data-dismiss="modal-docked">
<span class="times">&times;</span>
<span class="sr-only">{str tag=Close}</span>
</button>
<h4 class="modal-title pull-left">
<span class="icon icon-lg icon-comments prm"></span>
{str tag=Comments section=artefact.comment} |
{$post->title}
</h4>
{if $post->allowcomments}
<a class="addcomment pull-right" href="{$WWWROOT}artefact/artefact.php?artefact={$post->id}&view={$view