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 =>
|
registry.getGlobalAction(method, path).map { action =>
|
||||||
// Create Context
|
// Create Context
|
||||||
val loginAccount = req.getSession.getAttribute(Keys.Session.LoginAccount).asInstanceOf[Account]
|
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
|
// Invoke global action
|
||||||
action(req, res, context) match {
|
action(req, res, context) match {
|
||||||
@@ -36,7 +36,8 @@ class PluginActionFilter extends Filter with SystemSettingsService {
|
|||||||
res.getWriter.flush()
|
res.getWriter.flush()
|
||||||
case x: Html =>
|
case x: Html =>
|
||||||
res.setContentType("text/html; charset=UTF-8")
|
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()
|
res.getWriter.flush()
|
||||||
}
|
}
|
||||||
}.getOrElse {
|
}.getOrElse {
|
||||||
|
|||||||
Reference in New Issue
Block a user