|
|
@ -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; |
|
|
|
redirect = searchContainer.getIteratorURL().toString(); |
|
|
|
if (searchContainer != null) { |
|
|
|
ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
|
|
|
redirect = searchContainer.getIteratorURL().toString(); |
|
|
|
intPratica = (IntPratica) row.getObject(); |
|
|
|
|
|
|
|
showExpanded = false; |
|
|
|
ResultRow row = (ResultRow) request |
|
|
|
} else { |
|
|
|
.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
|
|
|
long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); |
|
|
|
|
|
|
|
intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); |
|
|
|
intPratica = (IntPratica) row.getObject(); |
|
|
|
} |
|
|
|
|
|
|
|
String randomId = StringUtil.randomId(); |
|
|
|
showExpanded = false; |
|
|
|
String buttonIdCambiaStato = "buttonIdCambiaStato_" + randomId; |
|
|
|
} else { |
|
|
|
String buttonIdToggleSospensione = "buttonIdToggleSospensione_" + randomId; |
|
|
|
long intPraticaId = ParamUtil.getLong(request, "intPraticaId"); |
|
|
|
String buttonIdCambiaTitolare = "buttonIdCambiaTitolare_" + randomId; |
|
|
|
intPratica = IntPraticaLocalServiceUtil.getIntPratica(intPraticaId); |
|
|
|
String buttonIdToggleWorkflow = "buttonIdToggleWorkflow_" + randomId; |
|
|
|
} |
|
|
|
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_" + randomId; |
|
|
|
|
|
|
|
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); |
|
|
|
String randomId = StringUtil.randomId(); |
|
|
|
Map<String, String[]> changeMap = null; |
|
|
|
String buttonIdCambiaStato = "buttonIdCambiaStato_"+randomId; |
|
|
|
if (lastDettPratica == null) { |
|
|
|
String buttonIdToggleSospensione = "buttonIdToggleSospensione_"+randomId; |
|
|
|
changeMap = new HashMap<String, String[]>(); |
|
|
|
String buttonIdCambiaTitolare = "buttonIdCambiaTitolare_"+randomId; |
|
|
|
} else { |
|
|
|
String buttonIdToggleWorkflow = "buttonIdToggleWorkflow_"+randomId; |
|
|
|
changeMap = PraticaUtil.getStatusChangeMap(lastDettPratica.getDettPraticaId()); |
|
|
|
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_"+randomId; |
|
|
|
} |
|
|
|
|
|
|
|
List<String> statiPossibili = ListUtil.toList(changeMap.get(intPratica.getStatoPratica())); |
|
|
|
DettPratica lastDettPratica = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()); |
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); |
|
|
|
Map<String, String[]> changeMap = null; |
|
|
|
long territorioGroupId = territorio.getGroupId(); |
|
|
|
if (lastDettPratica == null) { |
|
|
|
|
|
|
|
changeMap = new HashMap<String, String[]>(); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
changeMap = PraticaUtil.getStatusChangeMap(lastDettPratica.getDettPraticaId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<String> statiPossibili = ListUtil.toList(changeMap.get(intPratica.getStatoPratica())); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); |
|
|
|
|
|
|
|
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 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> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
|
|
|
|
</liferay-ui:icon-menu> |
|
|
|
</liferay-ui:icon-menu> |
|
|
|
|
|
|
|
<c:if test="<%= IntPraticaPermission |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>"> |
|
|
|
.contains(permissionChecker, territorioGroupId, ActionKeys.SOSPENDI_FASCICOLO ) %>"> |
|
|
|
<liferay-util:include page="/html/fascicolo/actions/action_toggle_sospensione.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="buttonIdToggleSospensione" value="<%=buttonIdToggleSospensione %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="intPraticaId" value="<%=String.valueOf(intPratica.getIntPraticaId()) %>" /> |
|
|
|
</liferay-util:include> |
|
|
|
<liferay-util:param name="buttonIdToggleSospensione" value="<%=buttonIdToggleSospensione %>" /> |
|
|
|
</c:if> |
|
|
|
</liferay-util:include> |
|
|
|
|
|
|
|
</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-util:include page="/html/fascicolo/actions/action_cambia_stato_pratica.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="buttonIdCambiaStato" value="<%=buttonIdCambiaStato %>"></liferay-util:param> |
|
|
|
servletContext="<%= application %>"> |
|
|
|
</liferay-util:include> |
|
|
|
<liferay-util:param name="intPraticaId" value="<%= String.valueOf(intPratica.getIntPraticaId()) %>" /> |
|
|
|
<%} %> |
|
|
|
<liferay-util:param name="buttonIdCambiaStato" value="<%= buttonIdCambiaStato %>" /> |
|
|
|
<!-- |
|
|
|
|
|
|
|
<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> |
|
|
|
</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> |
|
|
|