Skip to content

Commit

Permalink
SAK-43433 - Overview / manage overview updates places user in Site In…
Browse files Browse the repository at this point in the history
…fo tool (sakaiproject#9076)
  • Loading branch information
jonespm authored Mar 10, 2021
1 parent 04c7980 commit 2393a4f
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3836,7 +3836,6 @@ else if (((String) state.getAttribute(STATE_SITE_MODE)).equalsIgnoreCase(SITE_MO
if(fromHome) {
context.put("back", page.getId());
}
state.removeAttribute("fromHome");

return (String) getContext(data).get("template") + TEMPLATE[65];
}
Expand Down Expand Up @@ -7679,6 +7678,7 @@ public void doCancel_overview(RunData data) {
state.removeAttribute("overview");
state.removeAttribute("site");
state.removeAttribute("allWidgets");
state.removeAttribute("fromHome");

doCancel(data);
}
Expand Down Expand Up @@ -7773,6 +7773,14 @@ && getStateSite(state) == null) {
state.removeAttribute(STATE_SITE_PARTICIPANT_FILTER);
state.setAttribute(STATE_TEMPLATE_INDEX, SiteConstants.SITE_INFO_TEMPLATE_INDEX);
}
else if ("65".equals(currentIndex)) { //after manage overview, go back to where the call was made
String pageId = params.getString("back");
if(StringUtils.isNotEmpty(pageId) && !"12".equals(pageId)) {
String redirectionUrl = getDefaultSiteUrl(ToolManager.getCurrentPlacement().getContext()) + "/" + SiteService.PAGE_SUBTYPE + "/" + pageId;
sendParentRedirect((HttpServletResponse) ThreadLocalManager.get(RequestFilter.CURRENT_HTTP_RESPONSE), redirectionUrl);
}
state.setAttribute(STATE_TEMPLATE_INDEX, "12");
}
// if all fails to match
else if (isTemplateVisited(state, SiteConstants.SITE_INFO_TEMPLATE_INDEX)) {
// go to site info list view
Expand Down Expand Up @@ -16107,6 +16115,7 @@ public void doSave_overview(RunData data)
state.removeAttribute("overview");
state.removeAttribute("site");
state.removeAttribute("allWidgets");
state.removeAttribute("fromHome");

// TODO: hard coding this frame id is fragile, portal dependent, and needs to be fixed -ggolden
schedulePeerFrameRefresh("sitenav");
Expand Down

0 comments on commit 2393a4f

Please sign in to comment.