Sfoglia il codice sorgente

Organizzazioni

master
Salvatore La Manna 3 anni fa
parent
commit
f3629b289d
  1. 2
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml
  2. 1
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml
  3. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  4. 37
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp

2
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/liferay-portlet.xml

@ -146,7 +146,7 @@
<portlet-name>paesaggistica-organigramma</portlet-name> <portlet-name>paesaggistica-organigramma</portlet-name>
<icon>/icon.png</icon> <icon>/icon.png</icon>
<control-panel-entry-category>configuration</control-panel-entry-category> <control-panel-entry-category>configuration</control-panel-entry-category>
<control-panel-entry-weight>1.9</control-panel-entry-weight> <control-panel-entry-weight>2.5</control-panel-entry-weight>
<header-portlet-css>/css/main.css?v=1</header-portlet-css> <header-portlet-css>/css/main.css?v=1</header-portlet-css>
<footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript> <footer-portlet-javascript>/js/main.js?v=2</footer-portlet-javascript>
<css-class-wrapper>paesaggistica-organigramma-portlet</css-class-wrapper> <css-class-wrapper>paesaggistica-organigramma-portlet</css-class-wrapper>

1
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/portlet.xml

@ -337,6 +337,7 @@
<mime-type>text/html</mime-type> <mime-type>text/html</mime-type>
<portlet-mode>view</portlet-mode> <portlet-mode>view</portlet-mode>
</supports> </supports>
<resource-bundle>content.Language</resource-bundle>
<portlet-info> <portlet-info>
<title>Organigramma</title> <title>Organigramma</title>
<short-title>Organigramma</short-title> <short-title>Organigramma</short-title>

4
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties

@ -13,8 +13,8 @@
## ##
build.namespace=portos_bo build.namespace=portos_bo
build.number=3357 build.number=3358
build.date=1631548540307 build.date=1631629487673
build.auto.upgrade=true build.auto.upgrade=true
## ##

37
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/organigramma/view.jsp

@ -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="org.apache.commons.lang.StringUtils"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%> <%@page import="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%>
<%@page import="com.liferay.portal.model.User"%> <%@page import="com.liferay.portal.model.User"%>
@ -7,10 +12,12 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/html/init.jsp"%> <%@include file="/html/init.jsp"%>
<% <%
PortletURL iteratorURL = liferayPortletResponse.createRenderURL();
long organizationId = ParamUtil.getLong(request, "organization", 0); long organizationId = ParamUtil.getLong(request, "organization", 0);
Organization organization = null; Organization organization = null;
if (organizationId != 0) { if (organizationId != 0) {
organization = OrganizationLocalServiceUtil.fetchOrganization(organizationId); organization = OrganizationLocalServiceUtil.fetchOrganization(organizationId);
iteratorURL.setParameter("organization", String.valueOf(organizationId));
} }
%> %>
<h2> <h2>
@ -32,19 +39,31 @@ if (organizationId != 0) {
</aui:select> </aui:select>
<aui:button type="submit" value="show" /> <aui:button type="submit" value="show" />
</aui:form> </aui:form>
<h4>Risultati</h4> <liferay-ui:search-container emptyResultsMessage="no-users-were-found" delta="75" iteratorURL="<%= iteratorURL %>">
<liferay-ui:search-container emptyResultsMessage="no-entries-were-found">
<liferay-ui:search-container-results <liferay-ui:search-container-results
total="<%= UserLocalServiceUtil.getOrganizationUsersCount(organizationId) %>" total="<%= UserLocalServiceUtil.getOrganizationUsersCount(organizationId) %>"
results="<%= UserLocalServiceUtil.getOrganizationUsers(organizationId, searchContainer.getStart(), results='<%= UserLocalServiceUtil.getOrganizationUsers(organizationId, searchContainer.getStart(),
searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>" /> 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-row className="com.liferay.portal.model.User" modelVar="orgUser" >
<liferay-ui:search-container-column-text name="screenName" /> <liferay-ui:search-container-column-text property="screenName" name="Nome utente" />
<liferay-ui:search-container-column-text name="firstName" /> <liferay-ui:search-container-column-text property="firstName" name="Nome" />
<liferay-ui:search-container-column-text name="lastName" /> <liferay-ui:search-container-column-text property="lastName" name="Cognome" />
<liferay-ui:search-container-column-text name="Unità operative" value="<%= StringUtils.join(UnitaOperativeUtil <liferay-ui:search-container-column-text name="Unità Operative" value="<%= StringUtils.join(UnitaOperativeUtil
.getUnitaOperative(orgUser), StringPool.COMMA_AND_SPACE) %>" /> .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-container-row>
<liferay-ui:search-iterator paginate="true" /> <liferay-ui:search-iterator paginate="true" />
</liferay-ui:search-container> </liferay-ui:search-container>
<h4>/Risultati</h4>

Caricamento…
Annulla
Salva