📄 template_cleanpages.jsp
字号:
<%@page import = "java.util.*"%><%@page import = "org.jahia.services.pages.*"%><%@page import="org.jahia.bin.*"%><% List errors = (List) request.getAttribute("manageTemplatesErrors"); String errorString = ""; if (errors != null && errors.size() > 0) { StringBuffer buf = new StringBuffer(); buf.append("<ul>"); for (int i=0; i<errors.size(); i++) { buf.append("<li>").append(errors.get(i)); } buf.append("</ul>"); errorString = buf.toString(); } JahiaPageDefinition templ = (JahiaPageDefinition)request.getAttribute("templ"); Enumeration allPagesInfosEnumeration = (Enumeration) request.getAttribute("allPagesInfosEnumeration"); Enumeration allTemplatesEnumeration = (Enumeration) request.getAttribute("allTemplatesEnumeration"); Integer totalCriticalPages = (Integer) request.getAttribute("totalCriticalPages"); Integer basePageID = (Integer) request.getAttribute("basePageID"); Integer baseTemplateID = (Integer) request.getAttribute("baseTemplateID"); Integer homePageID = (Integer) request.getAttribute("homePageID"); String requestURI = (String) request.getAttribute("requestURI"); JahiaSite site = (JahiaSite) request.getAttribute("site"); int selectSize = (totalCriticalPages.intValue() < 15) ? totalCriticalPages.intValue() : 15;%><%@include file="include_header.jsp"%><script language="javascript"><!--function sendForm(subAction){ document.mainForm.subaction.value=subAction; document.mainForm.action="<%=requestURI%>?do=templates&sub=swap&templid=<%=templ.getID()%>"; document.mainForm.submit();}//--></script><tr> <td align="right" class="text" colspan="2"><b><% if ( site!= null ){%>site <%=site.getServerName()%> <%}%>:: Manage templates ::</b> </td></tr></table><table cellpadding="2" cellspacing="0" border="0" width="530"><tr> <td colspan="2" width="530"> </td></tr> <form name="mainForm" action="" method="post"><tr> <td width="100"> </td> <td width="430"> <table border="0"> <tr> <td nowrap> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td valign="top""> <font class="text2"><b>Template </b></font> <font class="text"><b><%=templ.getName()%></b></font> <font class="text2"><b>is still used by some page(s)</b></font> <br><br> <font class="text"> Before deleting this template, you must either<br> delete these pages or set another template for them.<br> </font><br> <select class="input" name="pageids" size="10" multiple > <% while(allPagesInfosEnumeration.hasMoreElements()) { JahiaPage jPage = (JahiaPage) allPagesInfosEnumeration.nextElement(); %> <option value="<%=jPage.getID()%>"><%=jPage.getTitle()%></option> <% } %> <option value="BLANK"> </option> </select> <br> <br> <font class="text">select one or more pages above,<br> choose template to assign below,<br> and click "Save Changes".</font><br><br> <select class="input" name="templateid"> <option value="0">-- Choose a template -- </option> <% while(allTemplatesEnumeration.hasMoreElements()) { JahiaPageDefinition pageDefinition = (JahiaPageDefinition) allTemplatesEnumeration.nextElement(); %> <option value="<%=pageDefinition.getID()%>" <%if(pageDefinition.getID()==baseTemplateID.intValue()){%>selected<%}%>><%=pageDefinition.getName()%></option> <% } %> </select> </td> </tr> <tr> <td align="right"> <br> <%if(!isLynx){%> <a href="javascript:sendForm('swap');" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('save','','<%=URL%>images/buttons/save_change_on.gif',1)"><img name="save" src="<%=URL%>images/buttons/save_change_off.gif" width="114" height="17" border="0"></a> <%}else{%> <br> <input type="submit" name="submit" value="Save changes >>"> <%}%> </td> </tr> </table> </td> </tr> <tr> <td> <br><br> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td nowrap valign="top"><font class="text"><b>Other operations: </b></font></td> <td valign="top"> <font class="text"> <%if(!isLynx){%><li> <%}%><a href="<%=JahiaAdministration.composeActionURL(request,response,"templates","&sub=display")%>">Back to templates list</a><br> <%if(!isLynx){%><li> <%}%><a href="<%=JahiaAdministration.composeActionURL(request,response,"displaymenu","")%>">Back to menu</a><br> </font> </td> </tr> </table> </td> </tr> </table> </td></tr> <input name="subaction" type="hidden" value=""> </form><tr> <td colspan="2" align="right"> <br> <br> <br> <font class="text2"><%=jahiaDisplayMessage%> </font> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="left"> <font class="text2"><%=errorString%> </font> </td> <td> </td> </tr> </table> </td></tr><tr> <td colspan="2"> </td></tr></table><%@include file="include_footer.jsp"%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -