Add the dropdown of label edit.

This commit is contained in:
shimamoto
2013-07-02 16:08:31 +09:00
parent 3c17aa3da2
commit c0a2378111
2 changed files with 15 additions and 2 deletions

View File

@@ -61,6 +61,7 @@ trait IssuesControllerBase extends ControllerBase {
_, _,
getComments(owner, repository, issueId.toInt), getComments(owner, repository, issueId.toInt),
getIssueLabel(owner, repository, issueId.toInt), getIssueLabel(owner, repository, issueId.toInt),
getLabels(owner, repository),
getRepository(owner, repository, baseUrl).get) getRepository(owner, repository, baseUrl).get)
} getOrElse NotFound } getOrElse NotFound
} }

View File

@@ -1,4 +1,8 @@
@(issue: model.Issue, comments: List[model.IssueComment], issueLabels: List[model.Label], repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context) @(issue: model.Issue,
comments: List[model.IssueComment],
issueLabels: List[model.Label],
labels: List[model.Label],
repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
@import context._ @import context._
@import view.helpers._ @import view.helpers._
@html.main("%s - Issue #%d - %s/%s".format(issue.title, issue.issueId, repository.owner, repository.name)){ @html.main("%s - Issue #%d - %s/%s".format(issue.title, issue.issueId, repository.owner, repository.name)){
@@ -72,7 +76,15 @@
<span class="caret"></span> <span class="caret"></span>
</button> </button>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="#">TODO</a></li> @labels.map { label =>
<li>
<a href="#">
<i class="@{if(issueLabels.exists(_.labelId == label.labelId)) "icon-ok" else "icon-white"}"></i>
<span class="label" style="background-color: #@label.color;">&nbsp;</span>
@label.labelName
</a>
</li>
}
</ul> </ul>
</div> </div>
</div> </div>