@ -1,147 +1,123 @@
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%>
<%@page import="com.liferay.portal.kernel.util.HttpUtil"%>
<%@page import="com.liferay.portal.kernel.util.HttpUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Comune"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.model.FineLavori"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%>
<%@page import="it.tref.liferay.portos.bo.model.Soggetto"%>
<%@page import="it.tref.liferay.portos.bo.model.Territorio"%>
<%@page import="it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.FineLavoriServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.FineLavori"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil"%>
<%@page import="com.liferay.portal.kernel.servlet.ServletContextPool"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.DettPraticaServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.DettPratica"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="it.tref.liferay.portos.bo.util.Delegh eUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoIntegrazioneUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Soggetto"%>
<%@page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Comune"%>
<%@page import="it.tref.liferay.portos.bo.model.Provincia"%>
<%@page import="it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.ComuneLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.Territorio"%>
<%@page import="it.tref.liferay.portos.bo.service.IntPraticaServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.model.IntPratica"%>
<%@ include file="/html/fascicolofe/init.jsp" %>
<%@ include file="/html/fascicolofe/init.jsp" %>
<%
<%
String backURL = ParamUtil.getString(request, "backURL");
String backURL = ParamUtil.getString(request, "backURL");
long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId",0l);
long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId", 0L);
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(fineLavoriId);
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(fineLavoriId);
if( Validator.isNull(fineLavori) ){
if (Validator.isNull(fineLavori)) {
long intPraticaIdParam = ParamUtil.getLong(request, "intPraticaId");
long intPraticaIdParam = ParamUtil.getLong(request, "intPraticaId");
fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaIdParam);
fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaIdParam);
fineLavoriId = fineLavori.getFineLavoriId();
fineLavoriId = fineLavori.getFineLavoriId();
}
}
boolean openVerifyUrl = ParamUtil.getBoolean(request, "openVerifyUrl");
boolean openVerifyUrl = ParamUtil.getBoolean(request, "openVerifyUrl");
long intPraticaId = fineLavori.getIntPraticaId();
boolean showHistory = ParamUtil.getBoolean(request, "showHistory", true);
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
long intPraticaId = fineLavori.getIntPraticaId();
if (dettPratica == null) {
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
dettPratica = DettPraticaServiceUtil.getLastEditableByIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
}
if(dettPratica == null){
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
dettPratica = DettPraticaServiceUtil.getLastEditableByIntPratica(intPraticaId);
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
}
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
Soggetto direttoreLavori = null;
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
List<Soggetto> direttori = SoggettoLocalServiceUtil.findByIntPratica_CodiceFiscale(intPraticaId,
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
dettPratica.getCodiceFiscaleDelegatoFineLavori());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
if (!direttori.isEmpty()) {
direttoreLavori = direttori.get(0);
Soggetto direttoreLavori = null;
}
List<Soggetto> direttori = SoggettoLocalServiceUtil.findByIntPratica_CodiceFiscale(intPraticaId, dettPratica.getCodiceFiscaleDelegatoFineLavori());
String fmName = "fmFineLavori";
if(!direttori.isEmpty()){
boolean disabledEditing = fineLavori.getCompletata();
direttoreLavori = direttori.get(0);
request.setAttribute("bean.fineLavori", fineLavori);
}
String formName = "fmFineLavori";
boolean disabledEditing = fineLavori.getCompletata();
request.setAttribute("bean.fineLavori", fineLavori);
boolean isNewFineLavori = ParamUtil.getBoolean(request, "isNewFineLavori");
%>
%>
<liferay-portlet:actionURL name="saveFineLavori" var="saveFineLavoriURL" >
<liferay-portlet:actionURL name="saveFineLavori" var="saveFineLavoriURL" >
<liferay-portlet:param name="fineLavoriId" value="<%=String.valueOf(fineLavori.getFineLavori Id() ) %>"/>
<liferay-portlet:param name="fineLavoriId" value="<%= String.valueOf(fineLavoriId) %>"/>
<liferay-portlet:param name="backURL" value="<%=backURL %>"/>
<liferay-portlet:param name="backURL" value="<%= backURL %>"/>
<liferay-portlet:param name="successURL" value="<%=currentURL %>"/>
<liferay-portlet:param name="successURL" value="<%= currentURL %>"/>
</liferay-portlet:actionURL>
</liferay-portlet:actionURL>
<aui:form name="<%= fmName %>" onSubmit="preventDefault();" action="<%= saveFineLavoriURL %>">
<aui:form name="<%= formName %>" onSubmit="preventDefault();" action="<%= saveFineLavoriURL %>">
<aui:model-context bean="<%= fineLavori %>" model="<%= FineLavori.class %>" />
<aui:model-context bean="<%= fineLavori %>" model="<%=FineLavori.class %>"></aui:model-context>
<aui:input type="hidden" name="bozza" />
<aui:input type="hidden" name="bozza" />
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<div class="row">
<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 ">
<div class="col-xs-9">
<%
<%
String label = StringPool.BLANK;
String label = StringPool.BLANK;
if(disabledEditing){
if (disabledEditing) {
label = "view-fine-lavori";
label = "view-fine-lavori";
}else if(Validator.isNull(fineLavori.getFineLavoriId())){
} else if (Validator.isNull(fineLavori.getFineLavoriId())) {
label = "new-fine-lavori";
label = "new-fine-lavori";
} else {
} else {
label = "edit-fine-lavori";
label = "edit-fine-lavori";
}
}
%>
%>
<liferay-ui:header
<liferay-ui:header title='<%= LanguageUtil.get(pageContext, label) + " #" + dettPratica.getTitle() %>'
title='<%= LanguageUtil.get(pageContext, label)+" #"+dettPratica.getTitle() %>'
localizeTitle="false" backURL="<%= backURL %>" />
localizeTitle="<%= false %>"
backURL="<%= backURL %>"
/>
</div>
</div>
<c:if test="<%= !disabledEditing %>">
<c:if test="<%= !disabledEditing %>">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 ">
<div class="col-xs-3">
<div class="pull-right" >
<div class="pull-right" >
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<liferay-ui:icon-menu showWhenSingleIcon="false" extended="false" showExpanded="true"
cssClass="inline_toolbar" >
<liferay-ui:icon
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza"
iconCssClass="fa fa-save"
url="javascript:saveFineLavori(true);" linkCssClass="btn" />
message="salva-bozza"
<liferay-ui:icon iconCssClass="fa fa-check-square" message="salva-conferma"
url="javascript:saveFineLavori(true);"
url="javascript:saveFineLavori(false);" linkCssClass="btn btn-primary" />
linkCssClass="btn"
/>
<liferay-ui:icon
iconCssClass="fa fa-check-square"
message="salva-conferma"
url="javascript:saveFineLavori(false);"
linkCssClass="btn btn-primary"
/>
</liferay-ui:icon-menu>
</liferay-ui:icon-menu>
</div>
</div>
</div>
</div>
</c:if>
</c:if>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-md-12">
<div class="col-md-12">
<div class="module-group">
<div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="Inizio lavori">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<%= dateFormatDate.format(dettPratica.getDataInizioLavoriOpera()) %>
</div>
</div>
</div>
</liferay-ui:panel>
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fl">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fl">
<div class="container-fluid">
<div class="container-fluid">
<div class="row">
<div class="row">
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-prov") %>
<%= LanguageUtil.get(pageContext, "fl-prov") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%=BeanPropertiesUtil.getString(provincia, "provincia")%></strong>
<strong><%= BeanPropertiesUtil.getString(provincia, "provincia") %></strong>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-comune") %>
<%= LanguageUtil.get(pageContext, "fl-comune") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%=BeanPropertiesUtil.getString(comune, "denominazione")%></strong>
<strong><%= BeanPropertiesUtil.getString(comune, "denominazione") %></strong>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-sismica") %>
<%= LanguageUtil.get(pageContext, "fl-sismica") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
@ -153,411 +129,353 @@
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%= BeanPropertiesUtil.getString(territorio, "fascia") %></strong>
<strong><%= BeanPropertiesUtil.getString(territorio, "fascia") %></strong>
</div>
</div>
</div>
</div>
<div class="row">
<div class="row">
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-range") %>
<%= LanguageUtil.get(pageContext, "fl-range") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%= BeanPropertiesUtil.getString(territorio, "agMin") %> - <%= BeanPropertiesUtil.getString(territorio, "agMax") %></strong>
<strong><%= BeanPropertiesUtil.getString(territorio, "agMin") %> -
<%= BeanPropertiesUtil.getString(territorio, "agMax") %></strong>
</div>
</div>
</div>
</div>
<hr>
<hr>
<div class="row">
<div class="row">
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-desc-interv") %>
<%= LanguageUtil.get(pageContext, "fl-desc-interv") %>
</div>
</div>
<div class="col-sm-6 col-md-9">
<div class="col-sm-6 col-md-9">
<strong><%=BeanPropertiesUtil.getString(dettPratica, "descLongIntervento") %></strong>
<strong><%= BeanPropertiesUtil.getString(dettPratica, "descLongIntervento") %></strong>
</div>
</div>
</div>
</div>
<hr>
<hr>
<div class="row">
<div class="row">
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-commit") %>
<%= LanguageUtil.get(pageContext, "fl-commit") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%
<%
List<Soggetto> committenti = SoggettoLocalServiceUtil.findByIntPratica_TipologiaSoggetto(intPraticaId, TipoSoggettoUtil.COMMITTENTE);
List<Soggetto> committenti = SoggettoLocalServiceUtil
if(!committenti.isEmpty()){
.findByIntPratica_TipologiaSoggetto(intPraticaId,
%>
TipoSoggettoUtil.COMMITTENTE);
<ul>
if (!committenti.isEmpty()) {
<%
%>
for(Soggetto committente : committenti){
<ul>
%>
<%
<li><strong>
for (Soggetto committente : committenti) {
<%= committente.getDescrizioneCompleta() %>
%>
</strong></li>
<li><strong>
<%
<%= committente.getDescrizioneCompleta() %>
}
</strong></li>
%>
<%
</ul>
}
<%
%>
}
</ul>
%>
<%
</div>
}
<div class="col-sm-6 col-md-3">
%>
<%= LanguageUtil.get(pageContext, "fl-dir-lav") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-dir-lav") %>
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
</div>
<aui:input name="direttoreLavori" value="<%= direttoreLavori.getCodiceFiscale() %>" type="hidden" />
<div class="col-sm-6 col-md-3">
<strong>
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<%= direttoreLavori.getDescrizioneCompleta() %>
<aui:input name="direttoreLavori" value="<%= direttoreLavori.getCodiceFiscale() %>"
</strong>
type="hidden" />
</c:if>
<strong>
</div>
<%= direttoreLavori.getDescrizioneCompleta() %>
</div>
</strong>
<div class="row">
</c:if>
<div class="col-sm-6 col-md-3">
</div>
<%= LanguageUtil.get(pageContext, "fl-tipo-dom") %>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<strong><%= LanguageUtil.get(pageContext, "tipo-pratica-"+intPratica.getTipoPratica()) %></strong>
<%= LanguageUtil.get(pageContext, "fl-tipo-dom") %>
</div>
</div>
</div>
<div class="col-sm-6 col-md-3">
<hr>
<strong><%= LanguageUtil.get(pageContext, "tipo-pratica-"
<div class="row">
+ intPratica.getTipoPratica()) %></strong>
<div class="col-sm-6 col-md-3">
</div>
<%= LanguageUtil.get(pageContext, "fl-tipo") %>
</div>
</div>
<hr>
<div class="col-sm-6 col-md-3">
<div class="row">
<aui:select label="" name="tipoFineLavori" showEmptyOption="true" disabled="<%= disabledEditing %>" >
<div class="col-sm-6 col-md-3">
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_PARZIALE)%>">
<%= LanguageUtil.get(pageContext, "fl-tipo") %>
<aui:option label='Parziale' value="<%= true %>" selected="<%= Validator.isNotNull(fineLavori) && fineLavori.getParziale() %>"/>
</div>
<div class="col-sm-6 col-md-3">
<aui:select label="" name="tipoFineLavori" showEmptyOption="true"
disabled="<%= disabledEditing %>" >
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(),
AzioniPraticheUtil.ACTION_FL_PARZIALE) %>">
<aui:option label='Parziale' value="true" selected="<%= Validator.isNotNull(fineLavori)
&& fineLavori.getParziale() %>"/>
</c:if>
</c:if>
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_TOTALE)%>">
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(),
<aui:option label='Totale' value="<%= false %>" selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
AzioniPraticheUtil.ACTION_FL_TOTALE)%>">
<aui:option label='Totale' value="false" selected="<%= Validator.isNotNull(fineLavori)
&& !fineLavori.getParziale() %>"/>
</c:if>
</c:if>
<c:if test="<%= !AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_PARZIALE) &&
<c:if test="<%= !AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_PARZIALE) &&
!AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_TOTALE) %>">
!AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_TOTALE) %>">
<aui:option label='Parziale' disabled="<%= true %>" value="<%= true %>" selected="<%= Validator.isNotNull(fineLavori) && fineLavori.getParziale() %>"/>
<aui:option label='Parziale' disabled="true" value="true" selected="<%= Validator.isNotNull(fineLavori) && fineLavori.getParziale() %>"/>
<aui:option label='Totale' disabled="<%= true %> " value="<%= false %> " selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
<aui:option label='Totale' disabled="true" value="false" selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
</c:if>
</c:if>
</aui:select>
</aui:select>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-data-fine") %>
<%= LanguageUtil.get(pageContext, "fl-data-fine") %>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="col-sm-6 col-md-3">
<liferay-util:include page="/html/common/input_date_time.jsp" servletContext="<%= application %>">
<liferay-util:include page="/html/common/input_date_time.jsp" servletContext="<%= application %>">
<liferay-util:param name="field" value="dataFineLavori" />
<liferay-util:param name="field" value="dataFineLavori" />
<liferay-util:param name="for mName" value="<%= for mName %>" />
<liferay-util:param name="fmName" value="<%= fmName %>" />
<liferay-util:param name="bean" value="bean.fineLavori" />
<liferay-util:param name="bean" value="bean.fineLavori" />
<liferay-util:param name="disabled" value="<%= String.valueOf(disabledEditing) %>" />
<liferay-util:param name="disabled" value="<%= String.valueOf(disabledEditing) %>" />
</liferay-util:include>
</liferay-util:include>
</div>
</div>
</div>
</div>
<hr>
<hr>
<div class="row">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="col-xs-12">
<aui:input name="normEsenteBollo" label="fl-esente-bollo" disabled="<%= disabledEditing %>"/>
<aui:input name="richiestaAttestazione" label="fl-attestazione" />
</div>
* <%= LanguageUtil.get(pageContext, "fl-attestazione-note") %>
</div>
</div>
<hr>
</div>
<div class="row">
<hr>
<div class="col-sm-12 col-md-12">
<div class="row">
<%= LanguageUtil.get(pageContext, "fl-varianti") %>:
<div class="col-sm-12 col-md-12">
</div>
<aui:input name="normEsenteBollo" label="fl-esente-bollo" disabled="<%= disabledEditing %>"/>
</div>
</div>
<div class="row container-varianti-integrazioni">
</div>
<div class="col-sm-12 col-md-12 container-varianti-integrazioni__dettagli">
<hr>
<liferay-ui:search-container emptyResultsMessage="no-varianti-integrazioni">
<div class="row">
<liferay-ui:search-container-results
<div class="col-sm-12 col-md-12">
results="<%= DettPraticaServiceUtil.findCompletedByIntPraticaAndTipoPratica(intPraticaId, Arrays.asList(new String[]{TipoIntegrazioneUtil.VARIANTE, TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE}))%>"
<%= LanguageUtil.get(pageContext, "fl-varianti") %>:
total="<%= DettPraticaServiceUtil.countCompletedByIntPraticaAndTipoPratica(intPraticaId, Arrays.asList(new String[]{TipoIntegrazioneUtil.VARIANTE, TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE})) %>"
</div>
/>
</div>
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.DettPratica"
<div class="row container-varianti-integrazioni">
modelVar="dettPraticaExtra">
<div class="col-sm-12 col-md-12 container-varianti-integrazioni__dettagli">
<liferay-ui:search-container emptyResultsMessage="no-varianti-integrazioni">
<%
<liferay-ui:search-container-results
String tipoIntegrazione = Validator.isNotNull(dettPraticaExtra.getTipoIntegrazione()) ? LanguageUtil.get(pageContext, "label-integrazione-"+dettPraticaExtra.getTipoIntegrazione()) : "";
results="<%= DettPraticaServiceUtil
%>
.findCompletedByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(TipoIntegrazioneUtil.VARIANTE,
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap" value='<%= Validator.isNotNull(dettPraticaExtra.getDataEffettuazione()) ? dateFormatDate.format(dettPraticaExtra.getDataEffettuazione()) : ""%>' />
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)) %>"
total="<%= DettPraticaServiceUtil.countCompletedByIntPraticaAndTipoPratica(
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
intPraticaId, Arrays.asList(TipoIntegrazioneUtil.VARIANTE,
<%= intPratica.getTitle(locale,true) %>
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)) %>"
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text name="Tipo Pratica" cssClass="text-nowrap">
<%= tipoIntegrazione %>
</liferay-ui:search-container-column-text>
<%-- <c:if test="<%= showHistory %>">
<liferay-ui:search-container-column-text>
<%
String buttonId = "dettagliButton_"+index;
String contentId = "dettagliContent_"+index;
String titleId = "Dettagli "+tipoIntegrazione+" #"+dettPraticaExtra.getDettPraticaId();
%>
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<liferay-ui:icon
id='<%=buttonId %>'
iconCssClass="fa fa-info-circle"
message="detail"
url="javascript:void(0)"
linkCssClass="btn btn-action"
/>
</liferay-ui:icon-menu>
<div id="<portlet:namespace /><%= contentId %>" class="hide" >
<div class="container-fluid">
<div class="row">
<div class="col-sm-12 col-md-12">
<%
if(dettPraticaExtra.getTipoIntegrazione().equals(TipoIntegrazioneUtil.VARIANTE)){
%>
<liferay-util:include page="/html/fascicolo/navigator/view_dettagli_varianti.jsp" servletContext='<%= ServletContextPool.get("portos-bo-portlet") %>'>
<liferay-util:param name="dettPraticaId" value="<%= String.valueOf(dettPraticaExtra.getDettPraticaId()) %>"></liferay-util:param>
</liferay-util:include>
<%
} else if(dettPraticaExtra.getTipoIntegrazione().equals(TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)){
%>
<liferay-util:include page="/html/fascicolo/navigator/view_dettagli_varianti.jsp" servletContext='<%= ServletContextPool.get("portos-bo-portlet") %>'>
<liferay-util:param name="dettPraticaId" value="<%= String.valueOf(dettPraticaExtra.getDettPraticaId()) %>"></liferay-util:param>
</liferay-util:include>
<%
}
%>
<div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fascicolo_title_soggetti">
<liferay-util:include page="/html/soggettipratica/view_valida_fino.jsp" servletContext='<%= application %>'>
<liferay-util:param name="dettPraticaId" value="<%= String.valueOf(dettPraticaExtra.getDettPraticaId()) %>"></liferay-util:param>
<liferay-util:param name="comingFrom" value="page_va_soggetti"></liferay-util:param>
</liferay-util:include>
</liferay-ui:panel>
</div>
<div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fascicolo_title_allegati">
<div class="container-fluid">
<liferay-util:include page="/html/allegatipratica/view_accordion.jsp" servletContext='<%= application %>'>
<liferay-util:param name="classPk" value="<%= String.valueOf(dettPraticaExtra.getDettPraticaId()) %>"/>
<liferay-util:param name="className" value="<%=DettPratica.class.getName() %>"/>
<liferay-util:param name="comingFrom" value="page_va_allegati"/>
<liferay-util:param name="full" value="false"/>
</liferay-util:include>
</div>
</liferay-ui:panel>
</div>
</div>
</div>
</div>
</div>
<liferay-util:include page="/html/common/confirm_window.jsp" servletContext="<%= application %>" >
<liferay-util:param name="titolo" value="<%= titleId %>"></liferay-util:param>
<liferay-util:param name="buttonId" value="<%=buttonId%>"></liferay-util:param>
<liferay-util:param name="contentDiv" value="<%=contentId%>"></liferay-util:param>
<liferay-util:param name="width" value="900"></liferay-util:param>
</liferay-util:include>
</liferay-ui:search-container-column-text>
</c:if> --%>
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="<%= false %>" />
</liferay-ui:search-container>
</div>
</div>
<div class="row container-varianti-fine-lavori">
<div class="col-sm-12 col-md-12 container-fine-lavori__dettagli">
<liferay-ui:search-container emptyResultsMessage="no-fine-lavori-parziali">
<liferay-ui:search-container-results
results='<%= FineLavoriLocalServiceUtil.findByIntPraticaId_Parziale_leFineLavoriId(fineLavoriId, intPraticaId, true, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null) %>'
total='<%= FineLavoriLocalServiceUtil.countByIntPraticaId_Parziale_leFineLavoriId(fineLavoriId, intPraticaId, true) %>'
/>
/>
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.FineLavori"
<liferay-ui:search-container-row modelVar="dettPraticaExtra"
modelVar="fineLavoriParziale">
className="it.tref.liferay.portos.bo.model.DettPratica">
<%
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap" value='<%= Validator.isNotNull(fineLavoriParziale.getDataEffettuazione()) ? dateFormatDate.format(fineLavoriParziale.getDataEffettuazione()) : ""%>' />
String tipoIntegrazione = Validator.isNull(dettPraticaExtra
.getTipoIntegrazione()) ? StringPool.BLANK : LanguageUtil.get(
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
pageContext,
<%= intPratica.getTitle(locale,true) %>
"label-integrazione-" + dettPraticaExtra.getTipoIntegrazione());
</liferay-ui:search-container-column-text>
%>
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap"
<liferay-ui:search-container-column-text name="Tipo Pratica" cssClass="text-nowrap" value='<%= "Fine Lavori "+ (fineLavoriParziale.getParziale() ? "Parziale" : "Totale") %>'></liferay-ui:search-container-column-text>
value='<%= Validator.isNull(dettPraticaExtra.getDataEffettuazione())
? StringPool.BLANK
</liferay-ui:search-container-row>
: dateFormatDate.format(dettPraticaExtra
<liferay-ui:search-iterator paginate="<%= false %>" />
.getDataEffettuazione()) %>' />
</liferay-ui:search-container>
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
</div>
<%= intPratica.getTitle(locale,true) %>
</div>
</liferay-ui:search-container-column-text>
<div class="row">
<liferay-ui:search-container-column-text name="Tipo Pratica" cssClass="text-nowrap">
<div class="col-sm-12 col-md-12">
<%= tipoIntegrazione %>
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
</liferay-ui:search-container-column-text>
<p>
</liferay-ui:search-container-row>
<%= MessageFormat.format(LanguageUtil.get(pageContext, "fl-dichiaraz-direttore"), direttoreLavori.getNome(), direttoreLavori.getCognome()) %>
<liferay-ui:search-iterator paginate="false>" />
</p>
</liferay-ui:search-container>
</c:if>
</div>
</div>
</div>
</div>
<div class="row container-varianti-fine-lavori">
<hr>
<div class="col-sm-12 col-md-12 container-fine-lavori__dettagli">
<div class="row altro_check">
<liferay-ui:search-container emptyResultsMessage="no-fine-lavori-parziali">
<div class="col-sm-12 col-md-12">
<liferay-ui:search-container-results
<aui:input name="altro_checkbox" label="fl-altro" type="checkbox" disabled="<%= disabledEditing %>" checked="<%= Validator.isNotNull(fineLavori.getComunicazioneDirettoreLavori()) && !disabledEditing %>"/>
results='<%= FineLavoriLocalServiceUtil
</div>
.findByIntPraticaId_Parziale_leFineLavoriId(fineLavoriId,
</div>
intPraticaId, true, QueryUtil.ALL_POS, QueryUtil.ALL_POS,
<div class="row">
null) %>'
<div class="col-sm-12 col-md-12">
total='<%= FineLavoriLocalServiceUtil
<aui:input name="comunicazioneDirettoreLavori" label="" type="textarea" disabled="<%= disabledEditing %>"/>
.countByIntPraticaId_Parziale_leFineLavoriId(fineLavoriId,
</div>
intPraticaId, true) %>' />
</div>
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.FineLavori"
<hr>
modelVar="fineLavoriParziale">
<div class="row">
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap"
<div class="col-sm-12 col-md-12">
value='<%= Validator.isNull(fineLavoriParziale.getDataEffettuazione())
<c:if test="<%=!dettPratica.getCollaudoStatico() %>">
? StringPool.BLANK
<liferay-util:include page="/html/common/help_message.jsp" servletContext="<%= application %>">
: dateFormatDate.format(fineLavoriParziale
<liferay-util:param name="message" value="Selezione disabilitata perché la pratica prevede l\'esecuzione del collaudo statico"></liferay-util:param>
.getDataEffettuazione()) %>' />
</liferay-util:include>
<liferay-ui:search-container-column-text name="n-progetto"
</c:if>
cssClass="text-nowrap">
<aui:input name="normEsenteCollaudo" label="fl-collaudo" disabled="<%= disabledEditing || !dettPratica.getCollaudoStatico() %>"/>
<%= intPratica.getTitle(locale, true) %>
</div>
</liferay-ui:search-container-column-text>
</div>
<liferay-ui:search-container-column-text name="Tipo Pratica"
cssClass="text-nowrap" value='<%= "Fine Lavori " + (fineLavoriParziale
.getParziale() ? "Parziale" : "Totale") %>' />
</liferay-ui:search-container-row>
<liferay-ui:search-iterator paginate="false" />
</liferay-ui:search-container>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<p>
<%= MessageFormat.format(LanguageUtil.get(pageContext,
"fl-dichiaraz-direttore"), direttoreLavori.getNome(),
direttoreLavori.getCognome()) %>
</p>
</c:if>
</div>
</div>
<hr>
<div class="row altro_check">
<div class="col-sm-12 col-md-12">
<aui:input name="altro_checkbox" label="fl-altro" type="checkbox"
disabled="<%= disabledEditing %>" checked="<%= Validator.isNotNull(fineLavori
.getComunicazioneDirettoreLavori()) && !disabledEditing %>"/>
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-12">
<aui:input name="comunicazioneDirettoreLavori" label="" type="textarea"
disabled="<%= disabledEditing %>"/>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<c:if test="<%= !dettPratica.getCollaudoStatico() %>">
<liferay-util:include page="/html/common/help_message.jsp"
servletContext="<%= application %>">
<liferay-util:param name="message" value="Selezione disabilitata perché la pratica prevede l\'esecuzione del collaudo statico" />
</liferay-util:include>
</c:if>
<aui:input name="normEsenteCollaudo" label="fl-collaudo" disabled="<%= disabledEditing
|| !dettPratica.getCollaudoStatico() %>"/>
</div>
</div>
</div>
</liferay-ui:panel>
</div>
</div>
</div>
</liferay-ui:panel>
</div>
</div>
<hr>
</div>
<div class="row">
</div>
<div class="col-sm-12 col-md-12">
<hr>
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<div class="row">
<p>
<div class="col-sm-12 col-md-12">
<%= MessageFormat.format(LanguageUtil.get(pageContext, "fl-firma-direttore"),
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
direttoreLavori.getNome(), direttoreLavori.getCognome(),
<p>
direttoreLavori.getCodiceFiscale()) %>
<%= MessageFormat.format(LanguageUtil.get(pageContext, "fl-firma-direttore"), direttoreLavori.getNome(), direttoreLavori.getCognome(), direttoreLavori.getCodiceFiscale()) %>
</p>
</p>
</c:if>
</c:if>
</div>
</div>
</div>
</div>
<hr>
<hr>
<div class="row">
<div class="row">
<div class="col-sm-12 col-md-12">
<div class="col-sm-12 col-md-12">
<%= LanguageUtil.get(pageContext, "fl-allegati") %>:
<%= LanguageUtil.get(pageContext, "fl-allegati") %>:
</div>
</div>
<div class="col-sm-12 col-md-12 container-allegati-fine-lavoro">
<div class="col-sm-12 col-md-12 container-allegati-fine-lavoro">
<%
<%
String comingFrom = "page_fine_lavori";
String comingFrom = "page_fine_lavori";
%>
%>
<aui:script use="aui-base">
<aui:script use="aui-base">
var allegatiEdit = false;
var allegatiEdit = false;
Liferay.on('popupReady', function (event) {
Liferay.on('popupReady',function(event) {
var modalName = event._event.details[0].windowName;
var modalName = event._event.details[0].windowName;
var modalWin = Liferay.Util.Window.getById(modalName);
var modalWin = Liferay.Util.Window.getById(modalName);
modalWin.after('visibleChange', function (event) {
modalWin.after('visibleChange', function(event) {
if (event.prevVal) {
if(event.prevVal){
if (allegatiEdit) {
if(allegatiEdit){
Liferay.Portlet.refresh(
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
"#p_p_id_<%= PortletKeys.ALLEGATI %>_INSTANCE_<%= comingFrom %>_"
}
);
}
}
}
});
modalWin.after('hide', function (event) {
if (allegatiEdit) {
Liferay.Portlet.refresh(
"#p_p_id_<%= PortletKeys.ALLEGATI %>_INSTANCE_<%= comingFrom %>_"
);
}
});
modalWin.after('destroy', function (event) {
if (allegatiEdit) {
Liferay.Portlet.refresh(
"#p_p_id_<%= PortletKeys.ALLEGATI %>_INSTANCE_<%= comingFrom %>_"
);
}
});
});
});
modalWin.after('hide', function(event) {
Liferay.on('allegati-<%= comingFrom %>-open', function (event) {
if(allegatiEdit){
allegatiEdit = true;
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
}
});
});
modalWin.after('destroy', function(event) {
Liferay.on('allegati-<%= comingFrom %>-ready', function (event) {
if(allegatiEdit){
allegatiEdit = false;
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
}
});
});
});
</aui:script>
Liferay.on('allegati-<%=comingFrom%>-open',function(event) {
<liferay-portlet:runtime portletName='<%= PortletKeys.ALLEGATI + "_INSTANCE_" + comingFrom %>'
allegatiEdit=true;
queryString='<%= "&classPk=" + fineLavori.getFineLavoriId() + "&className="
});
+ FineLavori.class.getName() + "&comingFrom=" + comingFrom + "&disabled="
Liferay.on('allegati-<%=comingFrom%>-ready',function(event) {
+ disabledEditing + "&inBO=" + disabledEditing %>' />
if(allegatiEdit){
</div>
allegatiEdit=false;
</div>
}
</div>
</aui:form>
});
<c:if test="<%= openVerifyUrl %>">
<liferay-portlet:renderURL var="verifyRenderURL" windowState="<%= LiferayWindowState.POP_UP.toString() %>">
</aui:script>
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fine-lavori.jsp" />
<liferay-portlet:param name="intPraticaId" value="<%= String.valueOf(intPraticaId) %>" />
<liferay-portlet:runtime portletName='<%=PortletKeys.ALLEGATI+"_INSTANCE_"+comingFrom %>' queryString='<%="&classPk="+fineLavori.getFineLavoriId()+"&className="+FineLavori.class.getName()+"&comingFrom="+comingFrom+"&disabled="+disabledEditing+"&inBO="+disabledEditing%>' ></liferay-portlet:runtime>
<liferay-portlet:param name="fineLavoriId" value="<%= String.valueOf(fineLavoriId) %>" />
</liferay-portlet:renderURL>
</div>
<aui:script use="aui-base">
</div>
Liferay.Util.openWindow({
</div>
</aui:form>
<c:if test="<%=openVerifyUrl %>">
<liferay-portlet:renderURL var="verifyRenderURL" windowState="<%=LiferayWindowState.POP_UP.toString() %>">
<liferay-portlet:param name="mvcPath" value="/html/fascicolofe/verify_fine-lavori.jsp" />
<liferay-portlet:param name="intPraticaId" value="<%=String.valueOf(intPraticaId)%>" />
<liferay-portlet:param name="fineLavoriId" value="<%=String.valueOf(fineLavoriId)%>" />
</liferay-portlet:renderURL>
<aui:script use="aui-base">
Liferay.Util.openWindow(
{
id: '<portlet:namespace />openVerificaFineLavori',
id: '<portlet:namespace />openVerificaFineLavori',
title: 'Verifica Fine Lavori',
title: 'Verifica Fine Lavori',
uri: '<%=verifyRenderURL%>'
uri: '<%= verifyRenderURL %>',
}
});
);
</aui:script>
</aui:script>
</c:if>
</c:if>
<liferay-portlet:renderURL var="editEntryURL" copyCurrentRenderParameters="true" />
<liferay-portlet:renderURL var="editEntryURL" copyCurrentRenderParameters="true" />
<%
<%
String refreshURL = HttpUtil.removeParameter(editEntryURL.toString(), "_"+PortletKeys.FASCICOLOFE+"_openVerifyUrl");
String refreshURL = HttpUtil.removeParameter(editEntryURL.toString(), "_" + PortletKeys.FASCICOLOFE + "_openVerifyUrl");
%>
%>
<aui:script use="aui-base">
<aui:script use="aui-base">
var verifyPopupReady = false;
Liferay.on('popupReady',function (event) {
/* SDB: disabilitato. Il checkbox arriva disabilitato se il dettPratica da cui si fa il fine lavori ha collaudo statico false.
var modalName = event._event.details[0].windowName;
* se sarà necessario questo listener disabilita il checkbox al momento che viene dececcato.
var modalWin = Liferay.Util.Window.getById(modalName);
*/
modalWin.after('visibleChange', function (event) {
if(false){
if (event.prevVal && verifyPopupReady) {
AUI().one('#<portlet:namespace />normEsenteCollaudoCheckbox').on('click', function(event){
window.location.href = "<%= refreshURL %>"
}
if(confirm("ATTENZIONE:\n rimuovendo la selezione non sarà possibile riattivarla in queste fase.")){
});
if (!this.attr('checked')){
modalWin.after('hide', function (event) {
this.addClass('disabled');
if (verifyPopupReady) {
this.set('disabled', true);
window.location.href = "<%= refreshURL %>"
}
}
} else {
this.set('checked',true);
this.set('value',true);
Liferay.Util.updateCheckboxValue(this);
}
});
}
var verifyPopupReady = false;
Liferay.on('popupReady',function(event) {
var modalName = event._event.details[0].windowName;
var modalWin = Liferay.Util.Window.getById(modalName);
modalWin.after('visibleChange', function(event) {
if(event.prevVal && verifyPopupReady){
window.location.href = "<%= refreshURL %>"
}
});
modalWin.after('hide', function(event) {
if(verifyPopupReady){
window.location.href = "<%= refreshURL %>"
}
});
modalWin.after('destroy', function(event) {
if(verifyPopupReady){
window.location.href = "<%= refreshURL %>"
}
});
});
});
Liferay.on('verifyPopup-ready',function(event) {
modalWin.after('destroy', function (event) {
verifyPopupReady=true;
if(verifyPopupReady){
window.location.href = "<%= refreshURL %>"
}
});
});
});
Liferay.on('verifyPopup-ready', function (event) {
verifyPopupReady = true;
Liferay.provide(
});
window,
Liferay.provide(
'saveFineLavori',
window,
function(bozza) {
'saveFineLavori',
AUI().one('#<portlet:namespace />bozza').set('value',bozza);
function (bozza) {
submitForm(document.<portlet:namespace /><%= formName %>);
AUI().one('#<portlet:namespace />bozza').set('value', bozza);
},
submitForm(document.<portlet:namespace /><%= fmName %>);
['aui-base']
},
);
['aui-base']
);
</aui:script>
</aui:script>