Commit e8c0a3e6 by Anton Sudak

Add modals to all kind of pages (cms-managed and standalone)

parent 2b599914
......@@ -3,7 +3,7 @@
@import ch.insign.cms.models.Template
@import ch.insign.cms.views.html.{_loginFormModal, deleteBlockModal, restrictBlockModal, unrestrictBlockModal}
@import ch.insign.cms.controllers.AuthController
@import ch.insign.playauth.views.helper.hasPermission
@import ch.insign.playauth.views.helper.{hasPermission, anonymous}
@import ch.insign.cms.permissions.BlockPermission
@(
page: ch.insign.cms.models.Page,
......@@ -19,20 +19,21 @@
<body @hasPermission(BlockPermission.MODIFY){class="fe-admin"}>
@Some(page).map {
case cmsManaged: PageBlock => {
@_loginFormModal(AuthController.LOGIN_FORM, flash.get("backUrl"), Messages("frontend.login.modal.title"))
@_blockBase(cmsManaged, add, edit, delete, restrict, name, color, sortableContainer, CssClass)(content)
@if(!Template.isIndexer && cmsManaged.canModify) {
@deleteBlockModal()
@restrictBlockModal()
@unrestrictBlockModal()
}
}
case _ => {
@*Here could be any standalone specific code*@
@content
}
}
@anonymous {
@_loginFormModal(AuthController.LOGIN_FORM, flash.get("backUrl"), Messages("frontend.login.modal.title"))
}
@hasPermission(BlockPermission.MODIFY) {
@deleteBlockModal()
@restrictBlockModal()
@unrestrictBlockModal()
}
</body>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment