|
|
|
@ -1,3 +1,8 @@
|
|
|
|
|
<%@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 +12,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 +39,31 @@ 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_", "LOWER(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="Ruoli"> |
|
|
|
|
<% |
|
|
|
|
boolean first = true; |
|
|
|
|
for (UserGroupRole groupRole : UserGroupRoleLocalServiceUtil.getUserGroupRoles(orgUser.getUserId())) { |
|
|
|
|
if (first) { |
|
|
|
|
first = false; |
|
|
|
|
} else { |
|
|
|
|
out.print(StringPool.COMMA_AND_SPACE); |
|
|
|
|
} |
|
|
|
|
out.print(groupRole.getRole().getName()); |
|
|
|
|
} |
|
|
|
|
%> |
|
|
|
|
</liferay-ui:search-container-column-text> |
|
|
|
|
</liferay-ui:search-container-row> |
|
|
|
|
<liferay-ui:search-iterator paginate="true" /> |
|
|
|
|
</liferay-ui:search-container> |
|
|
|
|
<h4>/Risultati</h4> |
|
|
|
|