mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-06 05:25:50 +01:00
(refs #488)Fix the "New pull request" button
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
@(active: String, create: Boolean, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
@(active: String, creationPage: Boolean,
|
||||||
|
repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
||||||
@import context._
|
@import context._
|
||||||
@import view.helpers._
|
@import view.helpers._
|
||||||
<ul class="nav nav-pills pull-left fill-width" style="margin-bottom: 0px;">
|
<ul class="nav nav-pills pull-left fill-width" style="margin-bottom: 0px;">
|
||||||
@@ -9,10 +10,20 @@
|
|||||||
@if(loginAccount.isDefined){
|
@if(loginAccount.isDefined){
|
||||||
<li class="pull-right">
|
<li class="pull-right">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
@if(create){
|
@if(creationPage){
|
||||||
<a class="btn btn-small btn-success" href="#" disabled="disabled">New Issue</a>
|
@if(active == "issues"){
|
||||||
|
<a class="btn btn-small btn-success" href="#" disabled="disabled">New issue</a>
|
||||||
|
}
|
||||||
|
@if(active == "pulls"){
|
||||||
|
<a class="btn btn-small btn-success" href="#" disabled="disabled">New pull request</a>
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
<a class="btn btn-small btn-success" href="@url(repository)/issues/new">New Issue</a>
|
@if(active == "issues"){
|
||||||
|
<a class="btn btn-small btn-success" href="@url(repository)/issues/new">New issue</a>
|
||||||
|
}
|
||||||
|
@if(active == "pulls"){
|
||||||
|
<a class="btn btn-small btn-success" href="@url(repository)/compare">New pull request</a>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -12,16 +12,6 @@
|
|||||||
@import view.helpers._
|
@import view.helpers._
|
||||||
@import service.IssuesService.IssueInfo
|
@import service.IssuesService.IssueInfo
|
||||||
@*
|
@*
|
||||||
@repository.map { repository =>
|
|
||||||
@if(hasWritePermission){
|
|
||||||
<div class="pull-right">
|
|
||||||
@helper.html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.PullRequestService.PullRequestLimit, 7, condition.toURL)
|
|
||||||
<a href="@url(repository)/compare" class="btn btn-small btn-success">New pull request</a>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*@
|
|
||||||
@*
|
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="btn btn-small@if(condition.state == "open"){ active}" href="@condition.copy(state = "open").toURL">@openCount Open</a>
|
<a class="btn btn-small@if(condition.state == "open"){ active}" href="@condition.copy(state = "open").toURL">@openCount Open</a>
|
||||||
<a class="btn btn-small@if(condition.state == "closed"){ active}" href="@condition.copy(state = "closed").toURL">@closedCount Closed</a>
|
<a class="btn btn-small@if(condition.state == "closed"){ active}" href="@condition.copy(state = "closed").toURL">@closedCount Closed</a>
|
||||||
|
|||||||
Reference in New Issue
Block a user