diff --git a/webapps/plf-sites-extension/src/main/webapp/WEB-INF/conf/sites/portal/public/pages.xml b/webapps/plf-sites-extension/src/main/webapp/WEB-INF/conf/sites/portal/public/pages.xml index 073dc72fa..1e2472f01 100644 --- a/webapps/plf-sites-extension/src/main/webapp/WEB-INF/conf/sites/portal/public/pages.xml +++ b/webapps/plf-sites-extension/src/main/webapp/WEB-INF/conf/sites/portal/public/pages.xml @@ -19,7 +19,8 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. --> - @@ -101,7 +102,7 @@ false - + Everyone Everyone + + Everyone + + *:/platform/rewarding + + + gamification-portlets + CreateProgramButton + + Create Program Button + Everyone + false + + + Everyone *:/platform/administrators true - + Everyone Everyone diff --git a/webapps/plf-sites-extension/src/main/webapp/groovy/webui/container/UINoPublicProgramContainer.gtmpl b/webapps/plf-sites-extension/src/main/webapp/groovy/webui/container/UINoPublicProgramContainer.gtmpl new file mode 100644 index 000000000..f28eaa9ef --- /dev/null +++ b/webapps/plf-sites-extension/src/main/webapp/groovy/webui/container/UINoPublicProgramContainer.gtmpl @@ -0,0 +1,8 @@ +<% + import io.meeds.gamification.service.ProgramService; + + if(_ctx.getRequestContext().getUIApplication().isEditing() + || uicomponent.getApplicationComponent(ProgramService.class).countPublicPrograms() == 0) { + uicomponent.renderChildren(); + } +%> \ No newline at end of file diff --git a/webapps/plf-sites-extension/src/main/webapp/groovy/webui/container/UIOpenRegistrationContainer.gtmpl b/webapps/plf-sites-extension/src/main/webapp/groovy/webui/container/UIOpenRegistrationContainer.gtmpl new file mode 100644 index 000000000..9dae5d63b --- /dev/null +++ b/webapps/plf-sites-extension/src/main/webapp/groovy/webui/container/UIOpenRegistrationContainer.gtmpl @@ -0,0 +1,9 @@ +<% + import io.meeds.portal.security.service.SecuritySettingService; + import io.meeds.portal.security.constant.UserRegistrationType; + + if(_ctx.getRequestContext().getUIApplication().isEditing() + || UserRegistrationType.OPEN == uicomponent.getApplicationComponent(SecuritySettingService.class).getRegistrationType()) { + uicomponent.renderChildren(); + } +%> \ No newline at end of file