diff --git a/src/main/scala/gitbucket/core/view/helpers.scala b/src/main/scala/gitbucket/core/view/helpers.scala index a60dcbb..f16e81c 100644 --- a/src/main/scala/gitbucket/core/view/helpers.scala +++ b/src/main/scala/gitbucket/core/view/helpers.scala @@ -80,6 +80,16 @@ def hashDate(date: Date): String = new SimpleDateFormat("yyyyMMddHHmmss").format(date) /** + * java.util.Date of boot timestamp. + */ + val bootDate: Date = new Date() + + /** + * hashDate of bootDate for /assets, /plugin-assets + */ + def hashQuery: String = hashDate(bootDate) + + /** * Returns singular if count is 1, otherwise plural. * If plural is not specified, returns singular + "s" as plural. */ @@ -217,6 +227,11 @@ def assets(implicit context: Context): String = s"${context.path}/assets" /** + * Returns the url to the path of assets. + */ + def assets(path: String)(implicit context: Context): String = s"${context.path}/assets${path}?${hashQuery}" + + /** * Generates the text link to the account page. * If user does not exist or disabled, this method returns user name as text without link. */ diff --git a/src/main/twirl/gitbucket/core/helper/diff.scala.html b/src/main/twirl/gitbucket/core/helper/diff.scala.html index 17fdea2..8217c37 100644 --- a/src/main/twirl/gitbucket/core/helper/diff.scala.html +++ b/src/main/twirl/gitbucket/core/helper/diff.scala.html @@ -130,8 +130,8 @@ } - - + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + @repository.map { repository => } - +