| <?xml version="1.0" encoding="UTF-8"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (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.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <page:page |
| xmlns:jx="http://apache.org/cocoon/templates/jx/1.0" |
| xmlns:page="http://apache.org/cocoon/lenya/cms-page/1.0" |
| xmlns="http://www.w3.org/1999/xhtml" |
| xmlns:i18n="http://apache.org/cocoon/i18n/2.1" |
| > |
| |
| <page:body> |
| <jx:import uri="fallback://lenya/modules/usecase/templates/tabs.jx"/> |
| <div id="contentblock1" class="lenya-tab"> |
| |
| <h1><i18n:text>Users</i18n:text></h1> |
| |
| <table class="lenya-table-noborder"> |
| <tr> |
| <td colspan="2"> |
| <jx:import uri="fallback://lenya/modules/usecase/templates/messages.jx"/> |
| </td> |
| </tr> |
| </table> |
| |
| <div style="margin-bottom: 10px;"> |
| <table class="lenya-table-noborder"> |
| <tr> |
| <td style="padding: 0; margin: 0 10px 0 0;"> |
| <i18n:text>Add User</i18n:text>:  |
| </td> |
| <jx:forEach var="type" items="${usecase.getParameter('userTypes')}"> |
| <td style="padding: 0; margin: 0 10px 0 0;"> |
| <form method="GET" id="form-add_user"> |
| <input type="hidden" name="lenya.usecase" value="${type.getCreateUseCase()}"/> |
| <input type="hidden" name="className" value="${type.getClassName()}"/> |
| <input type="hidden" name="userType" value="${type.getKey()}"/> |
| <input i18n:attr="value" type="submit" value="${type.getKey()}" name="input-add_user"/> |
| </form> |
| </td> |
| </jx:forEach> |
| </tr> |
| </table> |
| </div> |
| |
| <table cellspacing="0" class="lenya-table-list-noborder"> |
| <tr> |
| <th><i18n:text>User ID</i18n:text></th> |
| <th><i18n:text>Full Name</i18n:text></th> |
| <th><i18n:text>Groups</i18n:text></th> |
| <th><i18n:text>Actions</i18n:text></th> |
| </tr> |
| <jx:forEach var="user" items="${usecase.getParameter('users')}"> |
| <tr> |
| <td style="vertical-align: middle"> |
| <a href="${usecase.getSourceURL()}?lenya.usecase=admin.user&userId=${user.getId()}"><jx:out value="${user.getId()}"/></a> |
| </td> |
| <td style="vertical-align: middle"> |
| <jx:out value="${user.getName()}"/> |
| </td> |
| <td> |
| <jx:set var="groups" value="${user.getGroups()}"/> |
| <jx:set var="groupIds" value="${java.util.TreeSet()}"/> |
| <jx:forEach var="group" items="${groups}"> |
| <jx:set var="ignore" value="${groupIds.add(group.getId())}"/> |
| </jx:forEach> |
| <jx:forEach var="group" items="${groupIds}"><jx:if test="${group != groupIds.first()}">, </jx:if> |
| <a href="${usecase.getSourceURL()}?lenya.usecase=admin.group&groupId=${group}"><jx:out value="${group}"/></a></jx:forEach> |
| </td> |
| <td style="vertical-align: middle"> |
| <form method="GET" id="form-delete_user"> |
| <input type="hidden" name="lenya.usecase" value="admin.deleteUser"/> |
| <input name="userId" type="hidden" value="${user.getId()}"/> |
| <jx:choose> |
| <jx:when test="${user.equals(usecase.getParameter('currentUser'))}"> |
| <input i18n:attr="value" type="submit" value="Delete" disabled="disabled" name="input-delete_user"/> |
| </jx:when> |
| <jx:otherwise> |
| <input i18n:attr="value" type="submit" value="Delete" name="input-delete_user"/> |
| </jx:otherwise> |
| </jx:choose> |
| </form> |
| </td> |
| </tr> |
| </jx:forEach> |
| </table> |
| |
| </div> |
| </page:body> |
| </page:page> |