]> source.dussan.org Git - archiva.git/blob
da4645e37e1f608e7984ff775cf3935c748428fa
[archiva.git] /
1 <%--
2   ~ Copyright 2005-2006 The Apache Software Foundation.
3   ~
4   ~ Licensed under the Apache License, Version 2.0 (the "License");
5   ~ you may not use this file except in compliance with the License.
6   ~ You may obtain a copy of the License at
7   ~
8   ~      http://www.apache.org/licenses/LICENSE-2.0
9   ~
10   ~ Unless required by applicable law or agreed to in writing, software
11   ~ distributed under the License is distributed on an "AS IS" BASIS,
12   ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   ~ See the License for the specific language governing permissions and
14   ~ limitations under the License.
15   --%>
16
17 <%@ taglib prefix="s" uri="/struts-tags" %>
18 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
19 <%@ taglib uri="/redback/taglib-1.0" prefix="redback" %>
20 <%@ taglib uri="http://www.extremecomponents.org" prefix="ec" %>
21
22 <html> 
23 <s:i18n name="org.apache.archiva.redback.struts2.default">
24 <head>
25   <title><s:text name="user.list.page.title"/></title>
26   <link rel="stylesheet" type="text/css" href="<s:url value="/css/redback/table.css"/>" media="screen"/>
27 </head>
28
29 <body>
30
31 <%@ include file="/WEB-INF/jsp/redback/include/formValidationResults.jsp" %>
32
33 <!-- ec on redback should not be dependent on the resource bundle of the project using it -->
34 <s:set name="username" value="%{getText('username')}"/>
35 <s:set name="fullName" value="%{getText('full.name')}"/>
36 <s:set name="email" value="%{getText('email')}"/>
37 <s:set name="permanent" value="%{getText('user.list.permanent')}"/>
38 <s:set name="validated" value="%{getText('user.list.validated')}"/>
39 <s:set name="locked" value="%{getText('user.list.locked')}"/>
40 <s:set name="tasks" value="%{getText('user.list.tasks')}"/>
41
42 <h2><s:text name="user.list.section.title"><s:param>${roleName}</s:param></s:text></h2>
43
44 <table class="outerTableRegion" cellpadding="0" cellspacing="0">
45 <tr>
46 <td><ec:table 
47     var="user" 
48     items="users" 
49     action="${pageContext.request.contextPath}/security/userlist!show.action"
50     imagePath="${pageContext.request.contextPath}/images/redback/table/*.gif"
51     autoIncludeParameters="false"
52     title="Users"
53     filterable="true"
54     showTitle="false"
55     showExports="false"
56     view="org.apache.archiva.redback.integration.eXc.views.SecurityView"
57     sortRowsCallback="org.apache.archiva.redback.integration.eXc.ProcessUserRowsCallback"
58     cellspacing="2"
59     cellpadding="3"
60     >
61     <%-- TODO: Fix export download. --%>
62     <ec:export 
63        view="csv" 
64        fileName="users.csv" 
65        imageName="csv"
66        tooltip="Export Table to CSV (Comma Seperated Values)."/>
67     <ec:export 
68        view="xls" 
69        fileName="users.xls" 
70        imageName="xls"
71        tooltip="Export Table to Excel format."/>
72     <ec:row>          
73         <ec:column property="username" title="${username}" 
74                 filterCell="org.apache.archiva.redback.integration.eXc.SecurityFilterCell">
75           <img src="<c:url value="/images/redback/icon-user.gif"/>" />
76           <redback:ifAuthorized permission="user-management-user-edit" resource="${user.username}">
77             <s:url id="usereditUrl" action="useredit" includeParams="none">
78               <s:param name="username">${user.username}</s:param>
79             </s:url>
80             <s:a href="%{usereditUrl}"><c:out value="${user.username}" /></s:a>
81           </redback:ifAuthorized>
82           <redback:elseAuthorized>
83             <redback:ifAuthorized permission="user-management-user-role" resource="${user.username}">
84               <s:url id="usereditUrl" action="useredit" includeParams="none">
85                 <s:param name="username">${user.username}</s:param>
86               </s:url>
87               <s:a href="%{usereditUrl}"><c:out value="${user.username}" /></s:a>
88             </redback:ifAuthorized>
89             <redback:elseAuthorized>
90               <c:out value="${user.username}" />
91             </redback:elseAuthorized>
92           </redback:elseAuthorized>
93         </ec:column>
94         <ec:column property="fullName" title="${fullName}" alias="fullname" 
95                 filterCell="org.apache.archiva.redback.integration.eXc.SecurityFilterCell">
96           <c:out value="${user.fullName}" />
97         </ec:column>
98         <ec:column property="email" title="${email}" cell="org.apache.archiva.redback.integration.eXc.MailtoCell"
99                 filterCell="org.apache.archiva.redback.integration.eXc.SecurityFilterCell" />
100         <ec:column property="permanent" cell="org.apache.archiva.redback.integration.eXc.CheckboxImageCell"
101                 style="text-align: center" title="${permanent}" filterable="false"/> <%-- Boolean's can't be filtered --%>
102         <ec:column property="validated" cell="org.apache.archiva.redback.integration.eXc.CheckboxImageCell"
103                 style="text-align: center" title="${validated}" filterable="false"/> <%-- Boolean's can't be filtered --%>
104         <ec:column property="locked" cell="org.apache.archiva.redback.integration.eXc.CheckboxImageCell"
105                 style="text-align: center" title="${locked}" filterable="false"/> <%-- Boolean's can't be filtered --%>
106         
107         <ec:column title="${tasks}" alias="tasks" sortable="false" filterable="false" styleClass="tasks">
108           <c:if test="${user.permanent eq false}">
109             <redback:ifAuthorized permission="user-management-user-delete" resource="${user.username}">
110               <s:token/>
111               <s:url id="userdeleteUrl" action="userdelete">
112                 <s:param name="username">${user.username}</s:param>
113                 <s:param name="struts.token.name">struts.token</s:param>
114                 <s:param name="struts.token"><s:property value="struts.token"/></s:param>
115               </s:url>
116               <s:a href="%{userdeleteUrl}" title="delete user">
117                   <img src="<c:url value="/images/redback/delete.gif"/>" border="none"/>
118               </s:a>              
119             </redback:ifAuthorized>
120           </c:if>
121         </ec:column>
122     </ec:row>    
123 </ec:table></td>
124 </tr>
125
126 <%--
127 <tr><td></td></tr>
128 <tr>
129
130 <td>
131     <redback:ifAuthorized permission="user-management-user-create">
132       <div class="task createUser">
133         <s:form action="usercreate!show" namespace="/security" theme="simple" method="post">
134           <s:submit cssClass="button" value="Create New User" />
135         </s:form>
136       </div>
137     </redback:ifAuthorized>
138 </td>
139 </tr> --%>
140 </table>
141
142 <br>
143 <br>
144 <b><s:text name="user.list.tools"/></b>
145 <br>
146
147 <table class="tools" border="0" cellspacing="1" cellpadding="0">
148
149 <tr>
150   <th class="toolHeading"><s:text name="user.list.tasks"/></th>
151   <th class="toolHeading column"><s:text name="user.list.reports"/></th>
152 </tr>
153
154 <tr>
155   <td valign="top">
156     <p class="description"><s:text name="user.list.message"/></p>
157      
158     <redback:isNotReadOnlyUserManager>
159     <redback:ifAuthorized permission="user-management-user-create">
160       <div class="task createUser">
161         <s:form action="usercreate!show" namespace="/security" theme="simple" method="post">
162           <s:token/>
163           <s:submit cssClass="button" value="%{getText('user.list.create.new.user')}" id="userCreateButton"/>
164         </s:form>
165       </div>
166     </redback:ifAuthorized>
167     </redback:isNotReadOnlyUserManager>
168
169     <div class="task showRoles">
170       <s:form action="userlist!show" namespace="/security" theme="simple" method="get">
171         <s:submit cssClass="button" value="%{getText('user.list.show.users.in.role')}" />
172         <s:select list="roles"
173                    name="roleName"
174                    value="roleName"
175                    listKey="name"
176                    listValue="name"
177                    headerKey=""
178                    headerValue="Any"/>
179       </s:form>
180     </div>
181     
182   </td>
183   
184   <td valign="top" class="column">
185     <table cellspacing="0" cellpadding="0" border="0" class="reports">
186       <tr>
187         <th><s:text name="name"/></th>
188         <th><s:text name="user.list.types"/></th>
189       </tr>
190       
191       <c:forEach items="${reportMap}" var="reportEntry">
192         <tr>
193           <td class="reportName" nowrap="nowrap">
194             <c:forEach items="${reportEntry.value}" var="report" varStatus="status">
195               <c:if test="${status.first}">
196                 ${report.value.name}
197               </c:if>
198             </c:forEach>
199           </td>
200           <td class="reportViews">
201           <c:forEach items="${reportEntry.value}" var="report" varStatus="status">
202             <a href="<c:url value="/security/report!generate.action?reportId=${report.value.id}&reportType=${report.value.type}"/>" 
203               title="${report.value.name} Report (${report.value.type} type)"><img 
204               src="<c:url value="/images/redback/table/${report.value.type}.gif"/>" /></a>
205           </c:forEach>
206           </td>
207         </tr>
208       </c:forEach>
209     </table>
210   </td>
211 </tr>
212
213 </table>
214
215 </body>
216 </s:i18n>
217 </html>