This commit is contained in:
parent
4f3664b905
commit
7758eca11b
2 changed files with 11 additions and 3 deletions
|
@ -52,8 +52,10 @@ public class TabController extends VitroHttpServlet {
|
|||
|
||||
Portal portal = vreq.getPortal();
|
||||
|
||||
if (leadingTab.getTabId()==portal.getRootTabId())
|
||||
request.setAttribute("title",portal.getAppName());
|
||||
if (leadingTab.getTabId()==portal.getRootTabId()) {
|
||||
request.setAttribute("homePageRequested", "true");
|
||||
request.setAttribute("title",portal.getAppName());
|
||||
}
|
||||
else
|
||||
request.setAttribute("title",leadingTab.getTitle());
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.Portal;
|
||||
import edu.cornell.mannlib.vitro.webapp.beans.Tab;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.VitroRequest;
|
||||
import edu.cornell.mannlib.vitro.webapp.controller.freemarker.UrlBuilder;
|
||||
|
@ -60,7 +61,12 @@ public class TabMenu extends MainMenu {
|
|||
|
||||
private boolean isActiveItem(Tab tab) {
|
||||
String requestedTabId = vreq.getParameter(TAB_PARAM);
|
||||
return requestedTabId != null && Integer.parseInt(requestedTabId) == tab.getTabId();
|
||||
int tabId = tab.getTabId();
|
||||
if (requestedTabId == null) {
|
||||
return tabId == vreq.getPortal().getRootTabId() && "true".equals(vreq.getAttribute("homePageRequested"));
|
||||
} else {
|
||||
return Integer.parseInt(requestedTabId) == tabId;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue