" + + (if(escaped) code else escape(code, true)) + "" + } + + override def list(body: String, ordered: Boolean): String = { + var listType: String = null + if (ordered) { + listType = "ol" + } + else { + listType = "ul" + } + if(body.contains("""class="task-list-item-checkbox"""")){ + return "<" + listType + " class=\"task-list\">\n" + body + "" + listType + ">\n" + } else { + return "<" + listType + ">\n" + body + "" + listType + ">\n" + } + } + + override def listitem(text: String): String = { + if(text.contains("""class="task-list-item-checkbox" """)){ + return "
")
- var text: String = node.getText
- while (text.charAt(0) == '\n') {
- printer.print("
")
- text = text.substring(1)
- }
- printer.printEncoded(text)
- printer.print("")
- }
-}
-
-class GitBucketHtmlSerializer(
- markdown: String,
- repository: RepositoryService.RepositoryInfo,
- enableWikiLink: Boolean,
- enableRefsLink: Boolean,
- enableAnchor: Boolean,
- enableTaskList: Boolean,
- hasWritePermission: Boolean,
- pages: List[String]
- )(implicit val context: Context) extends ToHtmlSerializer(
- new GitBucketLinkRender(context, repository, enableWikiLink, pages),
- Map[String, VerbatimSerializer](VerbatimSerializer.DEFAULT -> new GitBucketVerbatimSerializer).asJava
- ) with LinkConverter with RequestCache {
-
- override protected def printImageTag(rendering: LinkRenderer.Rendering): Unit = {
- printer.print("")
- .print("@description
+@detectAndRenderLinks(description)
}| @date(day.head.commitTime) | -|||
|---|---|---|---|
| - @avatar(commit, 20) - @user(commit.authorName, commit.authorEmailAddress, "username") - | -@commit.shortMessage | -- @if(comments.isDefined){ - @comments.get.flatMap @{ - case comment: CommitComment => Some(comment) - case other => None - }.count(t => t.commitId == commit.id && !t.pullRequest) - } - | -- @commit.id.substring(0, 7) - | -
| + + @defining(commits.flatten){ commits => + @commits.size @plural(commits.size, "commit") + } + | ++ + @diffs.size @plural(diffs.size, "file") changed + | ++ + @defining(comments.collect { case c: gitbucket.core.model.CommitComment => c }){ comments => + @comments.size commit @plural(comments.size, "comment") + } + | ++ + @defining(commits.flatMap(_.map(_.authorEmailAddress)).distinct){ contributors => + @contributors.size @plural(contributors.size, "contributor") + } + | +
| + + @avatar(commit, 20) + @user(commit.authorName, commit.authorEmailAddress, "username strong") + | +@commit.shortMessage | + @* + @if(comments.isDefined){ + @comments.get.flatMap @{ + case comment: CommitComment => Some(comment) + case other => None + }.count(t => t.commitId == commit.id && !t.pullRequest) + } + *@ ++ @commit.id.substring(0, 7) + | +
Showing you all comments on commits in this comparison.
- @issues.html.commentlist(None, comments, hasWritePermission, repository, None) + @issues.html.commentlist(None, comments, false, repository, None) } } } \ No newline at end of file diff --git a/src/main/twirl/gitbucket/core/repo/blob.scala.html b/src/main/twirl/gitbucket/core/repo/blob.scala.html index b77d89d..9b3bead 100644 --- a/src/main/twirl/gitbucket/core/repo/blob.scala.html +++ b/src/main/twirl/gitbucket/core/repo/blob.scala.html @@ -11,7 +11,7 @@ @html.menu("code", repository){| + |
@@ -74,7 +74,7 @@
@if(commit.isDifferentFromAuthor) {
-
+
@user(commit.committerName, commit.committerEmailAddress, "username strong")
committed @helper.html.datetimeago(commit.commitTime)
diff --git a/src/main/twirl/gitbucket/core/repo/commits.scala.html b/src/main/twirl/gitbucket/core/repo/commits.scala.html
index 35c2149..41fee9e 100644
--- a/src/main/twirl/gitbucket/core/repo/commits.scala.html
+++ b/src/main/twirl/gitbucket/core/repo/commits.scala.html
@@ -60,7 +60,7 @@
@user(commit.authorName, commit.authorEmailAddress, "username")
authored @helper.html.datetimeago(commit.authorTime)
@if(commit.isDifferentFromAuthor) {
-
+
@user(commit.committerName, commit.committerEmailAddress, "username")
committed @helper.html.datetimeago(commit.authorTime)
}
diff --git a/src/main/twirl/gitbucket/core/repo/files.scala.html b/src/main/twirl/gitbucket/core/repo/files.scala.html
index 6b04bb7..dbfaec2 100644
--- a/src/main/twirl/gitbucket/core/repo/files.scala.html
+++ b/src/main/twirl/gitbucket/core/repo/files.scala.html
@@ -15,15 +15,15 @@
@html.menu("code", repository, Some(branch), pathList.isEmpty, groupNames.isEmpty, info, error){
@branchPullRequest.map{ case (pullRequest, issue) =>
- #@pullRequest.issueId
+ #@pullRequest.issueId
}.getOrElse{
-
+
}
@helper.html.branchcontrol(
branch,
@@ -66,7 +66,7 @@
@if(latestCommit.isDifferentFromAuthor) {
-
+
@user(latestCommit.committerName, latestCommit.committerEmailAddress, "username strong")
committed @helper.html.datetimeago(latestCommit.commitTime)
@@ -77,7 +77,7 @@
| ||||
|---|---|---|---|---|---|
| + | .. | @@ -85,7 +85,7 @@ } @files.map { file => | |||
| + | @if(file.isDirectory){ @if(file.linkUrl.isDefined){ @@ -96,7 +96,7 @@ } | -+ | @if(file.isDirectory){ @if(file.linkUrl.isDefined){ @@ -118,8 +118,7 @@ } | - - [@user(file.author, file.mailAddress)] + | @helper.html.datetimeago(file.time, false) |
| + |
diff --git a/src/main/twirl/gitbucket/core/search/issues.scala.html b/src/main/twirl/gitbucket/core/search/issues.scala.html
index df7baa6..c7795ea 100644
--- a/src/main/twirl/gitbucket/core/search/issues.scala.html
+++ b/src/main/twirl/gitbucket/core/search/issues.scala.html
@@ -24,7 +24,7 @@
Opened by @issue.openedUserName
@helper.html.datetimeago(issue.registeredDate)
@if(issue.commentCount > 0){
- @issue.commentCount @plural(issue.commentCount, "comment")
+ @issue.commentCount @plural(issue.commentCount, "comment")
}
diff --git a/src/main/twirl/gitbucket/core/settings/options.scala.html b/src/main/twirl/gitbucket/core/settings/options.scala.html
index e64287e..1e03356 100644
--- a/src/main/twirl/gitbucket/core/settings/options.scala.html
+++ b/src/main/twirl/gitbucket/core/settings/options.scala.html
@@ -91,9 +91,9 @@
*@
-
-
+
}
}
diff --git a/src/main/twirl/gitbucket/core/signinform.scala.html b/src/main/twirl/gitbucket/core/signinform.scala.html
index 0baaac4..7b5fb79 100644
--- a/src/main/twirl/gitbucket/core/signinform.scala.html
+++ b/src/main/twirl/gitbucket/core/signinform.scala.html
@@ -6,7 +6,7 @@
Create new account
}
- Sign in
+ Sign in
-
}
+ Pages @pages.length
+
+
+ @pages.zipWithIndex.map { case (page, i) =>
+
+ }
+ @if(pages.size > max){
+
+ }
+
+ }
Clone this wiki locally
@@ -51,16 +54,21 @@
+
@markdown(page.content, repository, true, false, false, false, pages)
|