|
|
@ -14,109 +14,96 @@ |
|
|
|
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> |
|
|
|
<%@page import="com.liferay.portal.kernel.portlet.LiferayWindowState"%> |
|
|
|
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%> |
|
|
|
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%> |
|
|
|
<%@include file="/html/fascicolo/init.jsp"%> |
|
|
|
<%@include file="/html/fascicolo/init.jsp"%> |
|
|
|
|
|
|
|
|
|
|
|
<% |
|
|
|
<% |
|
|
|
SearchContainer searchContainer = (SearchContainer) request |
|
|
|
SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer"); |
|
|
|
.getAttribute("liferay-ui:search:searchContainer"); |
|
|
|
String redirect = ParamUtil.getString(request, "backUrl"); |
|
|
|
String redirect = ParamUtil.getString(request, "backUrl"); |
|
|
|
IntPratica intPratica = null; |
|
|
|
IntPratica intPratica = null; |
|
|
|
boolean showExpanded = true; |
|
|
|
|
|
|
|
if (searchContainer != null) { |
|
|
|
boolean showExpanded = true; |
|
|
|
|
|
|
|
if (searchContainer != null) { |
|
|
|
|
|
|
|
redirect = searchContainer.getIteratorURL().toString(); |
|
|
|
redirect = searchContainer.getIteratorURL().toString(); |
|
|
|
|
|
|
|
ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
|
|
|
ResultRow row = (ResultRow) request |
|
|
|
|
|
|
|
.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
intPratica = (IntPratica) row.getObject(); |
|
|
|
intPratica = (IntPratica) row.getObject(); |
|
|
|
|
|
|
|
|
|
|
|
showExpanded = false; |
|
|
|
showExpanded = false; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); |
|
|
|
long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); |
|
|
|
intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); |
|
|
|
intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
String randomId = StringUtil.randomId(); |
|
|
|
String randomId = StringUtil.randomId(); |
|
|
|
String buttonIdCambiaStato = "buttonIdCambiaStato_" + randomId; |
|
|
|
String buttonIdCambiaStato = "buttonIdCambiaStato_"+randomId; |
|
|
|
String buttonIdToggleSospensione = "buttonIdToggleSospensione_" + randomId; |
|
|
|
String buttonIdToggleSospensione = "buttonIdToggleSospensione_"+randomId; |
|
|
|
String buttonIdCambiaTitolare = "buttonIdCambiaTitolare_" + randomId; |
|
|
|
String buttonIdCambiaTitolare = "buttonIdCambiaTitolare_"+randomId; |
|
|
|
String buttonIdToggleWorkflow = "buttonIdToggleWorkflow_" + randomId; |
|
|
|
String buttonIdToggleWorkflow = "buttonIdToggleWorkflow_"+randomId; |
|
|
|
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_" + randomId; |
|
|
|
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_"+randomId; |
|
|
|
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); |
|
|
|
|
|
|
|
Map<String, String[]> changeMap = null; |
|
|
|
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); |
|
|
|
if (lastDettPratica == null) { |
|
|
|
Map<String, String[]> changeMap = null; |
|
|
|
|
|
|
|
if (lastDettPratica == null) { |
|
|
|
|
|
|
|
changeMap = new HashMap<String, String[]>(); |
|
|
|
changeMap = new HashMap<String, String[]>(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
changeMap = PraticaUtil.getStatusChangeMap(lastDettPratica.getDettPraticaId()); |
|
|
|
changeMap = PraticaUtil.getStatusChangeMap(lastDettPratica.getDettPraticaId()); |
|
|
|
} |
|
|
|
} |
|
|
|
List<String> statiPossibili = ListUtil.toList(changeMap.get(intPratica.getStatoPratica())); |
|
|
|
List<String> statiPossibili = ListUtil.toList(changeMap.get(intPratica.getStatoPratica())); |
|
|
|
|
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); |
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); |
|
|
|
long territorioGroupId = territorio.getGroupId(); |
|
|
|
long territorioGroupId = territorio.getGroupId(); |
|
|
|
|
|
|
|
%> |
|
|
|
%> |
|
|
|
|
|
|
|
|
|
|
|
<portlet:renderURL var="viewEntryURL"> |
|
|
|
<portlet:renderURL var="viewEntryURL"> |
|
|
|
<portlet:param name="mvcPath" value="/html/fascicolo/view_fascicolo.jsp" /> |
|
|
|
<portlet:param name="mvcPath" value="/html/fascicolo/view_fascicolo.jsp" /> |
|
|
|
<portlet:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId())%>" /> |
|
|
|
<portlet:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId())%>" /> |
|
|
|
<portlet:param name="backURL" value="<%=redirect%>" /> |
|
|
|
<portlet:param name="backURL" value="<%=redirect%>" /> |
|
|
|
</portlet:renderURL> |
|
|
|
</portlet:renderURL> |
|
|
|
|
|
|
|
<liferay-ui:icon-menu icon="" showWhenSingleIcon="true" showExpanded="<%= showExpanded %>"> |
|
|
|
<liferay-ui:icon-menu icon="" showWhenSingleIcon="<%=true%>" showExpanded="<%=showExpanded%>"> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<liferay-ui:icon iconCssClass="fa fa-eye" message="view" url="<%=viewEntryURL%>" /> |
|
|
|
<liferay-ui:icon iconCssClass="fa fa-eye" message="view" url="<%=viewEntryURL%>" /> |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>"> |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>"> |
|
|
|
<liferay-ui:icon id="<%=buttonIdToggleSospensione%>" iconCssClass="fa fa-eject fa-rotate-90" message="fascicolo-action-sospendi" url="#" /> |
|
|
|
<liferay-ui:icon id="<%=buttonIdToggleSospensione%>" iconCssClass="fa fa-eject fa-rotate-90" message="fascicolo-action-sospendi" url="#" /> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
|
|
|
|
<c:if test="<%=!intPratica.isSospesa() %>"> |
|
|
|
<c:if test="<%=!intPratica.isSospesa() %>"> |
|
|
|
<%if(!statiPossibili.isEmpty() && IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO)){ %> |
|
|
|
<c:if test="<%= !statiPossibili.isEmpty() |
|
|
|
<liferay-ui:icon id="<%=buttonIdCambiaStato%>" iconCssClass="fa fa-exchange" message="fascicolo-action-cambia-stato" url="#" /> |
|
|
|
&& IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO) %>"> |
|
|
|
<%} %> |
|
|
|
<liferay-ui:icon id="<%=buttonIdCambiaStato %>" iconCssClass="fa fa-exchange" |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_TITOLARE ) %>"> |
|
|
|
message="fascicolo-action-cambia-stato" url="#" /> |
|
|
|
<liferay-ui:icon id="<%=buttonIdCambiaTitolare%>" iconCssClass="fa fa-users" message="fascicolo-action-cambia-titolare" url="#" /> |
|
|
|
|
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO_WORKFLOW ) %>"> |
|
|
|
<c:if test="<%= IntPraticaPermission |
|
|
|
<liferay-ui:icon id="<%=buttonIdToggleWorkflow%>" iconCssClass="fa fa-random" message="fascicolo-action-toggle-workflow" url="#" /> |
|
|
|
.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_TITOLARE) %>"> |
|
|
|
|
|
|
|
<liferay-ui:icon id="<%= buttonIdCambiaTitolare %>" iconCssClass="fa fa-users" |
|
|
|
|
|
|
|
message="fascicolo-action-cambia-titolare" url="#" /> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
<c:if test="<%= IntPraticaPermission |
|
|
|
|
|
|
|
.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO_WORKFLOW) %>"> |
|
|
|
|
|
|
|
<liferay-ui:icon id="<%= buttonIdToggleWorkflow %>" iconCssClass="fa fa-random" |
|
|
|
|
|
|
|
message="fascicolo-action-toggle-workflow" url="#" /> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
|
|
|
|
</liferay-ui:icon-menu> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>"> |
|
|
|
|
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_toggle_sospensione.jsp" servletContext="<%= application %>" > |
|
|
|
|
|
|
|
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param> |
|
|
|
|
|
|
|
<liferay-util:param name="buttonIdToggleSospensione" value="<%=buttonIdToggleSospensione %>"></liferay-util:param> |
|
|
|
|
|
|
|
</liferay-util:include> |
|
|
|
|
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
</liferay-ui:icon-menu> |
|
|
|
<c:if test="<%=!intPratica.isSospesa() %>"> |
|
|
|
<c:if test="<%= IntPraticaPermission |
|
|
|
<%if(!statiPossibili.isEmpty() && IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO)){ %> |
|
|
|
.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>"> |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_cambia_stato_pratica.jsp" servletContext="<%= application %>" > |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_toggle_sospensione.jsp" |
|
|
|
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param> |
|
|
|
servletContext="<%= application %>"> |
|
|
|
<liferay-util:param name="buttonIdCambiaStato" value="<%=buttonIdCambiaStato %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>" /> |
|
|
|
|
|
|
|
<liferay-util:param name="buttonIdToggleSospensione" value="<%=buttonIdToggleSospensione %>" /> |
|
|
|
</liferay-util:include> |
|
|
|
</liferay-util:include> |
|
|
|
<%} %> |
|
|
|
</c:if> |
|
|
|
<!-- |
|
|
|
<c:if test="<%= !intPratica.isSospesa() %>"> |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>"> |
|
|
|
<c:if test="<%= !statiPossibili.isEmpty() |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_toggle_sospensione.jsp" servletContext="<%= application %>" > |
|
|
|
&& IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO) %>"> |
|
|
|
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param> |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_cambia_stato_pratica.jsp" |
|
|
|
<liferay-util:param name="buttonIdToggleSospensione" value="<%=buttonIdToggleSospensione %>"></liferay-util:param> |
|
|
|
servletContext="<%= application %>"> |
|
|
|
|
|
|
|
<liferay-util:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" /> |
|
|
|
|
|
|
|
<liferay-util:param name="buttonIdCambiaStato" value="<%= buttonIdCambiaStato %>" /> |
|
|
|
</liferay-util:include> |
|
|
|
</liferay-util:include> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
--> |
|
|
|
<c:if test="<%= IntPraticaPermission |
|
|
|
|
|
|
|
.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_TITOLARE ) %>"> |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_TITOLARE ) %>"> |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_cambia_titolare.jsp" |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_cambia_titolare.jsp" servletContext="<%= application %>" > |
|
|
|
servletContext="<%= application %>"> |
|
|
|
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" /> |
|
|
|
<liferay-util:param name="buttonIdCambiaTitolare" value="<%=buttonIdCambiaTitolare %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="buttonIdCambiaTitolare" value="<%= buttonIdCambiaTitolare %>" /> |
|
|
|
</liferay-util:include> |
|
|
|
</liferay-util:include> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
<c:if test="<%= IntPraticaPermission |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO_WORKFLOW ) %>"> |
|
|
|
.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_STATO_WORKFLOW ) %>"> |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_toggle_workflow.jsp" servletContext="<%= application %>" > |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_toggle_workflow.jsp" |
|
|
|
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>"></liferay-util:param> |
|
|
|
servletContext="<%= application %>"> |
|
|
|
<liferay-util:param name="buttonIdToggleWorkflow" value="<%=buttonIdToggleWorkflow %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>" /> |
|
|
|
|
|
|
|
<liferay-util:param name="buttonIdToggleWorkflow" value="<%=buttonIdToggleWorkflow %>" /> |
|
|
|
</liferay-util:include> |
|
|
|
</liferay-util:include> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|