(refs #1491)Note helper.assets as deprecated.

Use assets(path: String)(implicit context: Context) instead. It adds the hash value which is generated from bootstrap timestamp to the resource url automatically.
This commit is contained in:
Naoki Takezoe
2017-03-14 10:07:16 +09:00
parent 43aff74ad2
commit 2cb29654e9
2 changed files with 8 additions and 7 deletions

View File

@@ -224,6 +224,7 @@ object helpers extends AvatarImageProvider with LinkConverter with RequestCache
/**
* Returns the url to the root of assets.
*/
@deprecated("Use assets(path: String)(implicit context: Context) instead.", "4.11.0")
def assets(implicit context: Context): String = s"${context.path}/assets"
/**

View File

@@ -4,7 +4,7 @@
@import gitbucket.core.view.helpers
@gitbucket.core.account.html.main(account, groupNames, "activity"){
<div class="pull-right">
<a href="@context.path/@{account.userName}.atom"><img src="@{helpers.assets}/common/images/feed.png" alt="activities"></a>
<a href="@context.path/@{account.userName}.atom"><img src="@helpers.assets("/common/images/feed.png")" alt="activities"></a>
</div>
@gitbucket.core.helper.html.activities(activities)
}