Skip to content

Commit

Permalink
SAK-32537 Add calendar link to user drop-down menu. (sakaiproject#4433)
Browse files Browse the repository at this point in the history
* SAK-32537 Add calendar link to user drop-down menu.

* SAK-32537 Add calendar link - fix indentation.
  • Loading branch information
RebeccaMiller-Which authored and jonespm committed Feb 20, 2018
1 parent b6a7d2e commit ae4641a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,10 @@
# DEFAULT: sakai.sitesetup
# portal.worksitetool=sakai.sitesetup

# ID of the tool to use for the calendar - set to 'none' to suppress the top bar linking behavior
# DEFAULT: sakai.schedule
#portal.calendartool=sakai.schedule

# ID of the tool to use for preferences - set to 'none' to suppress the top bar linking behavior
# DEFAULT: sakai.preferences
# portal.preferencestool=sakai.preferences
Expand Down
1 change: 1 addition & 0 deletions portal/portal-impl/impl/src/bundle/sitenav.properties
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ sit_alltools = Go to the site to view all
sit_newsite = Create New Site
sit_tutorial = Tutorial
sit_profile = Profile
sit_calendar = Calendar
sit_preferences = Preferences
sit_connections = My Connections
sit_dashboard = Dashboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,12 @@ public Object getRenderContextObject()
processMySites();

String profileToolId = serverConfigurationService.getString("portal.profiletool","sakai.profile2");
String calendarToolId = serverConfigurationService.getString("portal.calendartool","sakai.schedule");
String preferencesToolId = serverConfigurationService.getString("portal.preferencestool","sakai.preferences");
String worksiteToolId = serverConfigurationService.getString("portal.worksitetool","sakai.sitesetup");

String profileToolUrl = null;
String calendarToolUrl = null;
String worksiteToolUrl = null;
String prefsToolUrl = null;
String mrphs_profileToolUrl = null;
Expand All @@ -148,6 +150,8 @@ public Object getRenderContextObject()
if ( profileToolId.equals(placement.getToolId()) ) {
profileToolUrl = Web.returnUrl(request, "/site/" + Web.escapeUrl(siteHelper.getSiteEffectiveId(s)) + "/page/" + Web.escapeUrl(p.getId()));
mrphs_profileToolUrl = Web.returnUrl(request, "/site/" + Web.escapeUrl(siteHelper.getSiteEffectiveId(s)) + "/tool-reset/" + Web.escapeUrl(placement.getId()));
} else if ( calendarToolId.equals(placement.getToolId()) ) {
calendarToolUrl = Web.returnUrl(request, "/site/" + Web.escapeUrl(siteHelper.getSiteEffectiveId(s)) + "/page/" + Web.escapeUrl(p.getId()));
} else if ( preferencesToolId.equals(placement.getToolId()) ) {
prefsToolUrl = Web.returnUrl(request, "/site/" + Web.escapeUrl(siteHelper.getSiteEffectiveId(s)) + "/page/" + Web.escapeUrl(p.getId()));
mrphs_prefsToolUrl = Web.returnUrl(request, "/site/" + Web.escapeUrl(siteHelper.getSiteEffectiveId(s)) + "/tool-reset/" + Web.escapeUrl(placement.getId()));
Expand All @@ -168,6 +172,9 @@ public Object getRenderContextObject()
renderContextMap.put("profileToolUrl", profileToolUrl);
renderContextMap.put("mrphs_profileToolUrl", mrphs_profileToolUrl);
}
if ( calendarToolUrl != null ) {
renderContextMap.put("calendarToolUrl", calendarToolUrl);
}
if ( prefsToolUrl != null ) {
renderContextMap.put("prefsToolUrl", prefsToolUrl);
renderContextMap.put("mrphs_prefsToolUrl", mrphs_prefsToolUrl);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,16 @@
</a>
</li>

#if (${tabsSites.calendarToolUrl})

<li class="Mrphs-userNav__submenuitem Mrphs-userNav__submenuitem-indented">
<a role="menuitem" href="${tabsSites.calendarToolUrl}" class="Mrphs-userNav__submenuitem--calendar">
<span>${rloader.sit_calendar}</span>
</a>
</li>

#end ## END of IF (${tabsSites.calendarToolUrl})

#if (${tabsSites.prefsToolUrl})

<li class="Mrphs-userNav__submenuitem Mrphs-userNav__submenuitem-indented">
Expand Down

0 comments on commit ae4641a

Please sign in to comment.