mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 05:55:51 +01:00
Move extendsHtmlSeq which provides mkHtml to view.helpers because it's used at only views.
This commit is contained in:
@@ -25,11 +25,6 @@ object Implicits {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
implicit def extendsHtmlSeq(seq: Seq[Html]) = new {
|
|
||||||
def mkHtml(separator: String) = Html(seq.mkString(separator))
|
|
||||||
def mkHtml(separator: scala.xml.Elem) = Html(seq.mkString(separator.toString))
|
|
||||||
}
|
|
||||||
|
|
||||||
implicit def extendsColumn(c1: Column[Boolean]) = new {
|
implicit def extendsColumn(c1: Column[Boolean]) = new {
|
||||||
def &&(c2: => Column[Boolean], guard: => Boolean): Column[Boolean] = if(guard) c1 && c2 else c1
|
def &&(c2: => Column[Boolean], guard: => Boolean): Column[Boolean] = if(guard) c1 && c2 else c1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,4 +54,9 @@ object helpers {
|
|||||||
// convert commit id to link
|
// convert commit id to link
|
||||||
.replaceAll("(^|\\W)([a-f0-9]{40})(\\W|$)", "$1<a href=\"%s/%s/%s/commit/$2\">$2</a>$3").format(context.path, repository.owner, repository.name))
|
.replaceAll("(^|\\W)([a-f0-9]{40})(\\W|$)", "$1<a href=\"%s/%s/%s/commit/$2\">$2</a>$3").format(context.path, repository.owner, repository.name))
|
||||||
|
|
||||||
|
implicit def extendsHtmlSeq(seq: Seq[Html]) = new {
|
||||||
|
def mkHtml(separator: String) = Html(seq.mkString(separator))
|
||||||
|
def mkHtml(separator: scala.xml.Elem) = Html(seq.mkString(separator.toString))
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user