mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 22:15:51 +01:00
Add Issues.
This commit is contained in:
@@ -8,6 +8,7 @@ class ScalatraBootstrap extends LifeCycle {
|
||||
context.mount(new SignInController, "/*")
|
||||
context.mount(new UsersController, "/*")
|
||||
context.mount(new WikiController, "/*")
|
||||
context.mount(new IssuesController, "/*")
|
||||
context.mount(new CreateRepositoryController, "/*")
|
||||
context.mount(new RepositoryViewerController, "/*")
|
||||
context.mount(new SettingsController, "/*")
|
||||
|
||||
19
src/main/scala/app/IssuesController.scala
Normal file
19
src/main/scala/app/IssuesController.scala
Normal file
@@ -0,0 +1,19 @@
|
||||
package app
|
||||
|
||||
import service._
|
||||
|
||||
class IssuesController extends IssuesControllerBase
|
||||
with RepositoryService with AccountService
|
||||
|
||||
trait IssuesControllerBase extends ControllerBase { self: RepositoryService =>
|
||||
|
||||
get("/:owner/:repository/issues"){
|
||||
issues.html.issues(getRepository(params("owner"), params("repository"), servletContext).get)
|
||||
}
|
||||
|
||||
get("/:owner/:repository/issues/:id"){
|
||||
issues.html.issue(getRepository(params("owner"), params("repository"), servletContext).get)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
<a href="@path/@repository.owner/@repository.name">Code</a>
|
||||
</th>
|
||||
<th class="box-header@if(active=="issue"){ active}">
|
||||
<a href="#">Issue</a>
|
||||
<a href="@path/@repository.owner/@repository.name/issues">Issue</a>
|
||||
</th>
|
||||
<th class="box-header@if(active=="wiki"){ active}">
|
||||
<a href="@path/@repository.owner/@repository.name/wiki">Wiki</a>
|
||||
|
||||
21
src/main/twirl/issues/issue.scala.html
Normal file
21
src/main/twirl/issues/issue.scala.html
Normal file
@@ -0,0 +1,21 @@
|
||||
@(repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
||||
@import context._
|
||||
@html.main("2.1 migration issue - ebean - Issue #1181 - " + repository.owner + "/" + repository.name){
|
||||
@html.header("issues", repository)
|
||||
@issuestab("issues", repository)
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="pull-left"><a href="@path/@repository.owner/@repository.name/issues">← Back to issue list</a></li>
|
||||
<li class="pull-right">Issue #1181</li>
|
||||
</ul>
|
||||
<div class="box">
|
||||
<div class="box-content">
|
||||
<div class="small"><a href="#">takezoe</a> opened this issue <time datetime="2013-06-03T15:56:05-07:00" title="2013-06-03 15:56:05">June 03, 2013</time></div>
|
||||
<h4>2.1 migration issue - ebean</h4>
|
||||
</div>
|
||||
<div class="box-content" style="background-color: #f5f5f5;">
|
||||
TODO Detail
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-success" value="Comment"/>
|
||||
|
||||
}
|
||||
49
src/main/twirl/issues/issues.scala.html
Normal file
49
src/main/twirl/issues/issues.scala.html
Normal file
@@ -0,0 +1,49 @@
|
||||
@(repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
||||
@import context._
|
||||
@html.main("Issues - " + repository.owner + "/" + repository.name){
|
||||
@html.header("issues", repository)
|
||||
@issuestab("issues", repository)
|
||||
<div class="btn-group">
|
||||
<a class="btn active" href="#">1 Open</a>
|
||||
<a class="btn" href="#">1 Closed</a>
|
||||
</div>
|
||||
<div class="btn-group">
|
||||
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
||||
Sort: <strong>Newest</strong>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#">Newest</a></li>
|
||||
<li><a href="#">Oldest</a></li>
|
||||
<li><a href="#">Most commented</a></li>
|
||||
<li><a href="#">Least commented</a></li>
|
||||
<li><a href="#">Recently updated</a></li>
|
||||
<li><a href="#">Least recently updated</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="pagination pagination-right">
|
||||
<ul>
|
||||
<li class="disabled"><span>◀</span></li>
|
||||
<li class="active"><span>1</span></li>
|
||||
<li><a href="#">2</a></li>
|
||||
<li><a href="#">3</a></li>
|
||||
<li><span>…</span></li>
|
||||
<li><a href="#">7</a></li>
|
||||
<li><a href="#">▶</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<table class="table table-bordered table-hover">
|
||||
<tr><td>
|
||||
<a href="@path/@repository.owner/@repository.name/issues/1181">2.1 migration issue - ebean</a>
|
||||
<div class="small">
|
||||
Opened by <a href="#">takezoe</a> <time datetime="2013-06-03T15:56:05-07:00" title="2013-06-03 15:56:05">June 03, 2013</time>
|
||||
</div>
|
||||
</td></tr>
|
||||
<tr><td>
|
||||
<a href="#">Serving Play new app sample code page with hyper links</a>
|
||||
<div class="small">
|
||||
Opened by <a href="#">shimamoto</a> <time datetime="2013-06-03T12:58:48-07:00" title="2013-06-03 12:58:48">June 03, 2013</time>
|
||||
</div>
|
||||
</td></tr>
|
||||
</table>
|
||||
}
|
||||
11
src/main/twirl/issues/issuestab.scala.html
Normal file
11
src/main/twirl/issues/issuestab.scala.html
Normal file
@@ -0,0 +1,11 @@
|
||||
@(active: String, repository: service.RepositoryService.RepositoryInfo)(implicit context: app.Context)
|
||||
@import context._
|
||||
<ul class="nav nav-tabs">
|
||||
<li@if(active == "issues"){ class="active"}><a href="@path/@repository.owner/@repository.name/issues">Browse Issues</a></li>
|
||||
<li@if(active == "milestones"){ class="active"}><a href="@path/@repository.owner/@repository.name/issues/milestones">Milestones</a></li>
|
||||
<li class="pull-right">
|
||||
<div class="btn-group">
|
||||
<a class="btn btn-success" href="#">New Issue</a>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
Reference in New Issue
Block a user