⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 list.jsp

📁 本系统有十分强大的功能
💻 JSP
字号:
<%-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the OpenCustomer CRM.
   -
   - The Initial Developer of the Original Code is
   - Thomas Bader (Bader & Jene Software-Ingenieurb黵o).
   - Portions created by the Initial Developer are Copyright (C) 2005
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -   Thomas Bader <thomas.bader@bader-jene.de>
   -
   - ***** END LICENSE BLOCK ***** --%>
   
<%@ include file="/tiles/page.jsp" %>

<%@ page import="org.opencustomer.db.dao.system.RoleDAO" %>
<%@ page import="org.opencustomer.webapp.auth.Right" %>
<%@ page import="org.opencustomer.webapp.Globals" %>

<tiles:insert definition="standard">
	<tiles:put name="page.title"><panel:title/></tiles:put>
	<tiles:put name="page.content">
		
	<panel:attributes/>
			
	<script type="text/javascript">
	<!--
		function edit(i) {
			document.location="<%=response.encodeURL(request.getContextPath()+"/system/management/role/edit.do?id=")%>"+i;
		}
	//-->
	</script>
		
	<% boolean admin = false; %>	
	<logic:equal name="<%=Globals.USER_KEY%>" property="profile.role.admin" scope="session" value="true">
	<% admin = true; %>
	</logic:equal>
	
	<html:errors/>

	<html:form action="/system/management/role" styleClass="list" style="width: 600px;">
		<fieldset class="search">
			<legend><bean:message key="default.block.search"/></legend>
			<table class="search">
				<colgroup>
					<col/><%
					if(admin) { %>
					<col width="175px"/><%
					}%>
				</colgroup>
				<tr>
					<td>
						<common:label property="name" errorStyleId="error"><bean:message key="entity.system.role.name"/></common:label>
						<html:text property="name" styleId="name"/>
					</td><%
					if(admin) { %>
					<td>
						<common:label property="admin" errorStyleId="error"><bean:message key="entity.system.role.admin"/></common:label>
						<html:select property="admin" styleId="locked">
							<html:option value="<%=RoleDAO.AdminSelect.ALL.toString()%>">&nbsp;</html:option>
							<html:option value="<%=RoleDAO.AdminSelect.ADMIN.toString()%>"><bean:message key="default.boolean.true"/></html:option>
							<html:option value="<%=RoleDAO.AdminSelect.NOT_ADMIN.toString()%>"><bean:message key="default.boolean.false"/></html:option>
						</html:select>
					</td><%
					}%>
				</tr>
			</table>
			<div class="action">
				<html:image property="doSearch" pageKey="image.icon.search.url" styleClass="default"/>
				<html:image property="doResetSearch" pageKey="image.icon.searchClean.url" titleKey="image.icon.searchClean.text" altKey="image.icon.searchClean.text"/>
				<html:image property="doSearch" pageKey="image.icon.search.url" titleKey="image.icon.search.text" altKey="image.icon.search.text"/>
			</div>
		</fieldset>
		<oc:authenticate right="<%=Right.ADMINISTRATION_USERMANAGEMENT_WRITE.getLabel()%>">
		<fieldset class="listAction">
			<html:link action="/system/management/role/edit" titleKey="image.icon.add.text">
				<html:img styleClass="action" altKey="image.icon.add.text" titleKey="image.icon.add.text" pageKey="image.icon.add.url"/>
			</html:link>
		</fieldset>		
		</oc:authenticate>
		<fieldset class="list">
			<legend>
				<common:paginationInfo 
					textKey="entity.system.role" 
					name="panel_listScroll" 
					scope="page"/>
			</legend>
			<div class="pagination">
				<common:paginationMenu 
					name="panel_listScroll" 
					scope="page"/>
			</div>
			<table class="result">
				<colgroup>
					<col/><%
					if(admin) { %>
					<col width="175px"/><%
					}%>
				</colgroup>
				<tr>
					<th>
						<common:sort
	  					 	messageKey="entity.system.role.name"
							property="<%=String.valueOf(RoleDAO.SORT_NAME)%>"/>
					</th><%
					if(admin) { %>
					<th><bean:message key="entity.system.role.admin"/></th><%
					}%>
				</tr>
				<logic:iterate id="data" indexId="index" name="panel_list" scope="page">
				<tr class="<common:rowSwap name="index" number="3" odd="rowOdd" even="rowEven"/>" onmouseover="this.className='rowActive';" onmouseout="this.className='<common:rowSwap name="index" number="3" odd="rowOdd" even="rowEven"/>'">
					<td onclick="edit(<bean:write name="data" property="id" scope="page"/>);">
						<bean:write name="data" property="name" scope="page"/>
					</td><%
					if(admin) { %>
					<td onclick="edit(<bean:write name="data" property="id" scope="page"/>);">
						<logic:equal name="data" property="admin" scope="page" value="true">
						<bean:message key="default.boolean.true"/>
						</logic:equal>
						<logic:equal name="data" property="admin" scope="page" value="false">
						<bean:message key="default.boolean.false"/>
						</logic:equal>
					</td><%
					}%>
				</tr>
				</logic:iterate>
				<logic:notPresent name="index" scope="page">
				<tr class="noRow">
					<td colspan="<%if(admin){%>2<%}else{%>1<%}%>"><bean:message key="default.message.noEntries"/></td>
				</tr>
				</logic:notPresent>
			</table>
		</fieldset>
	</html:form>
		
	</tiles:put>
</tiles:insert>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -