From 15ab361febdd594abdb87af50b2e135322187d34 Mon Sep 17 00:00:00 2001 From: Adrian Fish Date: Sun, 10 Nov 2024 11:45:46 +0000 Subject: [PATCH] SAK-50675 portal Remove widgets from profile sidebar https://sakaiproject.atlassian.net/browse/SAK-50675 --- .../config/bundle/default.sakai.properties | 9 ---- .../impl/RuntimeRegistrationTest.java | 6 --- .../impl/UserMessagingServiceTests.java | 1 - .../portal/api/PortalConstants.java | 1 - .../portal/charon/SkinnableCharonPortal.java | 5 --- .../charon/handlers/BasePortalHandler.java | 2 - .../portal/charon/handlers/SiteHandler.java | 5 --- .../webapp/vm/morpheus/includeStandardHead.vm | 18 +------- .../vm/morpheus/snippets/profile-snippet.vm | 43 ------------------- .../bundle-entry-points/body-scripts.js | 3 -- 10 files changed, 2 insertions(+), 91 deletions(-) diff --git a/config/configuration/bundles/src/bundle/org/sakaiproject/config/bundle/default.sakai.properties b/config/configuration/bundles/src/bundle/org/sakaiproject/config/bundle/default.sakai.properties index 44aab4470136..83c881cc3ce7 100644 --- a/config/configuration/bundles/src/bundle/org/sakaiproject/config/bundle/default.sakai.properties +++ b/config/configuration/bundles/src/bundle/org/sakaiproject/config/bundle/default.sakai.properties @@ -5374,15 +5374,6 @@ # DEFAULT: false #quartz.seedsites.autorun=true -# Set this to false to hide the bullhorn icon in the topbar and disable bullhorn event harvesting. -# DEFAULT: true -#portal.bullhorns.enabled=false - -# Turn on notifications debugging in the browser console, for both server sent events and push. -# -# DEFAULT: false -#portal.notifications.debug=true - # Enable push notifications. This has to be enabled for bullhorn alerts - setting this to false will # effectively halt any bullhorn alerts. When set to true (the default) the browser will request a # push subscription from the browser vendor's push service, followed by the browser sending those diff --git a/kernel/kernel-impl/src/test/java/org/sakaiproject/messaging/impl/RuntimeRegistrationTest.java b/kernel/kernel-impl/src/test/java/org/sakaiproject/messaging/impl/RuntimeRegistrationTest.java index fc0b0fbda7c2..360c7696e4ad 100644 --- a/kernel/kernel-impl/src/test/java/org/sakaiproject/messaging/impl/RuntimeRegistrationTest.java +++ b/kernel/kernel-impl/src/test/java/org/sakaiproject/messaging/impl/RuntimeRegistrationTest.java @@ -58,12 +58,6 @@ public class RuntimeRegistrationTest extends SakaiTests { @Autowired private ServerConfigurationService serverConfigurationService; @Autowired private UserMessagingService userMessagingService; - @Before - public void setup() { - - when(serverConfigurationService.getBoolean(eq("portal.bullhorns.enabled"), anyBoolean())).thenReturn(true); - } - @Test public void givenNoHandlers_whenInitializing_thenItStartsUp() { diff --git a/kernel/kernel-impl/src/test/java/org/sakaiproject/messaging/impl/UserMessagingServiceTests.java b/kernel/kernel-impl/src/test/java/org/sakaiproject/messaging/impl/UserMessagingServiceTests.java index d84c10a9a706..13b3c32b3a13 100644 --- a/kernel/kernel-impl/src/test/java/org/sakaiproject/messaging/impl/UserMessagingServiceTests.java +++ b/kernel/kernel-impl/src/test/java/org/sakaiproject/messaging/impl/UserMessagingServiceTests.java @@ -90,7 +90,6 @@ public void setup() { when(userDirectoryService.getUser(instructor)).thenReturn(instructorUser); } catch (UserNotDefinedException unde) {} - when(serverConfigurationService.getBoolean("portal.bullhorns.enabled", true)).thenReturn(true); when(userTimeService.dateTimeFormat(any(), any(), any())).thenReturn("07 Feb 1971");; userNotification1 = new UserNotification(); diff --git a/portal/portal-api/api/src/java/org/sakaiproject/portal/api/PortalConstants.java b/portal/portal-api/api/src/java/org/sakaiproject/portal/api/PortalConstants.java index 62d2b31b19c8..85adef3e09ac 100644 --- a/portal/portal-api/api/src/java/org/sakaiproject/portal/api/PortalConstants.java +++ b/portal/portal-api/api/src/java/org/sakaiproject/portal/api/PortalConstants.java @@ -63,7 +63,6 @@ public class PortalConstants { public static final String PROP_POWERED_BY_IMAGE = "powered.img"; public static final String PROP_POWERED_BY_URL = "powered.url"; public static final String PROP_PUSH_NOTIFICATIONS = "portal.notifications.push.enabled"; - public static final String PROP_PUSH_NOTIFICATIONS_DEBUG = "portal.notifications.debug"; public static final String PROP_SAKAI_VERSION = "version.sakai"; public static final String PROP_SERVICE_NAME = "ui.service"; public static final String PROP_SERVICE_VERSION = "version.service"; diff --git a/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java b/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java index 1f9c897fef97..fb2e5e6c2bfa 100644 --- a/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java +++ b/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/SkinnableCharonPortal.java @@ -187,7 +187,6 @@ public class SkinnableCharonPortal extends HttpServlet implements Portal { private String[] poweredByImage; private String[] poweredByUrl; private boolean containerLogin; - private boolean debugNotifications; private boolean displayUserloginInfo; private boolean enableDirect; private boolean forceContainer; @@ -242,7 +241,6 @@ public void init(ServletConfig config) throws ServletException { containerLogin = serverConfigurationService.getBoolean(PROP_CONTAINER_LOGIN, false); copyrightText = serverConfigurationService.getString(PROP_COPYRIGHT_TEXT); - debugNotifications = serverConfigurationService.getBoolean(PROP_PUSH_NOTIFICATIONS_DEBUG, false); displayUserloginInfo = serverConfigurationService.getBoolean(PROP_DISPLAY_USER_LOGIN, true); enableGAM = serverConfigurationService.getString(PROP_GLOBAL_ALERT_MESSAGE, "false"); favIconUrl = serverConfigurationService.getString(PROP_PORTAL_FAV_ICON); @@ -1029,8 +1027,6 @@ public PortalRenderContext startPageContext(String siteType, String title, Strin rcontext.put("notificationsPushEnabled", notificationsPushEnabled); - rcontext.put("debugNotifications", debugNotifications); - rcontext.put("tasksEnabled" , tasksEnabled); return rcontext; @@ -1528,7 +1524,6 @@ public void includeBottom(PortalRenderContext rcontext, Site site) { rcontext.put("bottomNavSakaiVersion", sakaiVersion); rcontext.put("bottomNavServer", serverId); rcontext.put("useBullhornAlerts", useBullhornAlerts); - rcontext.put("bullhornAlertCount", useBullhornAlerts ? userMessagingService.getNotifications().size() : 0); rcontext.put("chromeInfoUrl", serverConfigurationService.getString("notifications.chrome.info.url", "")); rcontext.put("firefoxInfoUrl", serverConfigurationService.getString("notifications.firefox.info.url", "")); rcontext.put("safariInfoUrl", serverConfigurationService.getString("notifications.safari.info.url", "")); diff --git a/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/BasePortalHandler.java b/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/BasePortalHandler.java index 623871b0ce48..919b35f1c5c8 100644 --- a/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/BasePortalHandler.java +++ b/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/BasePortalHandler.java @@ -221,7 +221,5 @@ protected void addTimeInfo(PortalRenderContext rcontext) { TimeZone userTz = timeService.getLocalTimeZone(); rcontext.put("userTimezone", userTz.getID()); rcontext.put("userTimezoneOffsetMillis", userTz.getOffset(now)); - String iso8601 = Instant.now().atZone(ZoneId.of(userTz.getID())).toLocalDateTime().toString(); - rcontext.put("userISO8601Timestamp", iso8601); } } diff --git a/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/SiteHandler.java b/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/SiteHandler.java index 36afb49c72f9..7f4c95fb555a 100644 --- a/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/SiteHandler.java +++ b/portal/portal-impl/impl/src/java/org/sakaiproject/portal/charon/handlers/SiteHandler.java @@ -590,12 +590,7 @@ public void doSite(HttpServletRequest req, HttpServletResponse res, Session sess } rcontext.put("siteId", siteId); - boolean showShortDescription = Boolean.valueOf(serverConfigurationService.getBoolean("portal.title.shortdescription.show", false)); - if (showShortDescription) { - rcontext.put("shortDescription", Web.escapeHtml(site.getShortDescription())); - } - if (siteService.isUserSite(siteId)){ rcontext.put("siteTitle", rb.getString("sit_mywor") ); rcontext.put("siteUrl", site.getUrl()); diff --git a/portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeStandardHead.vm b/portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeStandardHead.vm index 52ee79c2bf7e..49e6bcbb61a2 100644 --- a/portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeStandardHead.vm +++ b/portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/includeStandardHead.vm @@ -8,10 +8,6 @@ @@ -67,9 +52,10 @@ #parse("/vm/morpheus/snippets/title-snippet.vm") - ## TRINITY-43 Review before merging to master #parse("/vm/morpheus/snippets/portalCSS-snippet.vm") + + diff --git a/portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/snippets/profile-snippet.vm b/portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/snippets/profile-snippet.vm index 44ccb3df2345..458d65a78225 100644 --- a/portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/snippets/profile-snippet.vm +++ b/portal/portal-render-engine-impl/impl/src/webapp/vm/morpheus/snippets/profile-snippet.vm @@ -55,49 +55,6 @@ -
- #if (${tasksEnabled}) -
-
- -
-
-
- ## Tasks webcomponent - -
-
-
- #end -
-
- -
-
-
- ## Calendar webcomponent - -
-
-
-
-
- -
-
-
- ## Grades webcomponent - -
-
-
-
diff --git a/webcomponents/tool/src/main/frontend/bundle-entry-points/body-scripts.js b/webcomponents/tool/src/main/frontend/bundle-entry-points/body-scripts.js index 9e1bd50c7e73..9fe186dda873 100644 --- a/webcomponents/tool/src/main/frontend/bundle-entry-points/body-scripts.js +++ b/webcomponents/tool/src/main/frontend/bundle-entry-points/body-scripts.js @@ -1,7 +1,4 @@ import "@sakai-ui/sakai-permissions/sakai-permissions.js"; import "@sakai-ui/sakai-search/sakai-search.js"; -import "@sakai-ui/sakai-calendar/sakai-calendar.js"; -import "@sakai-ui/sakai-grades/sakai-grades.js"; -import "get-browser-fingerprint"; import { init as initJumpToTop } from "@sakai-ui/sakai-jump-to-top/sakai-jump-to-top.js"; initJumpToTop();