|
|
|
@ -1,3 +1,4 @@
|
|
|
|
|
<%@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"%> |
|
|
|
@ -43,7 +44,7 @@ if (organizationId != 0) {
|
|
|
|
|
<liferay-ui:search-container-results |
|
|
|
|
total="<%= UserLocalServiceUtil.getOrganizationUsersCount(organizationId) %>" |
|
|
|
|
results='<%= UserLocalServiceUtil.getOrganizationUsers(organizationId, searchContainer.getStart(), |
|
|
|
|
searchContainer.getEnd(), OrderByComparatorFactoryUtil.create("user_", "LOWER(lastName)", true, |
|
|
|
|
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 property="screenName" name="Nome utente" /> |
|
|
|
@ -51,19 +52,25 @@ if (organizationId != 0) {
|
|
|
|
|
<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"> |
|
|
|
|
<liferay-ui:search-container-column-text name="roles"> |
|
|
|
|
<% |
|
|
|
|
boolean first = true; |
|
|
|
|
for (UserGroupRole groupRole : UserGroupRoleLocalServiceUtil.getUserGroupRoles(orgUser.getUserId())) { |
|
|
|
|
if (first) { |
|
|
|
|
first = false; |
|
|
|
|
} else { |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
out.print(groupRole.getRole().getName()); |
|
|
|
|
} |
|
|
|
|
%> |
|
|
|
|
</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> |
|
|
|
|