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>Requestmap List</title>
  7.   </head>
  8.   <body>
  9.    <div class="nav">
  10.       <span class="menuButton"><a href="${createLinkTo(dir:'')}"><g:message code="home" default="Home" /></a></span>
  11.       <span class="menuButton"><g:link action="create"><g:message code="requestmap.new" default="New Requestmap" /></g:link></span>
  12.     </div>
  13.     <div class="body">
  14.       <h1><g:message code="requestmap.list" default="Requestmap List" /></h1>
  15.       <g:if test="${flash.message}">
  16.         <div class="message">
  17.           ${flash.message}
  18.         </div>
  19.       </g:if>
  20.       <table>
  21.         <thead>
  22.           <tr>
  23.                
  24.             <g:sortableColumn property="id" title="Id" />
  25.                   
  26.             <g:sortableColumn property="url" title="URL" />
  27.                   
  28.             <g:sortableColumn property="configAttribute" title="Roles" />
  29.                   
  30.             <th></th>
  31.           </tr>
  32.         </thead>
  33.         <tbody>
  34.           <g:each in="${requestmapList}">
  35.           <tr>
  36.                        
  37.             <td>${it.id?.encodeAsHTML()}</td>
  38.                        
  39.             <td>${it.url?.encodeAsHTML()}</td>
  40.                        
  41.             <td>
  42.               <%
  43.                 String[] configAttrs=
  44.                         org.springframework.util.StringUtils.
  45.                         commaDelimitedListToStringArray(it.configAttribute);
  46.               %>
  47.   <g:each var="role" in="${configAttrs}">
  48.     <g:if test="${role.startsWith('ROLE_')}">            
  49.                ${role?.substring(5)?.toLowerCase()?.encodeAsHTML()},
  50.              </g:if>
  51.              <g:else>
  52.                ${role?.encodeAsHTML()}
  53.              </g:else>
  54.               </g:each>
  55.             </td>
  56.                      
  57.             <td class="actionButtons">
  58.               <span class="actionButton">
  59.                 <g:link action="show" id="${it.id}">Show</g:link>
  60.               </span>
  61.             </td>
  62.           </tr>
  63.           </g:each>
  64.         </tbody>
  65.       </table>
  66.       <div class="paginateButtons">
  67.         <g:paginate total="${Requestmap.count()}" />
  68.       </div>
  69.     </div>
  70.   </body>
  71. </html>