|
|
|
@ -1,3 +1,9 @@
|
|
|
|
|
<%@page import="java.util.Iterator"%> |
|
|
|
|
<%@page import="com.liferay.portal.kernel.dao.orm.OrderFactoryUtil"%> |
|
|
|
|
<%@page import="com.liferay.portal.model.UserGroupRole"%> |
|
|
|
|
<%@page import="com.liferay.portal.service.UserGroupRoleLocalServiceUtil"%> |
|
|
|
|
<%@page import="com.liferay.portal.model.Role"%> |
|
|
|
|
<%@page import="javax.portlet.PortletURL"%> |
|
|
|
|
<%@page import="org.apache.commons.lang.StringUtils"%> |
|
|
|
|
<%@page import="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%> |
|
|
|
|
<%@page import="com.liferay.portal.model.User"%> |
|
|
|
@ -7,10 +13,12 @@
|
|
|
|
|
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
|
|
|
<%@include file="/html/init.jsp"%> |
|
|
|
|
<% |
|
|
|
|
PortletURL iteratorURL = liferayPortletResponse.createRenderURL(); |
|
|
|
|
long organizationId = ParamUtil.getLong(request, "organization", 0); |
|
|
|
|
Organization organization = null; |
|
|
|
|
if (organizationId != 0) { |
|
|
|
|
organization = OrganizationLocalServiceUtil.fetchOrganization(organizationId); |
|
|
|
|
iteratorURL.setParameter("organization", String.valueOf(organizationId)); |
|
|
|
|
} |
|
|
|
|
%> |
|
|
|
|
<h2> |
|
|
|
@ -32,19 +40,37 @@ if (organizationId != 0) {
|
|
|
|
|
</aui:select> |
|
|
|
|
<aui:button type="submit" value="show" /> |
|
|
|
|
</aui:form> |
|
|
|
|
<h4>Risultati</h4> |
|
|
|
|
<liferay-ui:search-container emptyResultsMessage="no-entries-were-found"> |
|
|
|
|
<liferay-ui:search-container emptyResultsMessage="no-users-were-found" delta="75" iteratorURL="<%= iteratorURL %>"> |
|
|
|
|
<liferay-ui:search-container-results |
|
|
|
|
total="<%= UserLocalServiceUtil.getOrganizationUsersCount(organizationId) %>" |
|
|
|
|
results="<%= UserLocalServiceUtil.getOrganizationUsers(organizationId, searchContainer.getStart(), |
|
|
|
|
searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>" /> |
|
|
|
|
results='<%= UserLocalServiceUtil.getOrganizationUsers(organizationId, searchContainer.getStart(), |
|
|
|
|
searchContainer.getEnd(), OrderByComparatorFactoryUtil.create("user_", "lastName", true, |
|
|
|
|
"firstName", true)) %>' /> |
|
|
|
|
<liferay-ui:search-container-row className="com.liferay.portal.model.User" modelVar="orgUser" > |
|
|
|
|
<liferay-ui:search-container-column-text name="screenName" /> |
|
|
|
|
<liferay-ui:search-container-column-text name="firstName" /> |
|
|
|
|
<liferay-ui:search-container-column-text name="lastName" /> |
|
|
|
|
<liferay-ui:search-container-column-text name="Unità operative" value="<%= StringUtils.join(UnitaOperativeUtil |
|
|
|
|
<liferay-ui:search-container-column-text property="screenName" name="Nome utente" /> |
|
|
|
|
<liferay-ui:search-container-column-text property="firstName" name="Nome" /> |
|
|
|
|
<liferay-ui:search-container-column-text property="lastName" name="Cognome" /> |
|
|
|
|
<liferay-ui:search-container-column-text name="Unità Operative" value="<%= StringUtils.join(UnitaOperativeUtil |
|
|
|
|
.getUnitaOperative(orgUser), StringPool.COMMA_AND_SPACE) %>" /> |
|
|
|
|
<liferay-ui:search-container-column-text name="roles"> |
|
|
|
|
<% |
|
|
|
|
Iterator<UserGroupRole> ugrs = UserGroupRoleLocalServiceUtil.getUserGroupRoles(orgUser.getUserId()) |
|
|
|
|
.iterator(); |
|
|
|
|
while (ugrs.hasNext()) { |
|
|
|
|
UserGroupRole ugr = ugrs.next(); |
|
|
|
|
out.print(ugr.getRole().getName()); |
|
|
|
|
if (ugrs.hasNext()) { |
|
|
|
|
out.print(StringPool.COMMA_AND_SPACE); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
%> |
|
|
|
|
</liferay-ui:search-container-column-text> |
|
|
|
|
<liferay-ui:search-container-column-text name="actions"> |
|
|
|
|
<liferay-ui:icon-menu showWhenSingleIcon="true"> |
|
|
|
|
<liferay-security:doAsURL doAsUserId="<%= orgUser.getUserId() %>" var="impersonateUserURL" /> |
|
|
|
|
<liferay-ui:icon image="impersonate_user" target="_blank" url="<%= impersonateUserURL %>" /> |
|
|
|
|
</liferay-ui:icon-menu> |
|
|
|
|
</liferay-ui:search-container-column-text> |
|
|
|
|
</liferay-ui:search-container-row> |
|
|
|
|
<liferay-ui:search-iterator paginate="true" /> |
|
|
|
|
</liferay-ui:search-container> |
|
|
|
|
<h4>/Risultati</h4> |
|
|
|
|