Skip to content

Commit

Permalink
SAK-50675 portal Remove widgets from profile sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish committed Nov 18, 2024
1 parent aabf9ec commit 15ab361
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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", ""));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@

<script>
var portal = {
"bullhorns": {
"enabled": $!{useBullhornAlerts},
"alertCount": $!{bullhornAlertCount}
},
"i18n": {
"theme_switch_to_light": "$rloader.sit_theme_switch_to_light",
"theme_switch_to_dark": "$rloader.sit_theme_switch_to_dark",
Expand All @@ -20,8 +16,6 @@
"portalPath": "$!{portalPath}",
"loggedOutUrl": "$!{loggedOutUrl}",
"siteId": "$!{siteId}",
"siteTitle": "$!{siteTitle}",
"shortDescription" : "$!{shortDescription}",
"toolsCollapsed": #if ($toolsCollapsed) true #else false #end,
"locale": "$!{locale}" || "en-US",
"serverTimeMillis": "$!{serverTimeMillis}",
Expand All @@ -31,25 +25,18 @@
"userType": "$!{userType}",
"siteRole": "$!{userSiteRole}",
"impersonatorDisplayId": "$!{impersonatorDisplayId}",
"iso8601Timestamp": "$!{userISO8601Timestamp}",
"timezone": "$!{userTimezone}",
"offsetFromServerMillis": "$!{userTimezoneOffsetMillis}"
},
"timeoutDialog" : {
"enabled": $!{timeoutDialogEnabled},
"seconds": $!{timeoutDialogWarningSeconds}
},
"toggle" : {
"allowauto": false,
"tools": false,
"sitenav": false // This is not allowed in morpheus
},
"pageScriptPath" : "$!{pageScriptPath}",
"editor" : {
"type": "$!{editorType}",
},
"portalCDNQuery" : "$!{portalCDNQuery}",
"sakaiSkin" : "$!{pageSkin}",
"userTheme" : "$!{userTheme}",
#if ($themesAutoDetectDark)
"userThemeAutoDetectDark" : true,
Expand All @@ -58,18 +45,17 @@
"format" : [#foreach( $format in $mathJaxFormat )"${format}",#end]
},
toolTitles : {#foreach ($entry in $toolTitles.entrySet())"$entry.key": "$entry.value",#end},
notifications: { pushEnabled: $!notificationsPushEnabled, debug: $!debugNotifications },
serviceName: "$serviceName",
};
</script>

<script type="module" src="/webcomponents/bundles/base.js$!{portalCDNQuery}"></script>

#parse("/vm/morpheus/snippets/title-snippet.vm")

## TRINITY-43 Review before merging to master
#parse("/vm/morpheus/snippets/portalCSS-snippet.vm")

<link rel="manifest" href="/manifest.json" />

<link href="${pageWebjarsPath}jquery-ui/1.12.1/jquery-ui.min.css$!{portalCDNQuery}" rel="stylesheet" />
<link href="${pageScriptPath}jquery/cluetip/1.2.10/css/jquery.cluetip.css$!{portalCDNQuery}" rel="stylesheet">
<link href="${pageWebjarsPath}qtip2/3.0.3-1/jquery.qtip.min.css$!{portalCDNQuery}" rel="stylesheet">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,49 +55,6 @@
</ul>
</div>

<div class="accordion flex-grow-1 overflow-auto" id="sakai-accountPanelWidgets">
#if (${tasksEnabled})
<div class="accordion-item">
<div class="accordion-header" id="sakai-accountPanelWidgets-headingOne">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sakai-accountPanelWidgets-collapseOne" aria-expanded="false" aria-controls="sakai-accountPanelWidgets-collapseOne">
${rloader.sit_mytasks}
</button>
</div>
<div id="sakai-accountPanelWidgets-collapseOne" class="accordion-collapse collapse" aria-labelledby="sakai-accountPanelWidgets-headingOne">
<div class="accordion-body p-2">
## Tasks webcomponent
<sakai-tasks site-id="$!{siteId}" defer></sakai-tasks>
</div>
</div>
</div>
#end
<div class="accordion-item">
<div class="accordion-header" id="sakai-accountPanelWidgets-headingTwo">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sakai-accountPanelWidgets-collapseTwo" aria-expanded="false" aria-controls="sakai-accountPanelWidgets-collapseTwo">
${rloader.sit_mycalendar}
</button>
</div>
<div id="sakai-accountPanelWidgets-collapseTwo" class="accordion-collapse collapse" aria-labelledby="sakai-accountPanelWidgets-headingTwo">
<div class="accordion-body p-2">
## Calendar webcomponent
<sakai-calendar user-id="${loginUserId}" defer></sakai-calendar>
</div>
</div>
</div>
<div class="accordion-item">
<div class="accordion-header" id="sakai-accountPanelWidgets-headingThree">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#sakai-accountPanelWidgets-collapseThree" aria-expanded="false" aria-controls="sakai-accountPanelWidgets-collapseThree">
${rloader.sit_mygrades}
</button>
</div>
<div id="sakai-accountPanelWidgets-collapseThree" class="accordion-collapse collapse" aria-labelledby="sakai-accountPanelWidgets-headingThree">
<div class="accordion-body p-2">
## Grades webcomponent
<sakai-grades defer></sakai-grades>
</div>
</div>
</div>
</div>
<div class="text-center pt-3 mt-auto">
<a href="${loginLogInOutUrl}" title="${loginMessage}" id="loginLink1" class="bi bi-box-arrow-right btn btn-primary w-100" data-warning="${logoutWarningMessage}">
<span class="Mrphs-login-Message">${loginMessage}</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -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();

0 comments on commit 15ab361

Please sign in to comment.