(refs #488)Show number of issues for each labels

This commit is contained in:
Naoki Takezoe
2014-09-28 11:43:58 +09:00
parent 0124f7cc3c
commit b516be242d
2 changed files with 5 additions and 3 deletions

View File

@@ -7,11 +7,11 @@ import util.Implicits._
import org.scalatra.i18n.Messages
class LabelsController extends LabelsControllerBase
with LabelsService with RepositoryService with AccountService
with LabelsService with IssuesService with RepositoryService with AccountService
with ReferrerAuthenticator with CollaboratorsAuthenticator
trait LabelsControllerBase extends ControllerBase {
self: LabelsService with RepositoryService
self: LabelsService with IssuesService with RepositoryService
with ReferrerAuthenticator with CollaboratorsAuthenticator =>
case class LabelForm(labelName: String, color: String)
@@ -29,6 +29,7 @@ trait LabelsControllerBase extends ControllerBase {
get("/:owner/:repository/issues/labels")(referrersOnly { repository =>
issues.labels.html.list(
getLabels(repository.owner, repository.name),
countIssueGroupByLabels(repository.owner, repository.name, IssuesService.IssueSearchCondition()),
repository,
hasWritePermission(repository.owner, repository.name, context.loginAccount))
})