Salvatore La Manna
3 anni fa
29 ha cambiato i file con 683 aggiunte e 594 eliminazioni
@ -0,0 +1,11 @@
|
||||
package it.mwg.sismica.bo.portlet; |
||||
|
||||
import com.liferay.util.bridges.mvc.MVCPortlet; |
||||
|
||||
public class OrganigrammaPortlet extends MVCPortlet { |
||||
|
||||
public OrganigrammaPortlet() { |
||||
// TODO Auto-generated constructor stub
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,50 @@
|
||||
<%@page import="org.apache.commons.lang.StringUtils"%> |
||||
<%@page import="it.tref.liferay.portos.bo.shared.util.UnitaOperativeUtil"%> |
||||
<%@page import="com.liferay.portal.model.User"%> |
||||
<%@page import="com.liferay.portal.service.UserLocalServiceUtil"%> |
||||
<%@page import="com.liferay.portal.service.OrganizationLocalServiceUtil"%> |
||||
<%@page import="com.liferay.portal.model.Organization"%> |
||||
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
||||
<%@include file="/html/init.jsp"%> |
||||
<% |
||||
long organizationId = ParamUtil.getLong(request, "organization", 0); |
||||
Organization organization = null; |
||||
if (organizationId != 0) { |
||||
organization = OrganizationLocalServiceUtil.fetchOrganization(organizationId); |
||||
} |
||||
%> |
||||
<h2> |
||||
Organigramma <%= Validator.isNull(organization) ? StringPool.BLANK : organization.getName() %> |
||||
(<%= organizationId %>) |
||||
</h2> |
||||
<aui:form> |
||||
<aui:select name="organization"> |
||||
<% |
||||
for (Organization org : OrganizationLocalServiceUtil.getOrganizations(QueryUtil.ALL_POS, |
||||
QueryUtil.ALL_POS)) { |
||||
if (org.getParentOrganizationId() != 0) { |
||||
%> |
||||
<aui:option value="<%= org.getOrganizationId() %>" label="<%= org.getName() %>" /> |
||||
<% |
||||
} |
||||
} |
||||
%> |
||||
</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-results |
||||
total="<%= UserLocalServiceUtil.getOrganizationUsersCount(organizationId) %>" |
||||
results="<%= UserLocalServiceUtil.getOrganizationUsers(organizationId, searchContainer.getStart(), |
||||
searchContainer.getEnd(), searchContainer.getOrderByComparator()) %>" /> |
||||
<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 |
||||
.getUnitaOperative(orgUser), StringPool.COMMA_AND_SPACE) %>" /> |
||||
</liferay-ui:search-container-row> |
||||
<liferay-ui:search-iterator paginate="true" /> |
||||
</liferay-ui:search-container> |
||||
<h4>/Risultati</h4> |
@ -1,38 +1,35 @@
|
||||
package it.tref.liferay.portos.mailmanager.shared.util; |
||||
|
||||
|
||||
public class MailManagerConstants { |
||||
|
||||
public enum SendTemplateMode { |
||||
|
||||
REVIEW("R"), EDIT("E"); |
||||
|
||||
private SendTemplateMode(String id) { |
||||
this.id = id; |
||||
} |
||||
public enum SendTemplateMode { |
||||
|
||||
private String id; |
||||
REVIEW("R"), EDIT("E"); |
||||
|
||||
public static SendTemplateMode parse(String id) { |
||||
for (SendTemplateMode item : values()) { |
||||
if (item.id.equals(id)) { |
||||
return item; |
||||
} |
||||
} |
||||
throw new IllegalArgumentException("Invalid SendTemplateMode value: " + id); |
||||
} |
||||
private SendTemplateMode(String id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getId() { |
||||
return id; |
||||
} |
||||
} |
||||
private String id; |
||||
|
||||
public static final String TEMPLATE_PARAMETER_VARIABLES_KEY = "variables"; |
||||
public static final String TEMPLATE_PARAMETER_TO_KEY = "to"; |
||||
public static final String TEMPLATE_PARAMETER_CC_KEY = "cc"; |
||||
public static final String TEMPLATE_PARAMETER_CCN_KEY = "ccn"; |
||||
public static SendTemplateMode parse(String id) { |
||||
for (SendTemplateMode item : values()) { |
||||
if (item.id.equals(id)) { |
||||
return item; |
||||
} |
||||
} |
||||
throw new IllegalArgumentException("Invalid SendTemplateMode value: " + id); |
||||
} |
||||
|
||||
public static final String MESSAGING_SEND_MODE_SYNC = "sync"; |
||||
public static final String MESSAGING_SEND_MODE_ASYNC = "async"; |
||||
public String getId() { |
||||
return id; |
||||
} |
||||
} |
||||
|
||||
public static final String TEMPLATE_PARAMETER_VARIABLES_KEY = "variables"; |
||||
public static final String TEMPLATE_PARAMETER_TO_KEY = "to"; |
||||
public static final String TEMPLATE_PARAMETER_CC_KEY = "cc"; |
||||
public static final String TEMPLATE_PARAMETER_CCN_KEY = "ccn"; |
||||
public static final String MESSAGING_SEND_MODE_SYNC = "sync"; |
||||
public static final String MESSAGING_SEND_MODE_ASYNC = "async"; |
||||
} |
||||
|
@ -1,14 +1,12 @@
|
||||
package it.tref.liferay.portos.mailmanager.shared.util; |
||||
|
||||
|
||||
public class StringUtil extends com.liferay.portal.kernel.util.StringUtil { |
||||
|
||||
public static String[] splitAndTrim(String s) { |
||||
String[] array = StringUtil.split(s); |
||||
for (int i = 0; i < array.length; i++) { |
||||
array[i] = StringUtil.trim(array[i]); |
||||
} |
||||
return array; |
||||
} |
||||
|
||||
public static String[] splitAndTrim(String s) { |
||||
String[] array = StringUtil.split(s); |
||||
for (int i = 0; i < array.length; i++) { |
||||
array[i] = StringUtil.trim(array[i]); |
||||
} |
||||
return array; |
||||
} |
||||
} |
||||
|
Caricamento…
Reference in new issue