|
|
@ -33,75 +33,58 @@ |
|
|
|
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%> |
|
|
|
<%@page import="com.liferay.portal.service.permission.PortletPermissionUtil"%> |
|
|
|
<%@ include file="/html/gestioneattivita/init.jsp" %> |
|
|
|
<%@ include file="/html/gestioneattivita/init.jsp" %> |
|
|
|
<% |
|
|
|
<% |
|
|
|
|
|
|
|
SearchContainer searchContainer = (SearchContainer) request.getAttribute("liferay-ui:search:searchContainer"); |
|
|
|
SearchContainer searchContainer = (SearchContainer) request |
|
|
|
String redirect = ParamUtil.getString(request, "backUrl"); |
|
|
|
.getAttribute("liferay-ui:search:searchContainer"); |
|
|
|
ControlloPratica controlloPratica = null; |
|
|
|
String redirect = ParamUtil.getString(request, "backUrl"); |
|
|
|
redirect = searchContainer.getIteratorURL().toString(); |
|
|
|
ControlloPratica controlloPratica = null; |
|
|
|
ResultRow row = (ResultRow) request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
|
|
|
|
|
|
|
controlloPratica = (ControlloPratica) row.getObject(); |
|
|
|
redirect = searchContainer.getIteratorURL().toString(); |
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId()); |
|
|
|
|
|
|
|
Group controlPanelGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.CONTROL_PANEL); |
|
|
|
ResultRow row = (ResultRow) request |
|
|
|
long controlPanelPlid = LayoutLocalServiceUtil.getDefaultPlid(controlPanelGroup.getGroupId(),true); |
|
|
|
.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW); |
|
|
|
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink( |
|
|
|
|
|
|
|
|
|
|
|
controlloPratica = (ControlloPratica) row.getObject(); |
|
|
|
|
|
|
|
IntPratica intPratica = IntPraticaLocalServiceUtil.getIntPratica(controlloPratica.getIntPraticaId()); |
|
|
|
|
|
|
|
Group controlPanelGroup = GroupLocalServiceUtil.getGroup(company.getCompanyId(), GroupConstants.CONTROL_PANEL); |
|
|
|
|
|
|
|
long controlPanelPlid = LayoutLocalServiceUtil.getDefaultPlid(controlPanelGroup.getGroupId(),true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WorkflowInstanceLink workflowInstanceLink = WorkflowInstanceLinkLocalServiceUtil.fetchWorkflowInstanceLink( |
|
|
|
|
|
|
|
controlloPratica.getCompanyId(),controlloPratica.getGroupId(), ControlloPratica.class.getName(),controlloPratica.getPrimaryKey()); |
|
|
|
controlloPratica.getCompanyId(),controlloPratica.getGroupId(), ControlloPratica.class.getName(),controlloPratica.getPrimaryKey()); |
|
|
|
|
|
|
|
List<WorkflowTask> listaTask = null; |
|
|
|
List<WorkflowTask> listaTask = null; |
|
|
|
if (workflowInstanceLink == null) { |
|
|
|
if (workflowInstanceLink == null) { |
|
|
|
|
|
|
|
listaTask = new ArrayList<WorkflowTask>(); |
|
|
|
listaTask = new ArrayList<WorkflowTask>(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null, |
|
|
|
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null, |
|
|
|
workflowInstanceLink.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); |
|
|
|
workflowInstanceLink.getWorkflowInstanceId(), false, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
String randomId = StringUtil.randomId(); |
|
|
|
String randomId = StringUtil.randomId(); |
|
|
|
long lastDettPraticaId = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()).getDettPraticaId(); |
|
|
|
|
|
|
|
String buttonIdCambioIstruttore = "buttonIdCambioIstruttore_" + randomId; |
|
|
|
long lastDettPraticaId = DettPraticaLocalServiceUtil.getLastCompletedByIntPratica(intPratica.getIntPraticaId()).getDettPraticaId(); |
|
|
|
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_" + randomId; |
|
|
|
|
|
|
|
String buttonIdAggiungiDettPraticheAlControllo = "buttonIdAggiungiDettPraticheAlControllo_" + randomId; |
|
|
|
String buttonIdCambioIstruttore = "buttonIdCambioIstruttore_"+randomId; |
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); |
|
|
|
String buttonIdSelezionaGeologo = "buttonIdSelezionaGeologo_"+randomId; |
|
|
|
long territorioGroupId = territorio.getGroupId(); |
|
|
|
String buttonIdAggiungiDettPraticheAlControllo = "buttonIdAggiungiDettPraticheAlControllo_"+randomId; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId()); |
|
|
|
|
|
|
|
long territorioGroupId = territorio.getGroupId(); |
|
|
|
|
|
|
|
%> |
|
|
|
%> |
|
|
|
|
|
|
|
|
|
|
|
<liferay-ui:icon-menu icon="" showWhenSingleIcon="false" showExpanded="true" cssClass="menu_button_activity"> |
|
|
|
<liferay-ui:icon-menu icon="" showWhenSingleIcon="false" showExpanded="true" cssClass="menu_button_activity"> |
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-open-pratica") %>' class="tooltip-info"> |
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-open-pratica") %>' class="tooltip-info"> |
|
|
|
<liferay-ui:icon iconCssClass="fa fa-folder-open" |
|
|
|
<liferay-ui:icon iconCssClass="fa fa-folder-open" linkCssClass="btn btn-action" target="_blank" message="" |
|
|
|
linkCssClass="btn btn-action" |
|
|
|
url="<%= FascicoloURLUtil.getFascicoloBOViewURL(controlloPratica.getCompanyId(), |
|
|
|
target="_blank" |
|
|
|
controlloPratica.getIntPraticaId()) %>" /> |
|
|
|
message="" |
|
|
|
|
|
|
|
url="<%= FascicoloURLUtil.getFascicoloViewURL(controlloPratica.getCompanyId(), controlloPratica.getIntPraticaId()) %>" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<c:if test="<%= listaTask.isEmpty() && workflowInstanceLink != null %>"> |
|
|
|
<c:if test="<%= listaTask.isEmpty() && workflowInstanceLink != null %>"> |
|
|
|
<% |
|
|
|
<% |
|
|
|
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), null, |
|
|
|
listaTask = WorkflowTaskManagerUtil.getWorkflowTasksByWorkflowInstance(controlloPratica.getCompanyId(), |
|
|
|
workflowInstanceLink.getWorkflowInstanceId(), true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); |
|
|
|
null, workflowInstanceLink.getWorkflowInstanceId(), true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, |
|
|
|
|
|
|
|
null); |
|
|
|
%> |
|
|
|
%> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
<c:if test="<%= !listaTask.isEmpty() %>"> |
|
|
|
<c:if test="<%= !listaTask.isEmpty() %>"> |
|
|
|
<% |
|
|
|
<% |
|
|
|
PortletURL workflowTaskURL = PortletURLFactoryUtil.create(request, PortletKeys.MY_WORKFLOW_TASKS,controlPanelPlid, PortletRequest.RENDER_PHASE); |
|
|
|
PortletURL workflowTaskURL = PortletURLFactoryUtil.create(request, PortletKeys.MY_WORKFLOW_TASKS, |
|
|
|
workflowTaskURL.setParameter("struts_action", |
|
|
|
controlPanelPlid, PortletRequest.RENDER_PHASE); |
|
|
|
"/my_workflow_tasks/edit_workflow_task"); |
|
|
|
workflowTaskURL.setParameter("struts_action", "/my_workflow_tasks/edit_workflow_task"); |
|
|
|
workflowTaskURL.setParameter("workflowTaskId",String.valueOf(listaTask.get(0).getWorkflowTaskId())); |
|
|
|
workflowTaskURL.setParameter("workflowTaskId", String.valueOf(listaTask.get(0).getWorkflowTaskId())); |
|
|
|
|
|
|
|
workflowTaskURL.setParameter("tab", tabs1); |
|
|
|
workflowTaskURL.setPortletMode(PortletMode.VIEW); |
|
|
|
workflowTaskURL.setPortletMode(PortletMode.VIEW); |
|
|
|
workflowTaskURL.setWindowState(LiferayWindowState.POP_UP); |
|
|
|
workflowTaskURL.setWindowState(LiferayWindowState.POP_UP); |
|
|
|
%> |
|
|
|
%> |
|
|
|
|
|
|
|
<div title='<%= LanguageUtil.get(pageContext,"workflow-action-manage") %>' class="tooltip-info"> |
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-manage") %>' class="tooltip-info"> |
|
|
|
<liferay-ui:icon useDialog="true" iconCssClass="fa fa-list-ol" linkCssClass="btn btn-action" message="" |
|
|
|
<liferay-ui:icon useDialog="true" |
|
|
|
url='<%= workflowTaskURL.toString() + "&controlPanelCategory=my" %>' /> |
|
|
|
iconCssClass="fa fa-list-ol" |
|
|
|
|
|
|
|
linkCssClass="btn btn-action" |
|
|
|
|
|
|
|
message="" |
|
|
|
|
|
|
|
url='<%=workflowTaskURL.toString()+"&controlPanelCategory=my" %>' /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
<c:if test="<%=WorkflowConstants.STATUS_PENDING == controlloPratica.getStatus()%>"> |
|
|
|
<c:if test="<%=WorkflowConstants.STATUS_PENDING == controlloPratica.getStatus()%>"> |
|
|
@ -112,10 +95,10 @@ |
|
|
|
&& (listaTask.get(0).getName().equals(\"Assegnazione\") |
|
|
|
&& (listaTask.get(0).getName().equals(\"Assegnazione\") |
|
|
|
|| listaTask.get(0).getName().equals(\"Approvazione\")) %>"> |
|
|
|
|| listaTask.get(0).getName().equals(\"Approvazione\")) %>"> |
|
|
|
<liferay-portlet:actionURL name="riassegnaAlRuolo" var="riassegnaAlRuoloUrl"> |
|
|
|
<liferay-portlet:actionURL name="riassegnaAlRuolo" var="riassegnaAlRuoloUrl"> |
|
|
|
<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="workflowTaskId" value="<%=String.valueOf(listaTask.get(0).getWorkflowTaskId())%>" /> |
|
|
|
<liferay-util:param name="workflowTaskId" value="<%= String.valueOf(listaTask.get(0).getWorkflowTaskId()) %>" /> |
|
|
|
<liferay-util:param name="controlloPraticaId" value="<%=String.valueOf(controlloPratica.getControlloPraticaId())%>" /> |
|
|
|
<liferay-util:param name="controlloPraticaId" value="<%= String.valueOf(controlloPratica.getControlloPraticaId()) %>" /> |
|
|
|
<liferay-util:param name="redirect" value="<%=currentURL%>" /> |
|
|
|
<liferay-util:param name="redirect" value="<%= currentURL %>" /> |
|
|
|
</liferay-portlet:actionURL> |
|
|
|
</liferay-portlet:actionURL> |
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-riassegna-al-ruolo") %>' class="tooltip-info"> |
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-riassegna-al-ruolo") %>' class="tooltip-info"> |
|
|
|
<liferay-ui:icon iconCssClass="fa fa-users" |
|
|
|
<liferay-ui:icon iconCssClass="fa fa-users" |
|
|
@ -124,7 +107,6 @@ |
|
|
|
url="<%=riassegnaAlRuoloUrl %>" /> |
|
|
|
url="<%=riassegnaAlRuoloUrl %>" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
|
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_ISTRUTTORE) %>"> |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.CAMBIO_ISTRUTTORE) %>"> |
|
|
|
<c:if test="<%=Validator.isNotNull(intPratica.getStatusByUserId())%>"> |
|
|
|
<c:if test="<%=Validator.isNotNull(intPratica.getStatusByUserId())%>"> |
|
|
|
<liferay-util:include page="/html/gestioneattivita/actions/action_cambio_istruttore.jsp" servletContext="<%= application %>" > |
|
|
|
<liferay-util:include page="/html/gestioneattivita/actions/action_cambio_istruttore.jsp" servletContext="<%= application %>" > |
|
|
@ -141,7 +123,6 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
|
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.RICHIEDI_PARERE_GEOLOGO) || intPratica.getStatusByUserId() == user.getUserId()%>"> |
|
|
|
<c:if test="<%= IntPraticaPermission.contains(permissionChecker, territorioGroupId, ActionKeys.RICHIEDI_PARERE_GEOLOGO) || intPratica.getStatusByUserId() == user.getUserId()%>"> |
|
|
|
<c:if test="<%=!listaTask.isEmpty() %>"> |
|
|
|
<c:if test="<%=!listaTask.isEmpty() %>"> |
|
|
|
<c:if test="<%= listaTask.get(0).getName().equalsIgnoreCase(WorkflowConstants.WORKFLOW_TASKNAME_ASSEGNAZIONE) || listaTask.get(0).getName().equalsIgnoreCase(WorkflowConstants.WORKFLOW_TASKNAME_ESITO)%>"> |
|
|
|
<c:if test="<%= listaTask.get(0).getName().equalsIgnoreCase(WorkflowConstants.WORKFLOW_TASKNAME_ASSEGNAZIONE) || listaTask.get(0).getName().equalsIgnoreCase(WorkflowConstants.WORKFLOW_TASKNAME_ESITO)%>"> |
|
|
@ -151,7 +132,6 @@ |
|
|
|
<liferay-util:param name="dettPraticaId" value="<%=String.valueOf(controlloPratica.getDettPraticaId()) %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="dettPraticaId" value="<%=String.valueOf(controlloPratica.getDettPraticaId()) %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="buttonIdSelezionaGeologo" value="<%=buttonIdSelezionaGeologo %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="buttonIdSelezionaGeologo" value="<%=buttonIdSelezionaGeologo %>"></liferay-util:param> |
|
|
|
</liferay-util:include> |
|
|
|
</liferay-util:include> |
|
|
|
|
|
|
|
|
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-action-seleziona-geologo") %>' class="tooltip-info"> |
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-action-seleziona-geologo") %>' class="tooltip-info"> |
|
|
|
<liferay-ui:icon id="<%=buttonIdSelezionaGeologo%>" linkCssClass="btn btn-action" iconCssClass="fa fa-globe" message="" url="#" /> |
|
|
|
<liferay-ui:icon id="<%=buttonIdSelezionaGeologo%>" linkCssClass="btn btn-action" iconCssClass="fa fa-globe" message="" url="#" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -166,21 +146,17 @@ |
|
|
|
<liferay-util:param name="parereGeologoId" value="<%=String.valueOf(parereGeologo.getParereGeologoId())%>" /> |
|
|
|
<liferay-util:param name="parereGeologoId" value="<%=String.valueOf(parereGeologo.getParereGeologoId())%>" /> |
|
|
|
<liferay-util:param name="redirect" value="<%=currentURL%>" /> |
|
|
|
<liferay-util:param name="redirect" value="<%=currentURL%>" /> |
|
|
|
</liferay-portlet:actionURL> |
|
|
|
</liferay-portlet:actionURL> |
|
|
|
|
|
|
|
|
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-cancella-parere-geologo") %>' class="tooltip-info"> |
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"fascicolo-cancella-parere-geologo") %>' class="tooltip-info"> |
|
|
|
<liferay-ui:icon id="<%=buttonIdSelezionaGeologo%>" linkCssClass="btn btn-action" iconCssClass="fa fa-times-circle" message="" url="<%=annullaRichiestaParereUrl %>" /> |
|
|
|
<liferay-ui:icon id="<%=buttonIdSelezionaGeologo%>" linkCssClass="btn btn-action" iconCssClass="fa fa-times-circle" message="" url="<%=annullaRichiestaParereUrl %>" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
|
|
|
|
|
|
|
|
<c:if test="<%=lastDettPraticaId != controlloPratica.getDettPraticaId() && intPratica.getStatusByUserId()== user.getUserId()%>"> |
|
|
|
<c:if test="<%=lastDettPraticaId != controlloPratica.getDettPraticaId() && intPratica.getStatusByUserId()== user.getUserId()%>"> |
|
|
|
<liferay-util:include page="/html/gestioneattivita/actions/action_aggiungi_al_controllo.jsp" servletContext="<%= application %>" > |
|
|
|
<liferay-util:include page="/html/gestioneattivita/actions/action_aggiungi_al_controllo.jsp" 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> |
|
|
|
<liferay-util:param name="controlloPraticaId" value="<%=String.valueOf(controlloPratica.getControlloPraticaId()) %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="controlloPraticaId" value="<%=String.valueOf(controlloPratica.getControlloPraticaId()) %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="buttonIdAggiungiDettPraticheAlControllo" value="<%=buttonIdAggiungiDettPraticheAlControllo %>"></liferay-util:param> |
|
|
|
<liferay-util:param name="buttonIdAggiungiDettPraticheAlControllo" value="<%=buttonIdAggiungiDettPraticheAlControllo %>"></liferay-util:param> |
|
|
|
</liferay-util:include> |
|
|
|
</liferay-util:include> |
|
|
|
|
|
|
|
|
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-aggiungi-pratiche") %>' class="tooltip-info"> |
|
|
|
<div title='<%=LanguageUtil.get(pageContext,"workflow-action-aggiungi-pratiche") %>' class="tooltip-info"> |
|
|
|
<liferay-ui:icon id="<%=buttonIdAggiungiDettPraticheAlControllo %>" |
|
|
|
<liferay-ui:icon id="<%=buttonIdAggiungiDettPraticheAlControllo %>" |
|
|
|
iconCssClass="fa fa-calendar-plus-o" |
|
|
|
iconCssClass="fa fa-calendar-plus-o" |
|
|
@ -191,8 +167,6 @@ |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</c:if> |
|
|
|
</liferay-ui:icon-menu> |
|
|
|
</liferay-ui:icon-menu> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script type="text/javascript"> |
|
|
|
<script type="text/javascript"> |
|
|
|
YUI().use( |
|
|
|
YUI().use( |
|
|
|
'aui-tooltip', |
|
|
|
'aui-tooltip', |
|
|
|