1 | <head> |
---|
2 | <meta name='layout' content='springSecurityUI'/> |
---|
3 | <title><g:message code='spring.security.ui.user.search'/></title> |
---|
4 | </head> |
---|
5 | |
---|
6 | <body> |
---|
7 | |
---|
8 | <div> |
---|
9 | |
---|
10 | <s2ui:form width='100%' height='375' elementId='formContainer' |
---|
11 | titleCode='spring.security.ui.user.search'> |
---|
12 | |
---|
13 | <g:form action='userSearch' name='userSearchForm'> |
---|
14 | |
---|
15 | <br/> |
---|
16 | |
---|
17 | <table> |
---|
18 | <tbody> |
---|
19 | |
---|
20 | <tr> |
---|
21 | <td><g:message code='user.username.label' default='Username'/>:</td> |
---|
22 | <td colspan='3'><g:textField name='username' size='50' maxlength='255' autocomplete='off' value='${username}'/></td> |
---|
23 | </tr> |
---|
24 | <tr> |
---|
25 | <td> </td> |
---|
26 | <td><g:message code='spring.security.ui.search.true'/></td> |
---|
27 | <td><g:message code='spring.security.ui.search.false'/></td> |
---|
28 | <td><g:message code='spring.security.ui.search.either'/></td> |
---|
29 | </tr> |
---|
30 | <tr> |
---|
31 | <td><g:message code='user.enabled.label' default='Enabled'/>:</td> |
---|
32 | <g:radioGroup name='enabled' labels="['','','']" values="[1,-1,0]" value='${enabled}'> |
---|
33 | <td><%=it.radio%></td> |
---|
34 | </g:radioGroup> |
---|
35 | </tr> |
---|
36 | |
---|
37 | <tr> |
---|
38 | <td><g:message code='user.accountExpired.label' default='Account Expired'/>:</td> |
---|
39 | <g:radioGroup name='accountExpired' labels="['','','']" values="[1,-1,0]" value='${accountExpired}'> |
---|
40 | <td><%=it.radio%></td> |
---|
41 | </g:radioGroup> |
---|
42 | </tr> |
---|
43 | <tr> |
---|
44 | <td><g:message code='user.accountLocked.label' default='Account Locked'/>:</td> |
---|
45 | <g:radioGroup name='accountLocked' labels="['','','']" values="[1,-1,0]" value='${accountLocked}'> |
---|
46 | <td><%=it.radio%></td> |
---|
47 | </g:radioGroup> |
---|
48 | </tr> |
---|
49 | <tr> |
---|
50 | <td><g:message code='user.passwordExpired.label' default='Password Expired'/>:</td> |
---|
51 | <g:radioGroup name='passwordExpired' labels="['','','']" values="[1,-1,0]" value='${passwordExpired}'> |
---|
52 | <td><%=it.radio%></td> |
---|
53 | </g:radioGroup> |
---|
54 | </tr> |
---|
55 | <tr><td colspan='4'> </td></tr> |
---|
56 | <tr> |
---|
57 | <td colspan='4'><s2ui:submitButton elementId='search' form='userSearchForm' messageCode='spring.security.ui.search'/></td> |
---|
58 | </tr> |
---|
59 | </tbody> |
---|
60 | </table> |
---|
61 | </g:form> |
---|
62 | |
---|
63 | </s2ui:form> |
---|
64 | |
---|
65 | <g:if test='${searched}'> |
---|
66 | |
---|
67 | <% |
---|
68 | def queryParams = [username: username, enabled: enabled, accountExpired: accountExpired, accountLocked: accountLocked, passwordExpired: passwordExpired] |
---|
69 | %> |
---|
70 | |
---|
71 | <div class="list"> |
---|
72 | <table> |
---|
73 | <thead> |
---|
74 | <tr> |
---|
75 | <g:sortableColumn property="username" title="${message(code: 'user.username.label', default: 'Username')}" params="${queryParams}"/> |
---|
76 | <g:sortableColumn property="enabled" title="${message(code: 'user.enabled.label', default: 'Enabled')}" params="${queryParams}"/> |
---|
77 | <g:sortableColumn property="accountExpired" title="${message(code: 'user.accountExpired.label', default: 'Account Expired')}" params="${queryParams}"/> |
---|
78 | <g:sortableColumn property="accountLocked" title="${message(code: 'user.accountLocked.label', default: 'Account Locked')}" params="${queryParams}"/> |
---|
79 | <g:sortableColumn property="passwordExpired" title="${message(code: 'user.passwordExpired.label', default: 'Password Expired')}" params="${queryParams}"/> |
---|
80 | </tr> |
---|
81 | </thead> |
---|
82 | |
---|
83 | <tbody> |
---|
84 | <g:each in="${results}" status="i" var="user"> |
---|
85 | <tr class="${(i % 2) == 0 ? 'odd' : 'even'}"> |
---|
86 | <td><g:link action="edit" id="${user.id}">${fieldValue(bean: user, field: "username")}</g:link></td> |
---|
87 | <td><g:formatBoolean boolean="${user.enabled}"/></td> |
---|
88 | <td><g:formatBoolean boolean="${user.accountExpired}"/></td> |
---|
89 | <td><g:formatBoolean boolean="${user.accountLocked}"/></td> |
---|
90 | <td><g:formatBoolean boolean="${user.passwordExpired}"/></td> |
---|
91 | </tr> |
---|
92 | </g:each> |
---|
93 | </tbody> |
---|
94 | </table> |
---|
95 | </div> |
---|
96 | |
---|
97 | <div class="paginateButtons"> |
---|
98 | <g:paginate total="${totalCount}" params="${queryParams}" /> |
---|
99 | </div> |
---|
100 | |
---|
101 | <div style="text-align:center"> |
---|
102 | <s2ui:paginationSummary total="${totalCount}"/> |
---|
103 | </div> |
---|
104 | |
---|
105 | </g:if> |
---|
106 | |
---|
107 | </div> |
---|
108 | |
---|
109 | <script> |
---|
110 | $(document).ready(function() { |
---|
111 | $("#username").focus().autocomplete({ |
---|
112 | minLength: 3, |
---|
113 | cache: false, |
---|
114 | source: "${createLink(action: 'ajaxUserSearch')}" |
---|
115 | }); |
---|
116 | }); |
---|
117 | |
---|
118 | <s2ui:initCheckboxes/> |
---|
119 | |
---|
120 | </script> |
---|
121 | |
---|
122 | </body> |
---|