mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 06:55:54 +01:00
(refs #378)Closed but not merged pull requests should be re-openable
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
@(issue: model.Issue,
|
||||
reopenable: Boolean,
|
||||
hasWritePermission: Boolean,
|
||||
repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
||||
@import context._
|
||||
@@ -14,7 +15,7 @@
|
||||
<div class="pull-right">
|
||||
<input type="hidden" name="issueId" value="@issue.issueId"/>
|
||||
<input type="submit" class="btn btn-success" formaction="@url(repository)/issue_comments/new" value="Comment"/>
|
||||
@if((!issue.isPullRequest || !issue.closed) && (hasWritePermission || issue.openedUserName == loginAccount.get.userName)){
|
||||
@if((reopenable || !issue.closed) && (hasWritePermission || issue.openedUserName == loginAccount.get.userName)){
|
||||
<input type="submit" class="btn" formaction="@url(repository)/issue_comments/state" value="@{if(issue.closed) "Reopen" else "Close"}" id="action"/>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="span10">
|
||||
@issuedetail(issue, comments, collaborators, milestones, hasWritePermission, repository)
|
||||
@commentlist(issue, comments, hasWritePermission, repository)
|
||||
@commentform(issue, hasWritePermission, repository)
|
||||
@commentform(issue, true, hasWritePermission, repository)
|
||||
</div>
|
||||
<div class="span2">
|
||||
@if(issue.closed) {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
<div class="span10">
|
||||
@issues.html.issuedetail(issue, comments, collaborators, milestones, hasWritePermission, repository)
|
||||
@issues.html.commentlist(issue, comments, hasWritePermission, repository, Some(pullreq))
|
||||
@defining(comments.exists(_.action == "merge")){ merged =>
|
||||
@if(hasWritePermission && !issue.closed){
|
||||
<div class="box issue-comment-box" style="background-color: #d8f5cd;">
|
||||
<div class="box-content"class="issue-content" style="border: 1px solid #95c97e; padding: 10px;">
|
||||
@@ -49,11 +50,11 @@
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@issues.html.commentform(issue, hasWritePermission, repository)
|
||||
@issues.html.commentform(issue, !merged, hasWritePermission, repository)
|
||||
</div>
|
||||
<div class="span2">
|
||||
@if(issue.closed) {
|
||||
@if(comments.exists(_.action == "merge")){
|
||||
@if(merged){
|
||||
<span class="label label-info issue-status">Merged</span>
|
||||
} else {
|
||||
<span class="label label-important issue-status">Closed</span>
|
||||
@@ -64,6 +65,7 @@
|
||||
<div class="small" style="text-align: center;">
|
||||
<span class="strong">@comments.size</span> @plural(comments.size, "comment")
|
||||
</div>
|
||||
}
|
||||
<hr/>
|
||||
@issues.html.labels(issue, issueLabels, labels, hasWritePermission, repository)
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user