[Notice] Announcing the End of Demo Server [Read me]

Fix error pages that don't work for anonymous
Error pages wasn't shown correctly for anonymous. The error pages used a template in app/views/siteLayout.scala.html which ignored the given content and rendered always the intro page if the current user is anonymous. Decide whether to show the intro page or not in index.scala.html not siteLayout.scala.html.
@31c6c0736e54471ce5f359cc73043dca37727ed0
--- app/views/index/index.scala.html
+++ app/views/index/index.scala.html
... | ... | @@ -24,7 +24,9 @@ |
24 | 24 |
@import utils.JodaDateUtil |
25 | 25 |
|
26 | 26 |
@siteLayout(utils.Config.getSiteName, utils.MenuType.SITE_HOME) { |
27 |
- @if(currentUser != User.anonymous){ |
|
27 |
+ @if(currentUser == User.anonymous){ |
|
28 |
+ @partial_intro() |
|
29 |
+ } else { |
|
28 | 30 |
<div class="page-wrap-outer"> |
29 | 31 |
<div class="page-wrap"> |
30 | 32 |
<div class="site-guide-outer hide"> |
--- app/views/siteLayout.scala.html
+++ app/views/siteLayout.scala.html
... | ... | @@ -25,11 +25,7 @@ |
25 | 25 |
@layout(Messages(title))(""){ |
26 | 26 |
@common.navbar(menuType, null, null) |
27 | 27 |
|
28 |
- @if(menuType == utils.MenuType.SITE_HOME && UserApp.currentUser.isAnonymous){ |
|
29 |
- @index.partial_intro() |
|
30 |
- } else { |
|
31 |
- @content |
|
32 |
- } |
|
28 |
+ @content |
|
33 | 29 |
|
34 | 30 |
@common.footer() |
35 | 31 |
} |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?