diff --git a/portlets/src/main/resources/locale/portlet/Challenges_en.properties b/portlets/src/main/resources/locale/portlet/Challenges_en.properties index 54900e29e0..49911b9493 100644 --- a/portlets/src/main/resources/locale/portlet/Challenges_en.properties +++ b/portlets/src/main/resources/locale/portlet/Challenges_en.properties @@ -442,7 +442,9 @@ gamification.overview.monthlyAchievements=Contributions of the Month gamification.overview.quarterlyAchievements=Contributions of the Quarter gamification.overview.noWeeklyAchievements=No contributions yet this week gamification.overview.actions=Actions +gamification.overview.space.actions=Community Actions gamification.overview.actionsList=Actions +gamification.overview.space.actionsList=Community Actions gamification.overview.programsList=Programs gamification.overview.space.programsList=Community Programs gamification.overview.leaderboard.drawer.title=Leaderboard @@ -614,6 +616,7 @@ gamification.rules.overviewSettings.actionsEndingSoon=Actions ending soon gamification.rules.overviewSettings.actionsToDoFirst=Actions to do first gamification.rules.overviewSettings.actionsAvailable=Actions Available gamification.rules.overviewSettings.actionsSoonAvailable=Actions Soon Available +gamification.rules.overviewSettings.hideWhenEmpty=Hide widget when no actions to list gamification.myContributions.title=My Contributions gamification.myContributions.settings.title=Edit Contributions Widget diff --git a/portlets/src/main/webapp/WEB-INF/conf/gamification/portal/dynamic-container-configuration.xml b/portlets/src/main/webapp/WEB-INF/conf/gamification/portal/dynamic-container-configuration.xml index 0260ecf702..1f3bb5a57b 100644 --- a/portlets/src/main/webapp/WEB-INF/conf/gamification/portal/dynamic-container-configuration.xml +++ b/portlets/src/main/webapp/WEB-INF/conf/gamification/portal/dynamic-container-configuration.xml @@ -325,6 +325,18 @@ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + + + + + hideWidgetWhenEmpty + + + true + + + + Rules Overview diff --git a/portlets/src/main/webapp/WEB-INF/jsp/rulesOverview.jsp b/portlets/src/main/webapp/WEB-INF/jsp/rulesOverview.jsp index 3a30eaf488..8f05f88f0a 100644 --- a/portlets/src/main/webapp/WEB-INF/jsp/rulesOverview.jsp +++ b/portlets/src/main/webapp/WEB-INF/jsp/rulesOverview.jsp @@ -30,6 +30,7 @@ if (Utils.canAccessAnonymousResources()) { String portletStorageId = ((String) request.getAttribute("portletStorageId")); String sortBy = request.getAttribute("rulesSortBy") == null ? "score" : ((String[]) request.getAttribute("rulesSortBy"))[0]; + String hideWidgetWhenEmpty = request.getAttribute("hideWidgetWhenEmpty") == null ? "false" : ((String[]) request.getAttribute("hideWidgetWhenEmpty"))[0]; String lockedRulesLimit = request.getAttribute("lockedRulesLimit") == null ? "2" : ((String[]) request.getAttribute("lockedRulesLimit"))[0]; String endingRulesLimit = request.getAttribute("endingRulesLimit") == null ? "2" : ((String[]) request.getAttribute("endingRulesLimit"))[0]; String availableRulesLimit = request.getAttribute("availableRulesLimit") == null ? "4" : ((String[]) request.getAttribute("availableRulesLimit"))[0]; @@ -46,6 +47,7 @@ <%=availableRulesLimit%>, <%=upcomingRulesLimit%>, '<%=sortBy%>', + <%=hideWidgetWhenEmpty%>, <%=canEdit%>, '<%=pageRef%>' )); diff --git a/portlets/src/main/webapp/vue-app/rulesOverview/components/RulesOverview.vue b/portlets/src/main/webapp/vue-app/rulesOverview/components/RulesOverview.vue index 4529bf6149..2737770f70 100644 --- a/portlets/src/main/webapp/vue-app/rulesOverview/components/RulesOverview.vue +++ b/portlets/src/main/webapp/vue-app/rulesOverview/components/RulesOverview.vue @@ -20,13 +20,14 @@ + v-if="$root.canEdit && !hidden" /> diff --git a/portlets/src/main/webapp/vue-app/rulesOverview/components/RulesOverviewSettingsDrawer.vue b/portlets/src/main/webapp/vue-app/rulesOverview/components/RulesOverviewSettingsDrawer.vue index 65cd13457c..ad2d37c4bc 100644 --- a/portlets/src/main/webapp/vue-app/rulesOverview/components/RulesOverviewSettingsDrawer.vue +++ b/portlets/src/main/webapp/vue-app/rulesOverview/components/RulesOverviewSettingsDrawer.vue @@ -25,8 +25,7 @@ v-model="drawer" :right="!$vuetify.rtl" :loading="loading" - eager - @closed="reset"> + eager> @@ -84,6 +83,12 @@ :step="1" class="ms-auto me-n1 my-0 pa-0" /> +
+
{{ $t('gamification.rules.overviewSettings.hideWhenEmpty') }}
+ +