mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 05:55:51 +01:00
Implementing label editing form.
This commit is contained in:
@@ -8,7 +8,7 @@ class LabelsController extends LabelsControllerBase
|
||||
with LabelsService with RepositoryService with AccountService with WritableRepositoryAuthenticator
|
||||
|
||||
trait LabelsControllerBase extends ControllerBase {
|
||||
self: LabelsService with WritableRepositoryAuthenticator =>
|
||||
self: LabelsService with RepositoryService with WritableRepositoryAuthenticator =>
|
||||
|
||||
case class LabelForm(labelName: String, color: String)
|
||||
|
||||
@@ -26,4 +26,15 @@ trait LabelsControllerBase extends ControllerBase {
|
||||
redirect("/%s/%s/issues".format(owner, repository))
|
||||
})
|
||||
|
||||
get("/:owner/:repository/issues/label/:labelId/edit")(writableRepository {
|
||||
val owner = params("owner")
|
||||
val repository = params("repository")
|
||||
val labelId = params("labelId").toInt
|
||||
|
||||
getLabel(owner, repository, labelId) match {
|
||||
case None => NotFound()
|
||||
case Some(l) => issues.html.labeledit(Some(l), getRepository(owner, repository, baseUrl).get)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user