mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-11 16:05:49 +01:00
Separate labels and milestones from issues
This commit is contained in:
@@ -5,9 +5,7 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import gitbucket.core.view.helpers._
|
@import gitbucket.core.view.helpers._
|
||||||
@html.main(s"Labels - ${repository.owner}/${repository.name}"){
|
@html.main(s"Labels - ${repository.owner}/${repository.name}"){
|
||||||
@html.menu("issues", repository){
|
@html.menu("labels", repository){
|
||||||
@issues.html.navigation("labels", hasWritePermission, repository)
|
|
||||||
<br>
|
|
||||||
<table class="table table-bordered table-hover table-issues" id="new-label-table" style="display: none;">
|
<table class="table table-bordered table-hover table-issues" id="new-label-table" style="display: none;">
|
||||||
<tr><td></td></tr>
|
<tr><td></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
@import gitbucket.core.view.helpers._
|
@import gitbucket.core.view.helpers._
|
||||||
@html.main((if(target == "issues") "Issues" else "Pull requests") + s" - ${repository.owner}/${repository.name}", Some(repository)){
|
@html.main((if(target == "issues") "Issues" else "Pull requests") + s" - ${repository.owner}/${repository.name}", Some(repository)){
|
||||||
@html.menu(target, repository){
|
@html.menu(target, repository){
|
||||||
@navigation(target, true, repository, Some(condition))
|
@navigation(target, true, repository, openCount, closedCount, condition)
|
||||||
@listparts(target, issues, page, openCount, closedCount, condition, collaborators, milestones, labels, Some(repository), hasWritePermission)
|
@listparts(target, issues, page, openCount, closedCount, condition, collaborators, milestones, labels, Some(repository), hasWritePermission)
|
||||||
@if(hasWritePermission){
|
@if(hasWritePermission){
|
||||||
<form id="batcheditForm" method="POST">
|
<form id="batcheditForm" method="POST">
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import gitbucket.core.view.helpers._
|
@import gitbucket.core.view.helpers._
|
||||||
@import gitbucket.core.service.IssuesService.IssueInfo
|
@import gitbucket.core.service.IssuesService.IssueInfo
|
||||||
|
@*
|
||||||
@if(condition.nonEmpty){
|
@if(condition.nonEmpty){
|
||||||
<div style="width: 100%; display: inline-block;">
|
<div style="width: 100%; display: inline-block;">
|
||||||
<a href="@gitbucket.core.service.IssuesService.IssueSearchCondition().toURL" class="header-link">
|
<a href="@gitbucket.core.service.IssuesService.IssueSearchCondition().toURL" class="header-link">
|
||||||
@@ -20,22 +21,13 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
*@
|
||||||
<table class="table table-bordered table-hover table-issues">
|
<table class="table table-bordered table-hover table-issues">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th style="background-color: #eee;">
|
<th style="background-color: #eee;">
|
||||||
<input type="checkbox"/>
|
<input type="checkbox"/>
|
||||||
<span class="small">
|
<span id="table-issues-control">
|
||||||
<a class="button-link@if(condition.state == "open"){ selected}" href="@condition.copy(state = "open").toURL">
|
|
||||||
<i class="octicon octicon-issue-opened @(if(condition.state == "open"){"active"})"></i>
|
|
||||||
@openCount Open
|
|
||||||
</a>
|
|
||||||
<a class="button-link@if(condition.state == "closed"){ selected}" href="@condition.copy(state = "closed").toURL">
|
|
||||||
<i class="octicon octicon-check @(if(condition.state == "closed"){"active"})"></i>
|
|
||||||
@closedCount Closed
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
<div class="pull-right" id="table-issues-control">
|
|
||||||
@helper.html.dropdown("Author", flat = true) {
|
@helper.html.dropdown("Author", flat = true) {
|
||||||
@collaborators.map { collaborator =>
|
@collaborators.map { collaborator =>
|
||||||
<li>
|
<li>
|
||||||
@@ -113,9 +105,9 @@
|
|||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
</div>
|
</span>
|
||||||
@if(hasWritePermission){
|
@if(hasWritePermission){
|
||||||
<div class="pull-right" id="table-issues-batchedit">
|
<span id="table-issues-batchedit">
|
||||||
@helper.html.dropdown("Mark as", flat = true) {
|
@helper.html.dropdown("Mark as", flat = true) {
|
||||||
<li><a href="javascript:void(0);" class="toggle-state" data-id="open">Open</a></li>
|
<li><a href="javascript:void(0);" class="toggle-state" data-id="open">Open</a></li>
|
||||||
<li><a href="javascript:void(0);" class="toggle-state" data-id="close">Close</a></li>
|
<li><a href="javascript:void(0);" class="toggle-state" data-id="close">Close</a></li>
|
||||||
@@ -143,7 +135,7 @@
|
|||||||
<li><a href="javascript:void(0);" class="toggle-assign" data-name="@collaborator"><i class="octicon"></i>@avatar(collaborator, 20) @collaborator</a></li>
|
<li><a href="javascript:void(0);" class="toggle-assign" data-name="@collaborator"><i class="octicon"></i>@avatar(collaborator, 20) @collaborator</a></li>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</span>
|
||||||
}
|
}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -157,9 +149,11 @@
|
|||||||
} else {
|
} else {
|
||||||
No pull requests to show.
|
No pull requests to show.
|
||||||
}
|
}
|
||||||
|
@*
|
||||||
@if(condition.labels.nonEmpty || condition.milestone.isDefined){
|
@if(condition.labels.nonEmpty || condition.milestone.isDefined){
|
||||||
<a href="@condition.copy(labels = Set.empty, milestone = None).toURL">Clear active filters.</a>
|
<a href="@condition.copy(labels = Set.empty, milestone = None).toURL">Clear active filters.</a>
|
||||||
} else {
|
} else {
|
||||||
|
*@
|
||||||
@if(repository.isDefined){
|
@if(repository.isDefined){
|
||||||
@if(target == "issues"){
|
@if(target == "issues"){
|
||||||
<a href="@url(repository.get)/issues/new">Create a new issue.</a>
|
<a href="@url(repository.get)/issues/new">Create a new issue.</a>
|
||||||
@@ -167,7 +161,9 @@
|
|||||||
<a href="@url(repository.get)/compare">Create a new pull request.</a>
|
<a href="@url(repository.get)/compare">Create a new pull request.</a>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@*
|
||||||
}
|
}
|
||||||
|
*@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
}
|
}
|
||||||
@@ -177,7 +173,9 @@
|
|||||||
@if(hasWritePermission){
|
@if(hasWritePermission){
|
||||||
<input type="checkbox" value="@issue.issueId"/>
|
<input type="checkbox" value="@issue.issueId"/>
|
||||||
}
|
}
|
||||||
|
@*
|
||||||
<i class="octicon octicon-issue-@(if(issue.closed) "closed" else "opened")" style="margin-right: 3px;"></i>
|
<i class="octicon octicon-issue-@(if(issue.closed) "closed" else "opened")" style="margin-right: 3px;"></i>
|
||||||
|
*@
|
||||||
@if(repository.isEmpty){
|
@if(repository.isEmpty){
|
||||||
<a href="@path/@issue.userName/@issue.repositoryName">@issue.repositoryName</a> ・
|
<a href="@path/@issue.userName/@issue.repositoryName">@issue.repositoryName</a> ・
|
||||||
}
|
}
|
||||||
@@ -204,7 +202,7 @@
|
|||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
</span>
|
</span>
|
||||||
<div class="small muted" style="margin-left: 40px; margin-top: 2px;">
|
<div class="small muted" style="margin-left: 12px; margin-top: 2px;">
|
||||||
#@issue.issueId opened @helper.html.datetimeago(issue.registeredDate) by @user(issue.openedUserName, styleClass="username")
|
#@issue.issueId opened @helper.html.datetimeago(issue.registeredDate) by @user(issue.openedUserName, styleClass="username")
|
||||||
@milestone.map { milestone =>
|
@milestone.map { milestone =>
|
||||||
<span style="margin: 20px;"><a href="@condition.copy(milestone = Some(Some(milestone))).toURL" class="username"><i class="octicon octicon-milestone"></i> @milestone</a></span>
|
<span style="margin: 20px;"><a href="@condition.copy(milestone = Some(Some(milestone))).toURL" class="username"><i class="octicon octicon-milestone"></i> @milestone</a></span>
|
||||||
|
|||||||
@@ -3,13 +3,10 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import gitbucket.core.view.helpers._
|
@import gitbucket.core.view.helpers._
|
||||||
@html.main(s"Milestones - ${repository.owner}/${repository.name}"){
|
@html.main(s"Milestones - ${repository.owner}/${repository.name}"){
|
||||||
@html.menu("issues", repository){
|
@html.menu("milestones", repository){
|
||||||
@if(milestone.isEmpty){
|
@if(milestone.isEmpty){
|
||||||
<h4>New milestone</h4>
|
<h4>New milestone</h4>
|
||||||
<div class="muted">Create a new milestone to help organize your issues and pull requests.</div>
|
<div class="muted">Create a new milestone to help organize your issues and pull requests.</div>
|
||||||
} else {
|
|
||||||
@issues.html.navigation("milestones", false, repository)
|
|
||||||
<br><br>
|
|
||||||
}
|
}
|
||||||
<hr style="margin-top: 12px; margin-bottom: 18px;" class="fill-width"/>
|
<hr style="margin-top: 12px; margin-bottom: 18px;" class="fill-width"/>
|
||||||
<form method="POST" action="@url(repository)/issues/milestones/@if(milestone.isEmpty){new}else{@milestone.get.milestoneId/edit}" validate="true">
|
<form method="POST" action="@url(repository)/issues/milestones/@if(milestone.isEmpty){new}else{@milestone.get.milestoneId/edit}" validate="true">
|
||||||
|
|||||||
@@ -5,9 +5,7 @@
|
|||||||
@import context._
|
@import context._
|
||||||
@import gitbucket.core.view.helpers._
|
@import gitbucket.core.view.helpers._
|
||||||
@html.main(s"Milestones - ${repository.owner}/${repository.name}"){
|
@html.main(s"Milestones - ${repository.owner}/${repository.name}"){
|
||||||
@html.menu("issues", repository){
|
@html.menu("milestones", repository){
|
||||||
@issues.html.navigation("milestones", hasWritePermission, repository)
|
|
||||||
<br>
|
|
||||||
<table class="table table-bordered table-hover table-issues">
|
<table class="table table-bordered table-hover table-issues">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
|||||||
@@ -1,42 +1,21 @@
|
|||||||
@(active: String,
|
@(active: String,
|
||||||
newButton: Boolean,
|
newButton: Boolean,
|
||||||
repository: gitbucket.core.service.RepositoryService.RepositoryInfo,
|
repository: gitbucket.core.service.RepositoryService.RepositoryInfo,
|
||||||
condition: Option[gitbucket.core.service.IssuesService.IssueSearchCondition] = None)(implicit context: gitbucket.core.controller.Context)
|
openCount: Int,
|
||||||
|
closedCount: Int,
|
||||||
|
condition: gitbucket.core.service.IssuesService.IssueSearchCondition)(implicit context: gitbucket.core.controller.Context)
|
||||||
@import context._
|
@import context._
|
||||||
@import gitbucket.core.view.helpers._
|
@import gitbucket.core.view.helpers._
|
||||||
|
|
||||||
<ul class="nav nav-pills pull-left" style="line-height: 14px; margin-bottom: 10px;">
|
<ul class="nav nav-pills pull-left" style="line-height: 14px; margin-bottom: 10px;">
|
||||||
<li class="@if(active == "issues" ){active}"><a href="@url(repository)/issues">Issues</a></li>
|
<li class="@if(condition.state == "open"){active}">
|
||||||
<li class="@if(active == "pulls" ){active}"><a href="@url(repository)/pulls">Pull requests</a></li>
|
<a href="@condition.copy(state = "open").toURL">Open <span class="badge">@openCount</span></a>
|
||||||
<li class="@if(active == "labels" ){active}"><a href="@url(repository)/issues/labels">Labels</a></li>
|
</li>
|
||||||
<li class="@if(active == "milestones"){active}"><a href="@url(repository)/issues/milestones">Milestones</a></li>
|
<li class="@if(condition.state == "closed"){active}">
|
||||||
|
<a href="@condition.copy(state = "closed").toURL">Closed <span class="badge">@closedCount</span></a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<form method="GET" id="search-filter-form" class="form-inline pull-right">
|
<form method="GET" id="search-filter-form" class="form-inline pull-right">
|
||||||
@condition.map { condition =>
|
|
||||||
@if(loginAccount.isDefined){
|
|
||||||
<div class="form-group" style="width: 300px">
|
|
||||||
<div class="input-group" style="margin-bottom: 0px;">
|
|
||||||
<div class="input-group-btn">
|
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
|
||||||
Filter
|
|
||||||
<span class="caret"></span>
|
|
||||||
</button>
|
|
||||||
<ul class="dropdown-menu">
|
|
||||||
<li><a href="?q=is:open">Open issues and pull requests</a></li>
|
|
||||||
<li><a href="?q=is:open+is:issue+author:@urlEncode(loginAccount.get.userName)">Your issues</a></li>
|
|
||||||
<li><a href="?q=is:open+is:pr+author:@urlEncode(loginAccount.get.userName)">Your pull requests</a></li>
|
|
||||||
<li><a href="?q=is:open+assignee:@urlEncode(loginAccount.get.userName)">Everything assigned to you</a></li>
|
|
||||||
@*
|
|
||||||
<li><a href="?q=is:open+mentions:@urlEncode(loginAccount.get.userName)">Everything mentioning you</a></li>
|
|
||||||
*@
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<input type="text" id="search-filter-box" class="form-control" size="40" name="q" value="is:@{if(active == "issues") "issue" else "pr"} @condition.toFilterString"/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
} else {
|
|
||||||
<input type="text" id="search-filter-box" class="form-control" size="40" name="q" value="is:@{if(active == "issues") "issue" else "pr"} @condition.toFilterString"/>
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@if(loginAccount.isDefined){
|
@if(loginAccount.isDefined){
|
||||||
@if(newButton){
|
@if(newButton){
|
||||||
@if(active == "issues"){
|
@if(active == "issues"){
|
||||||
|
|||||||
@@ -55,10 +55,12 @@
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-tabs">
|
<ul class="nav nav-tabs">
|
||||||
@menuitem("" , "code" , "Code")
|
@menuitem("" ,"code" ,"Code")
|
||||||
@menuitem("/issues", "issues" , "Issues", repository.issueCount)
|
@menuitem("/issues" ,"issues" ,"Issues", repository.issueCount)
|
||||||
@menuitem("/pulls" , "pulls" , "Pull Requests", repository.pullCount)
|
@menuitem("/pulls" ,"pulls" ,"Pull Requests", repository.pullCount)
|
||||||
@menuitem("/wiki" , "wiki" , "Wiki")
|
@menuitem("/issues/labels" ,"labels" ,"Labels")
|
||||||
|
@menuitem("/issues/milestones" ,"milestones" ,"Milestones")
|
||||||
|
@menuitem("/wiki" ,"wiki" ,"Wiki")
|
||||||
@if(loginAccount.isDefined && (loginAccount.get.isAdmin || repository.managers.contains(loginAccount.get.userName))){
|
@if(loginAccount.isDefined && (loginAccount.get.isAdmin || repository.managers.contains(loginAccount.get.userName))){
|
||||||
@menuitem("/settings" , "settings" , "Settings")
|
@menuitem("/settings" , "settings" , "Settings")
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user