mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-08 22:45:51 +01:00
Render Html with layout template
This commit is contained in:
@@ -25,7 +25,7 @@ class PluginActionFilter extends Filter with SystemSettingsService {
|
||||
registry.getGlobalAction(method, path).map { action =>
|
||||
// Create Context
|
||||
val loginAccount = req.getSession.getAttribute(Keys.Session.LoginAccount).asInstanceOf[Account]
|
||||
val context = Context(loadSystemSettings(), Option(loginAccount), req)
|
||||
implicit val context = Context(loadSystemSettings(), Option(loginAccount), req)
|
||||
|
||||
// Invoke global action
|
||||
action(req, res, context) match {
|
||||
@@ -36,7 +36,8 @@ class PluginActionFilter extends Filter with SystemSettingsService {
|
||||
res.getWriter.flush()
|
||||
case x: Html =>
|
||||
res.setContentType("text/html; charset=UTF-8")
|
||||
res.getWriter.write(x.body)
|
||||
// TODO title of plugin action
|
||||
res.getWriter.write(html.main("TODO")(x).body)
|
||||
res.getWriter.flush()
|
||||
}
|
||||
}.getOrElse {
|
||||
|
||||
Reference in New Issue
Block a user