antville/code/Comment/$Comment.skin
Tobi Schäfer e5964eb5b9 Improved soft comment deletion:
* If comment contains a child comment set its status to DELETED, erase metadata (content) and prevent macro calls to display creator or modifier
 * Otherwise – or if status already equals DELETED – completely remove it and its children from the database
2011-02-15 18:12:43 +00:00

35 lines
1.1 KiB
Text

<% #delete %>
<% if <% comment.creator %> is <% membership.user.name %> then ''
else <% if <% comment.related.size %> is null then ''
else <% comment.skin #deleteOptions %> %> %>
<% #deleteOptions %>
<script type="text/javascript">
$(function() {
$("#confirmation").hide();
$("#confirm").click(function() {
$("button").attr("disabled", !$(this).attr("checked"));
});
$("#mode").click(function() {
if ($(this).attr("checked")) {
$("#confirm").attr("checked", false);
$("#confirmation").show();
$("button").attr("disabled", true);
} else {
$("#confirmation").hide();
$("button").attr("disabled", false);
}
});
});
</script>
<div>
<input type="checkbox" id="mode" name="mode" value="user" />
<label for="mode"><% gettext "Erase all comments of user {0}"
<% comment.creator %> %></label>
</div>
<div id="confirmation">
<input type="checkbox" id="confirm" name="confirm" value="1" />
<label for="confirm"><% ngettext "Yes, really erase {0} comment"
"Yes, really erase {0} comments" <% comment.related.size %> %></label>
</div>
<br />