|
|
|
|
@@ -13,7 +13,7 @@
|
|
|
|
|
@user(issue.get.openedUserName, styleClass="username strong") <span class="muted">commented @helper.html.datetimeago(issue.get.registeredDate)</span>
|
|
|
|
|
<span class="pull-right">
|
|
|
|
|
@if(hasWritePermission || loginAccount.map(_.userName == issue.get.openedUserName).getOrElse(false)){
|
|
|
|
|
<a href="#" data-issue-id="@issue.get.issueId"><i class="icon-pencil" aria-label="Edit"></i></a>
|
|
|
|
|
<a href="#" data-issue-id="@issue.get.issueId"><i class="octicon octicon-pencil" aria-label="Edit"></i></a>
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -41,8 +41,8 @@
|
|
|
|
|
<span class="pull-right">
|
|
|
|
|
@if(comment.action != "commit" && comment.action != "merge" && comment.action != "refer"
|
|
|
|
|
&& (hasWritePermission || loginAccount.map(_.userName == comment.commentedUserName).getOrElse(false))){
|
|
|
|
|
<a href="#" data-comment-id="@comment.commentId"><i class="icon-pencil" aria-label="Edit"></i></a>
|
|
|
|
|
<a href="#" data-comment-id="@comment.commentId"><i class="icon-remove-circle" aria-label="Remove"></i></a>
|
|
|
|
|
<a href="#" data-comment-id="@comment.commentId"><i class="octicon octicon-pencil" aria-label="Edit"></i></a>
|
|
|
|
|
<a href="#" data-comment-id="@comment.commentId"><i class="octicon octicon-x" aria-label="Remove"></i></a>
|
|
|
|
|
}
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -78,8 +78,8 @@
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
@if(comment.action == "close" || comment.action == "close_comment"){
|
|
|
|
|
<div class="small issue-comment-action">
|
|
|
|
|
<span class="label label-important">Closed</span>
|
|
|
|
|
<div class="issue-comment-action">
|
|
|
|
|
<i class="octicon octicon-circle-slash danger"></i>
|
|
|
|
|
@avatar(comment.commentedUserName, 20)
|
|
|
|
|
@if(issue.isDefined && issue.get.isPullRequest){
|
|
|
|
|
@user(comment.commentedUserName, styleClass="username strong") closed the pull request @helper.html.datetimeago(comment.registeredDate)
|
|
|
|
|
@@ -89,14 +89,14 @@
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
@if(comment.action == "reopen" || comment.action == "reopen_comment"){
|
|
|
|
|
<div class="small issue-comment-action">
|
|
|
|
|
<span class="label label-success">Reopened</span>
|
|
|
|
|
<div class="issue-comment-action issue-reopened">
|
|
|
|
|
<i class="octicon octicon-primitive-dot"></i>
|
|
|
|
|
@avatar(comment.commentedUserName, 20)
|
|
|
|
|
@user(comment.commentedUserName, styleClass="username strong") reopened the issue @helper.html.datetimeago(comment.registeredDate)
|
|
|
|
|
</div>
|
|
|
|
|
}
|
|
|
|
|
@if(comment.action == "delete_branch"){
|
|
|
|
|
<div class="small issue-comment-action">
|
|
|
|
|
<div class="issue-comment-action">
|
|
|
|
|
<span class="label">Deleted</span>
|
|
|
|
|
@avatar(comment.commentedUserName, 20)
|
|
|
|
|
@user(comment.commentedUserName, styleClass="username strong") deleted the <span class="label label-info monospace">@pullreq.map(_.requestBranch)</span> branch @helper.html.datetimeago(comment.registeredDate)
|
|
|
|
|
@@ -110,7 +110,7 @@
|
|
|
|
|
<script>
|
|
|
|
|
$(function(){
|
|
|
|
|
@if(issue.isDefined){
|
|
|
|
|
$('.issue-comment-box i.icon-pencil').click(function(){
|
|
|
|
|
$('.issue-comment-box i.octicon-pencil').click(function(){
|
|
|
|
|
var id = $(this).closest('a').data('comment-id');
|
|
|
|
|
var url = '@url(repository)/issue_comments/_data/' + id;
|
|
|
|
|
var $content = $('#commentContent-' + id);
|
|
|
|
|
@@ -130,7 +130,7 @@ $(function(){
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
$('.issue-comment-box i.icon-remove-circle').click(function(){
|
|
|
|
|
$('.issue-comment-box i.octicon-x').click(function(){
|
|
|
|
|
if(confirm('Are you sure you want to delete this?')) {
|
|
|
|
|
var id = $(this).closest('a').data('comment-id');
|
|
|
|
|
$.post('@url(repository)/issue_comments/delete/' + id,
|
|
|
|
|
@@ -144,7 +144,7 @@ $(function(){
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
$(document).on('click', '.commit-comment-box i.icon-pencil', function(){
|
|
|
|
|
$(document).on('click', '.commit-comment-box i.octicon-pencil', function(){
|
|
|
|
|
var id = $(this).closest('a').data('comment-id');
|
|
|
|
|
var url = '@url(repository)/commit_comments/_data/' + id;
|
|
|
|
|
var $content = $('.commit-commentContent-' + id, $(this).closest('.box'));
|
|
|
|
|
@@ -158,7 +158,7 @@ $(function(){
|
|
|
|
|
});
|
|
|
|
|
return false;
|
|
|
|
|
});
|
|
|
|
|
$(document).on('click', '.commit-comment-box i.icon-remove-circle', function(){
|
|
|
|
|
$(document).on('click', '.commit-comment-box i.octicon-x', function(){
|
|
|
|
|
if(confirm('Are you sure you want to delete this?')) {
|
|
|
|
|
var id = $(this).closest('a').data('comment-id');
|
|
|
|
|
$.post('@url(repository)/commit_comments/delete/' + id,
|
|
|
|
|
|