list.gsp
上传用户:steveyhw
上传日期:2019-05-13
资源大小:307k
文件大小:2k
源码类别:

PlugIns编程

开发平台:

Java

  1.   
  2. <html>
  3.   <head>
  4.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  5.     <meta name="layout" content="main" />
  6.     <title><g:message code="user.list" default="Person List" /></title>
  7.   </head>
  8.   <body>
  9.     <div class="nav">
  10.       <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
  11.       <span class="menuButton"><g:link class="create" action="create"><g:message code="user.create" default="New Person" /></g:link></span>
  12.     </div>
  13.     <div class="body">
  14.       <h1><g:message code="user.list" default="Person List" /></h1>
  15.       <g:if test="${flash.message}">
  16.         <div class="message">
  17.           ${flash.message}
  18.         </div>
  19.       </g:if>
  20.      <div class="list">
  21.       <table>
  22.         <thead>
  23.           <tr>
  24.                
  25.             <g:sortableColumn property="id" title="Id" titleKey="id"/>
  26.                   
  27.             <g:sortableColumn property="username" title="Login Name" titleKey="user.loginName"/>
  28.                   
  29.             <g:sortableColumn property="userRealName" title="Full Name" titleKey="user.fullName"/>
  30.                   
  31.             <g:sortableColumn property="enabled" title="Enabled" titleKey="user.enabled"/>
  32.                   
  33.             <g:sortableColumn property="description" title="Description" titleKey="user.description"/>
  34.                   
  35.             <th></th>
  36.           </tr>
  37.         </thead>
  38.         <tbody>
  39.           <g:each in="${personList}" status="i" var="it">
  40.             <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
  41.                        
  42.               <td>${it.id?.encodeAsHTML()}</td>
  43.                        
  44.               <td>${it.username?.encodeAsHTML()}</td>
  45.                        
  46.               <td>${it.userRealName?.encodeAsHTML()}</td>
  47.                        
  48.               <td>${it.enabled?.encodeAsHTML()}</td>
  49.                        
  50.               <td>${it.description?.encodeAsHTML()}</td>
  51.                        
  52.               <td class="actionButtons">
  53.                 <span class="actionButton">
  54.                   <g:link action="show" id="${it.id}">Show</g:link>
  55.                 </span>
  56.               </td>
  57.             </tr>
  58.           </g:each>
  59.         </tbody>
  60.       </table>
  61.     </div>
  62.       <div class="paginateButtons">
  63.         <g:paginate total="${Person.count()}" />
  64.       </div>
  65.       
  66.     </div>
  67.   </body>
  68. </html>