diff --git a/src/main/scala/app/DashboardController.scala b/src/main/scala/app/DashboardController.scala index d0a40f0..030f875 100644 --- a/src/main/scala/app/DashboardController.scala +++ b/src/main/scala/app/DashboardController.scala @@ -54,7 +54,7 @@ val page = IssueSearchCondition.page(request) dashboard.html.issues( - issues.html.listparts( + dashboard.html.issueslist( searchIssue(condition, filterUser, false, (page - 1) * IssueLimit, IssueLimit, userRepos: _*), page, countIssue(condition.copy(state = "open" ), filterUser, false, userRepos: _*), @@ -89,7 +89,7 @@ IssueSearchCondition().copy(state = condition.state), Map.empty, true, userRepos: _*) dashboard.html.pulls( - pulls.html.listparts( + dashboard.html.pullslist( searchIssue(condition, filterUser, true, (page - 1) * PullRequestLimit, PullRequestLimit, allRepos: _*), page, countIssue(condition.copy(state = "open" ), filterUser, true, allRepos: _*), diff --git a/src/main/twirl/dashboard/issueslist.scala.html b/src/main/twirl/dashboard/issueslist.scala.html new file mode 100644 index 0000000..8a96492 --- /dev/null +++ b/src/main/twirl/dashboard/issueslist.scala.html @@ -0,0 +1,184 @@ +@(issues: List[(model.Issue, List[model.Label], Int)], + page: Int, + openCount: Int, + closedCount: Int, + condition: service.IssuesService.IssueSearchCondition, + collaborators: List[String] = Nil, + milestones: List[model.Milestone] = Nil, + labels: List[model.Label] = Nil, + repository: Option[service.RepositoryService.RepositoryInfo] = None, + hasWritePermission: Boolean = false)(implicit context: app.Context) +@import context._ +@import view.helpers._ + +
| + No issues to show. + @if(condition.labels.nonEmpty || condition.milestoneId.isDefined){ + Clear active filters. + } else { + @if(repository.isDefined){ + Create a new issue. + } + } + | +
|
+
+
+
+ @helper.html.dropdown("Label") {
+ @labels.map { label =>
+
+ @milestone.dueDate.map { dueDate =>
+ @if(isPast(dueDate)){
+
+
+ Due in @date(dueDate)
+ } else {
+ Due in @date(dueDate)
+ }
+ }.getOrElse {
+ No due date
+ }
+ |
+
| + @if(hasWritePermission){ + + } + | +
| + No pull requests to show. + | +
|
+
+ @issue.content.map { content =>
+ @cut(content, 90)
+ }.getOrElse {
+ No description available
+ }
+
+
+ @avatarLink(issue.openedUserName, 20) by @user(issue.openedUserName, styleClass="username") @datetime(issue.registeredDate)
+ @if(commentCount > 0){
+ @commentCount @plural(commentCount, "comment")
+ }
+
+ |
+