📄 homepagetool.jsp
字号:
<%@page import = "java.util.*"%><%@page import = "org.jahia.services.homepages.*"%><%@page import = "org.jahia.services.sites.*"%><%@page import = "org.jahia.services.pages.*"%><%@page import = "org.jahia.admin.homepages.HomePageTool"%><%@page import = "org.jahia.data.JahiaData"%><%@ taglib uri="JahiaLib" prefix="jahia"%><% Enumeration homePageEnumeration = (Enumeration)request.getAttribute("homePageEnumeration"); ArrayList sitePages = (ArrayList)request.getAttribute("sitePages"); JahiaSite jahiaSite = (JahiaSite)request.getAttribute("jahiaSite"); Integer pageID = (Integer)request.getAttribute("pageID"); // Page selected in the site map engine. String message = (String)request.getAttribute("message"); String homePageLabel = (String)session.getAttribute("homePageLabel"); Integer homePageID = (Integer)session.getAttribute("homePageID"); JahiaData jData = (JahiaData)request.getAttribute("org.jahia.data.JahiaData"); int initialSourcePageID = jahiaSite.getHomePageID(); if (pageID != null) { initialSourcePageID = pageID.intValue(); } else if (homePageID != null) { initialSourcePageID = homePageID.intValue(); }%><script language="javascript" src="<%=request.getContextPath()%>/jsp/jahia/javascript/selectbox.js"></script><script language="javascript">window.onunload = closeEngineWin;function callSiteMap() { <%=jData.gui().html().drawChoosePageTreeLauncher(HomePageTool.ENGINE_LAUNCHER_NAME, initialSourcePageID)%>}function handleKey(e){ submitForm('users', 'homepage', 'process');}</script><table class="text" border="0" width="80%"> <tr> <td align="right"><b>:: Home Page Tool ::</b></td> </tr></table><br><br><table class="text" border="0" cellpadding="0" cellspacing="0" align="center" width="90%"> <tr> <td> </td> <td colspan="2"> Please choose from one of the radio boxes below.<br> <br> A home page may be associated to a user/group in two ways :<br> <li> By using a home page definition as defined in the home page management menu (see Administration main menu). Select box 1 and choose the desired option from the drop down list. <li> By choosing an existing page from the list in box 2 or by clicking on the "Site Map" button to open a site map. Then choose a page from the displayed tree.<br> <br> </td> </tr> <% String choiceIndex = "[1]"; if (homePageEnumeration.hasMoreElements()) { %> <tr> <td> 1.<input type="radio" name="choice" value="homePageDef" onclick="javascript:document.mainForm.homePageDefID.focus();"> </td> <td colspan="2"> Use one of the following home page definitions : </td> </tr> <tr> <td> </td> <td colspan="2"> <select class="input" name="homePageDefID" onclick="javascript:document.mainForm.choice[0].checked = true;" ondblclick="javascript:handleKey(event);"> <% while (homePageEnumeration.hasMoreElements()) { JahiaHomepage homePage = (JahiaHomepage)homePageEnumeration.nextElement(); %> <option value="<%=homePage.getID()%>"> <%=homePage.getName()%> </option> <% } %> </select> </td> </tr> <% } else { %> <% if ("none".equals(homePageLabel)) { choiceIndex = ""; } else { choiceIndex = "[0]"; } %> <tr> <td>1.</td> <td colspan="2"> <i>No home page definitions available</i> </td> </tr> <% } %> <tr> <td> <img src="<%=request.getContextPath()%><jahia:engineResourceBundle resourceName="pixImg" />" width="1" height="12"> </td> </tr> <tr> <td> 2.<input type="radio" name="choice" value="sitePage" checked onclick="javascript:document.mainForm.pageID.focus();"> </td> <td colspan="2"> Use one of these <i><b><%=jahiaSite.getTitle()%></b></i> site pages : </td> </tr> <tr> <td> </td> <td valign="top"> <jahia:jahiaButton img="sort" href="javascript:sortSelectBox(document.mainForm.pageID, false);" alt="Sort by page title" /> </td> <td> <select class="input" name="pageID" size="10" onclick="javascript:document.mainForm.choice<%=choiceIndex%>.checked = true;" ondblclick="javascript:handleKey(event);"> <% for (int i = 0; i < sitePages.size(); i++) { JahiaPage jahiaPages = (JahiaPage)sitePages.get(i); %> <option value="<%=jahiaPages.getID()%>" <% if (initialSourcePageID == jahiaPages.getID()) { %>selected<% } %>> <%=jahiaPages.getTitle()%> <% if (jahiaPages.getID() == jahiaSite.getHomePageID()) { %> [root page]<% } %> </option> <% } %> </select> <jahia:jahiaButton img="siteMap" href="javascript:callSiteMap();" alt="Open the site map" /> </td> </tr> <% if (!"none".equals(homePageLabel)) { %> <tr> <td> <img src="<%=request.getContextPath()%><jahia:engineResourceBundle resourceName="pixImg" />" width="1" height="12"> </td> </tr> <tr> <td> 3.<input type="radio" name="choice" value="removeHomePage"> </td> <td colspan="2"> Remove home page </td> </tr> <% } %></table><br><table border="0" width="95%" align="center"> <tr> <td class="text2"> <%=message%> </td> </tr></table><br><table border="0" width="95%" align="center"> <tr> <td align="center"> <jahia:jahiaButton img="ok" href="javascript:submitForm('users', 'homepage', 'process');" alt="Apply modifications and close this window" /> <jahia:jahiaButton img="cancel" href="javascript:close();" alt="Close this window discarding modifications" /> </td> </tr></table>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -