diff --git a/src/main/twirl/datepicker.scala.html b/src/main/twirl/datepicker.scala.html deleted file mode 100644 index 0247315..0000000 --- a/src/main/twirl/datepicker.scala.html +++ /dev/null @@ -1,11 +0,0 @@ -@(name: String, value: Option[java.util.Date]) -@import view.helpers -
- - -
- diff --git a/src/main/twirl/diff.scala.html b/src/main/twirl/diff.scala.html deleted file mode 100644 index 0360230..0000000 --- a/src/main/twirl/diff.scala.html +++ /dev/null @@ -1,101 +0,0 @@ -@(diffs: Seq[util.JGitUtil.DiffInfo], repository: service.RepositoryService.RepositoryInfo, commitId: Option[String])(implicit context: app.Context) -@import context._ -@import view.helpers._ -@import org.eclipse.jgit.diff.DiffEntry.ChangeType -@diffs.zipWithIndex.map { case (diff, i) => - - - - - - - - -
- @if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ - @diff.oldPath -> @diff.newPath - } - @if(diff.changeType == ChangeType.ADD || diff.changeType == ChangeType.MODIFY){ - @diff.newPath - } - @if(diff.changeType == ChangeType.DELETE){ - @diff.oldPath - } - @if(commitId.isDefined){ - - } -
- @if(diff.newContent != None || diff.oldContent != None){ -
- - - } else { - Not supported - } -
-} - - - - - \ No newline at end of file diff --git a/src/main/twirl/helper/datepicker.scala.html b/src/main/twirl/helper/datepicker.scala.html new file mode 100644 index 0000000..0247315 --- /dev/null +++ b/src/main/twirl/helper/datepicker.scala.html @@ -0,0 +1,11 @@ +@(name: String, value: Option[java.util.Date]) +@import view.helpers +
+ + +
+ diff --git a/src/main/twirl/helper/diff.scala.html b/src/main/twirl/helper/diff.scala.html new file mode 100644 index 0000000..0360230 --- /dev/null +++ b/src/main/twirl/helper/diff.scala.html @@ -0,0 +1,101 @@ +@(diffs: Seq[util.JGitUtil.DiffInfo], repository: service.RepositoryService.RepositoryInfo, commitId: Option[String])(implicit context: app.Context) +@import context._ +@import view.helpers._ +@import org.eclipse.jgit.diff.DiffEntry.ChangeType +@diffs.zipWithIndex.map { case (diff, i) => + + + + + + + + +
+ @if(diff.changeType == ChangeType.COPY || diff.changeType == ChangeType.RENAME){ + @diff.oldPath -> @diff.newPath + } + @if(diff.changeType == ChangeType.ADD || diff.changeType == ChangeType.MODIFY){ + @diff.newPath + } + @if(diff.changeType == ChangeType.DELETE){ + @diff.oldPath + } + @if(commitId.isDefined){ + + } +
+ @if(diff.newContent != None || diff.oldContent != None){ +
+ + + } else { + Not supported + } +
+} + + + + + \ No newline at end of file diff --git a/src/main/twirl/helper/dropdown.scala.html b/src/main/twirl/helper/dropdown.scala.html new file mode 100644 index 0000000..d5e2c11 --- /dev/null +++ b/src/main/twirl/helper/dropdown.scala.html @@ -0,0 +1,10 @@ +@(body: Html) +
+ + +
diff --git a/src/main/twirl/helper/paginator.scala.html b/src/main/twirl/helper/paginator.scala.html new file mode 100644 index 0000000..4a37d81 --- /dev/null +++ b/src/main/twirl/helper/paginator.scala.html @@ -0,0 +1,34 @@ +@(page: Int, count: Int, limit: Int, width: Int, baseURL: String) +@defining(view.Pagination(page, count, service.IssuesService.IssueLimit, width)){ p => + @if(p.count > p.limit){ + + } +} diff --git a/src/main/twirl/helper/preview.scala.html b/src/main/twirl/helper/preview.scala.html new file mode 100644 index 0000000..642c3bc --- /dev/null +++ b/src/main/twirl/helper/preview.scala.html @@ -0,0 +1,43 @@ +@(repository: service.RepositoryService.RepositoryInfo, content: String, enableWikiLink: Boolean, + enableCommitLink: Boolean, enableIssueLink: Boolean, style: String = "", placeholder: String = "Leave a comment")(implicit context: app.Context) +@import context._ +@import view.helpers._ +
+ +
+
+ + +
+
+
+
+
+
+
+ + + diff --git a/src/main/twirl/issues/create.scala.html b/src/main/twirl/issues/create.scala.html index 123cde0..9e40430 100644 --- a/src/main/twirl/issues/create.scala.html +++ b/src/main/twirl/issues/create.scala.html @@ -14,39 +14,27 @@
No one is assigned -
- - -
+ @helper.html.dropdown { +
  • Clear assignee
  • +
  • + @collaborators.map { collaborator => +
  • @collaborator
  • + } + }
    No milestone -
    - - -
    + @helper.html.dropdown { +
  • No milestone
  • +
  • + @milestones.map { milestone => +
  • @milestone.title
  • + } + }

    - @html.preview(repository, "", false, true, true, "width: 650px; height: 200px;") + @helper.html.preview(repository, "", false, true, true, "width: 650px; height: 200px;") diff --git a/src/main/twirl/issues/issue.scala.html b/src/main/twirl/issues/issue.scala.html index 749a703..5eb8634 100644 --- a/src/main/twirl/issues/issue.scala.html +++ b/src/main/twirl/issues/issue.scala.html @@ -48,7 +48,7 @@
    - @html.preview(repository, "", false, true, true, "width: 730px; height: 100px;") + @helper.html.preview(repository, "", false, true, true, "width: 730px; height: 100px;")
    diff --git a/src/main/twirl/issues/list.scala.html b/src/main/twirl/issues/list.scala.html index 0834e7e..51fba6f 100644 --- a/src/main/twirl/issues/list.scala.html +++ b/src/main/twirl/issues/list.scala.html @@ -41,21 +41,15 @@ Milestone: @milestones.find(_.milestoneId == condition.milestoneId.get.get).map(_.title) } } -
    - - -
    + @helper.html.dropdown { + @if(condition.milestoneId.isDefined){ +
  • Clear milestone filter
  • + } +
  • Issues with no milestone
  • + @milestones.map { milestone => +
  • @milestone.title
  • + } + } @if(condition.milestoneId.isDefined && condition.milestoneId.get.isDefined){
    @if(closedCount > 0){ @@ -97,7 +91,7 @@ }
    - @html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.IssuesService.IssueLimit, 7, condition.toURL) + @helper.html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.IssuesService.IssueLimit, 7, condition.toURL)
    @openCount Open @@ -160,7 +154,7 @@ }
    - @html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.IssuesService.IssueLimit, 10, condition.toURL) + @helper.html.paginator(page, (if(condition.state == "open") openCount else closedCount), service.IssuesService.IssueLimit, 10, condition.toURL)
    diff --git a/src/main/twirl/issues/milestones/edit.scala.html b/src/main/twirl/issues/milestones/edit.scala.html index 1e2513f..02461c3 100644 --- a/src/main/twirl/issues/milestones/edit.scala.html +++ b/src/main/twirl/issues/milestones/edit.scala.html @@ -17,7 +17,7 @@
    - @html.datepicker("dueDate", milestone.flatMap(_.dueDate)) + @helper.html.datepicker("dueDate", milestone.flatMap(_.dueDate))

    diff --git a/src/main/twirl/paginator.scala.html b/src/main/twirl/paginator.scala.html deleted file mode 100644 index 4a37d81..0000000 --- a/src/main/twirl/paginator.scala.html +++ /dev/null @@ -1,34 +0,0 @@ -@(page: Int, count: Int, limit: Int, width: Int, baseURL: String) -@defining(view.Pagination(page, count, service.IssuesService.IssueLimit, width)){ p => - @if(p.count > p.limit){ - - } -} diff --git a/src/main/twirl/preview.scala.html b/src/main/twirl/preview.scala.html deleted file mode 100644 index 642c3bc..0000000 --- a/src/main/twirl/preview.scala.html +++ /dev/null @@ -1,43 +0,0 @@ -@(repository: service.RepositoryService.RepositoryInfo, content: String, enableWikiLink: Boolean, - enableCommitLink: Boolean, enableIssueLink: Boolean, style: String = "", placeholder: String = "Leave a comment")(implicit context: app.Context) -@import context._ -@import view.helpers._ -
    - -
    -
    - - -
    -
    -
    -
    -
    -
    -
    - - - diff --git a/src/main/twirl/repo/commit.scala.html b/src/main/twirl/repo/commit.scala.html index f646de3..479baa4 100644 --- a/src/main/twirl/repo/commit.scala.html +++ b/src/main/twirl/repo/commit.scala.html @@ -93,7 +93,7 @@ } - @html.diff(diffs, repository, Some(commit.id)) + @helper.html.diff(diffs, repository, Some(commit.id)) }