@ -1,125 +1,147 @@
<%@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="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.FineLavoriServiceUtil"%>
<%@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.model.FineLavori"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.TerritorioLocalServiceUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.PortletKeys"%>
<%@page import="com.liferay.portal.kernel.servlet.ServletContextPool"%>
<%@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.util.DelegheUtil"%>
<%@page import="it.tref.liferay.portos.bo.shared.util.TipoSoggettoUtil"%>
<%@page import="it.tref.liferay.portos.bo.util.AzioniPraticheUtil"%>
<%@page import="it.tref.liferay.portos.bo.service.SoggettoServiceUtil"%>
<%@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" %>
<%
String backURL = ParamUtil.getString(request, "backURL");
long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId", 0L);
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(fineLavoriId);
if (Validator.isNull(fineLavori)) {
long intPraticaIdParam = ParamUtil.getLong(request, "intPraticaId");
fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaIdParam);
fineLavoriId = fineLavori.getFineLavoriId();
}
boolean openVerifyUrl = ParamUtil.getBoolean(request, "openVerifyUrl");
long intPraticaId = fineLavori.getIntPraticaId();
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
if (dettPratica == null) {
dettPratica = DettPraticaServiceUtil.getLastEditableByIntPratica(intPraticaId);
}
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
Soggetto direttoreLavori = null;
List<Soggetto> direttori = SoggettoLocalServiceUtil.findByIntPratica_CodiceFiscale(intPraticaId,
dettPratica.getCodiceFiscaleDelegatoFineLavori());
if (!direttori.isEmpty()) {
direttoreLavori = direttori.get(0);
}
String fmName = "fmFineLavori";
boolean disabledEditing = fineLavori.getCompletata();
request.setAttribute("bean.fineLavori", fineLavori);
String backURL = ParamUtil.getString(request, "backURL");
long fineLavoriId = ParamUtil.getLong(request, "fineLavoriId",0l);
FineLavori fineLavori = FineLavoriLocalServiceUtil.fetchFineLavori(fineLavoriId);
if( Validator.isNull(fineLavori) ){
long intPraticaIdParam = ParamUtil.getLong(request, "intPraticaId");
fineLavori = FineLavoriServiceUtil.getLastEditable(intPraticaIdParam);
fineLavoriId = fineLavori.getFineLavoriId();
}
boolean openVerifyUrl = ParamUtil.getBoolean(request, "openVerifyUrl");
boolean showHistory = ParamUtil.getBoolean(request, "showHistory", true);
long intPraticaId = fineLavori.getIntPraticaId();
IntPratica intPratica = IntPraticaServiceUtil.getIntPratica(intPraticaId);
DettPratica dettPratica = DettPraticaServiceUtil.getLastCompletedByIntPratica(intPraticaId);
if(dettPratica == null){
dettPratica = DettPraticaServiceUtil.getLastEditableByIntPratica(intPraticaId);
}
Territorio territorio = TerritorioLocalServiceUtil.getTerritorio(intPratica.getTerritorioId());
Comune comune = ComuneLocalServiceUtil.getComune(territorio.getComuneId());
Provincia provincia = ProvinciaLocalServiceUtil.fetchByC_C(territorio.getCompanyId(), territorio.getCodiceProvincia());
Soggetto direttoreLavori = null;
List<Soggetto> direttori = SoggettoLocalServiceUtil.findByIntPratica_CodiceFiscale(intPraticaId, dettPratica.getCodiceFiscaleDelegatoFineLavori());
if(!direttori.isEmpty()){
direttoreLavori = direttori.get(0);
}
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:param name="fineLavoriId" value="<%= String.valueOf(fineLavoriId) %>"/>
<liferay-portlet:param name="backURL" value="<%= backURL %>"/>
<liferay-portlet:param name="successURL" value="<%= currentURL %>"/>
<liferay-portlet:param name="fineLavoriId" value="<%=String.valueOf(fineLavori.getFineLavori Id() ) %>"/>
<liferay-portlet:param name="backURL" value="<%=backURL %>"/>
<liferay-portlet:param name="successURL" value="<%=currentURL %>"/>
</liferay-portlet:actionURL>
<aui:form name="<%= fmName %>" onSubmit="preventDefault();" action="<%= saveFineLavoriURL %>">
<aui:model-context bean="<%= fineLavori %>" model="<%= FineLavori.class %>" />
<aui:form name="<%= formName %>" onSubmit="preventDefault();" action="<%= saveFineLavoriURL %>">
<aui:model-context bean="<%= fineLavori %>" model="<%=FineLavori.class %>"></aui:model-context>
<aui:input type="hidden" name="bozza" />
<div class="container-fluid">
<div class="row">
<div class="col-xs-9">
<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9 ">
<%
String label = StringPool.BLANK;
if (disabledEditing) {
label = "view-fine-lavori";
} else if (Validator.isNull(fineLavori.getFineLavoriId())) {
label = "new-fine-lavori";
} else {
label = "edit-fine-lavori";
}
String label = StringPool.BLANK;
if(disabledEditing){
label = "view-fine-lavori";
}else if(Validator.isNull(fineLavori.getFineLavoriId())){
label = "new-fine-lavori";
} else {
label = "edit-fine-lavori";
}
%>
<liferay-ui:header title='<%= LanguageUtil.get(pageContext, label) + " #" + dettPratica.getTitle() %>'
localizeTitle="false" backURL="<%= backURL %>" />
<liferay-ui:header
title='<%= LanguageUtil.get(pageContext, label)+" #"+dettPratica.getTitle() %>'
localizeTitle="<%= false %>"
backURL="<%= backURL %>"
/>
</div>
<c:if test="<%= !disabledEditing %>">
<div class="col-xs-3">
<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 ">
<div class="pull-right" >
<liferay-ui:icon-menu showWhenSingleIcon="false" extended="false" showExpanded="true"
cssClass="inline_toolbar" >
<liferay-ui:icon iconCssClass="fa fa-save" message="salva-bozza"
url="javascript:saveFineLavori(true);" 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 showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<liferay-ui:icon
iconCssClass="fa fa-save"
message="salva-bozza"
url="javascript:saveFineLavori(true);"
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>
</div>
</div>
</c:if>
</div>
<div class="row">
<div class="col-md-12">
<div class="module-group">
<c:if test="<%= Validator.isNotNull(dettPratica.getDataInizioLavoriOpera()) %>">
<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>
</c:if>
<div class="module-group">
<liferay-ui:panel extended="false" defaultState="open" collapsible="false" title="fl">
<div class="container-fluid">
<div class="row">
<div class="col-sm-6 col-md-3">
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-prov") %>
</div>
<div class="col-sm-6 col-md-3">
<strong><%= BeanPropertiesUtil.getString(provincia, "provincia") %></strong>
<strong><%=BeanPropertiesUtil.getString(provincia, "provincia")%></strong>
</div>
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-comune") %>
</div>
<div class="col-sm-6 col-md-3">
<strong><%= BeanPropertiesUtil.getString(comune, "denominazione") %></strong>
<strong><%=BeanPropertiesUtil.getString(comune, "denominazione")%></strong>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-3">
</div>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-sismica") %>
</div>
<div class="col-sm-6 col-md-3">
@ -131,359 +153,411 @@ request.setAttribute("bean.fineLavori", fineLavori);
<div class="col-sm-6 col-md-3">
<strong><%= BeanPropertiesUtil.getString(territorio, "fascia") %></strong>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-3">
</div>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-range") %>
</div>
<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>
<hr>
<div class="row">
<div class="col-sm-6 col-md-3">
</div>
<hr>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-desc-interv") %>
</div>
<div class="col-sm-6 col-md-9">
<strong><%= BeanPropertiesUtil.getString(dettPratica, "descLongIntervento") %></strong>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-commit") %>
</div>
<div class="col-sm-6 col-md-3">
<%
List<Soggetto> committenti = SoggettoLocalServiceUtil
.findByIntPratica_TipologiaSoggetto(intPraticaId,
TipoSoggettoUtil.COMMITTENTE);
if (!committenti.isEmpty()) {
%>
<ul>
<%
for (Soggetto committente : committenti) {
%>
<li><strong>
<%= committente.getDescrizioneCompleta() %>
</strong></li>
<%
}
%>
</ul>
<%
}
%>
</div>
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-dir-lav") %>
</div>
<div class="col-sm-6 col-md-3">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<aui:input name="direttoreLavori" value="<%= direttoreLavori.getCodiceFiscale() %>"
type="hidden" />
<strong>
<%= direttoreLavori.getDescrizioneCompleta() %>
</strong>
</c:if>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-tipo-dom") %>
</div>
<div class="col-sm-6 col-md-3">
<strong><%= LanguageUtil.get(pageContext, "tipo-pratica-"
+ intPratica.getTipoPratica()) %></strong>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-tipo") %>
</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() %>"/>
<strong><%=BeanPropertiesUtil.getString(dettPratica, "descLongIntervento") %></strong>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-commit") %>
</div>
<div class="col-sm-6 col-md-3">
<%
List<Soggetto> committenti = SoggettoLocalServiceUtil.findByIntPratica_TipologiaSoggetto(intPraticaId, TipoSoggettoUtil.COMMITTENTE);
if(!committenti.isEmpty()){
%>
<ul>
<%
for(Soggetto committente : committenti){
%>
<li><strong>
<%= committente.getDescrizioneCompleta() %>
</strong></li>
<%
}
%>
</ul>
<%
}
%>
</div>
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-dir-lav") %>
</div>
<div class="col-sm-6 col-md-3">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<aui:input name="direttoreLavori" value="<%= direttoreLavori.getCodiceFiscale() %>" type="hidden" />
<strong>
<%= direttoreLavori.getDescrizioneCompleta() %>
</strong>
</c:if>
</div>
</div>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-tipo-dom") %>
</div>
<div class="col-sm-6 col-md-3">
<strong><%= LanguageUtil.get(pageContext, "tipo-pratica-"+intPratica.getTipoPratica()) %></strong>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-tipo") %>
</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 test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(),
AzioniPraticheUtil.ACTION_FL_TOTALE)%>">
<aui:option label='Totale' value="false" selected="<%= Validator.isNotNull(fineLavori)
&& !fineLavori.getParziale() %>"/>
<c:if test="<%= AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_TOTALE)%>">
<aui:option label='Totale' value="<%= false %>" selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
</c:if>
<c:if test="<%= !AzioniPraticheUtil.isAllowedAction(intPratica.getIntPraticaId(), AzioniPraticheUtil.ACTION_FL_PARZIALE) &&
!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='Totale' disabled="true" value="false" selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
!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='Totale' disabled="<%= true %> " value="<%= false %> " selected="<%= Validator.isNotNull(fineLavori) && !fineLavori.getParziale() %>"/>
</c:if>
</aui:select>
</div>
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-data-fine") %>
</div>
<div class="col-sm-6 col-md-3">
</div>
<div class="col-sm-6 col-md-3">
<%= LanguageUtil.get(pageContext, "fl-data-fine") %>
</div>
<div class="col-sm-6 col-md-3">
<liferay-util:include page="/html/common/input_date_time.jsp" servletContext="<%= application %>">
<liferay-util:param name="field" value="dataFineLavori" />
<liferay-util:param name="fmName" value="<%= fmName %>" />
<liferay-util:param name="for mName" value="<%= for mName %>" />
<liferay-util:param name="bean" value="bean.fineLavori" />
<liferay-util:param name="disabled" value="<%= String.valueOf(disabledEditing) %>" />
</liferay-util:include>
</div>
</div>
<hr>
<div class="row">
<div class="col-xs-12">
<aui:input name="richiestaAttestazione" label="fl-attestazione"
disabled="<%= disabledEditing %>" />
* <%= LanguageUtil.get(pageContext, "fl-attestazione-note") %>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<aui:input name="normEsenteBollo" label="fl-esente-bollo"
disabled="<%= disabledEditing %>"/>
</div>
<div class="col-sm-12 col-md-12">
<aui:input name="normEsenteSpese" label="norm-esente-diritti"
disabled="<%= disabledEditing %>"/>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<%= LanguageUtil.get(pageContext, "fl-varianti") %>:
</div>
</div>
<div class="row container-varianti-integrazioni">
<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
results="<%= DettPraticaServiceUtil
.findCompletedByIntPraticaAndTipoPratica(intPraticaId,
Arrays.asList(TipoIntegrazioneUtil.VARIANTE,
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)) %>"
total="<%= DettPraticaServiceUtil.countCompletedByIntPraticaAndTipoPratica(
intPraticaId, Arrays.asList(TipoIntegrazioneUtil.VARIANTE,
TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE)) %>"
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<aui:input name="normEsenteBollo" label="fl-esente-bollo" disabled="<%= disabledEditing %>"/>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<%= LanguageUtil.get(pageContext, "fl-varianti") %>:
</div>
</div>
<div class="row container-varianti-integrazioni">
<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
results="<%= DettPraticaServiceUtil.findCompletedByIntPraticaAndTipoPratica(intPraticaId, Arrays.asList(new String[]{TipoIntegrazioneUtil.VARIANTE, TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE}))%>"
total="<%= DettPraticaServiceUtil.countCompletedByIntPraticaAndTipoPratica(intPraticaId, Arrays.asList(new String[]{TipoIntegrazioneUtil.VARIANTE, TipoIntegrazioneUtil.RICHIESTA_INTEGRAZIONE})) %>"
/>
<liferay-ui:search-container-row modelVar="dettPraticaExtra"
className="it.tref.liferay.portos.bo.model.DettPratica">
<%
String tipoIntegrazione = Validator.isNull(dettPraticaExtra
.getTipoIntegrazione()) ? StringPool.BLANK : LanguageUtil.get(
pageContext,
"label-integrazione-" + dettPraticaExtra.getTipoIntegrazione());
%>
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap"
value='<%= Validator.isNull(dettPraticaExtra.getDataEffettuazione())
? StringPool.BLANK
: dateFormatDate.format(dettPraticaExtra
.getDataEffettuazione()) %>' />
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
<%= intPratica.getTitle(locale,true) %>
</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>
</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"
modelVar="fineLavoriParziale">
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap"
value='<%= Validator.isNull(fineLavoriParziale.getDataEffettuazione())
? StringPool.BLANK
: dateFormatDate.format(fineLavoriParziale
.getDataEffettuazione()) %>' />
<liferay-ui:search-container-column-text name="n-progetto"
cssClass="text-nowrap">
<%= intPratica.getTitle(locale, true) %>
</liferay-ui:search-container-column-text>
<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>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<p>
<%= MessageFormat.format(LanguageUtil.get(pageContext, "fl-firma-direttore"),
direttoreLavori.getNome(), direttoreLavori.getCognome(),
direttoreLavori.getCodiceFiscale()) %>
</p>
</c:if>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<%= LanguageUtil.get(pageContext, "fl-allegati") %>:
<liferay-ui:search-container-row className="it.tref.liferay.portos.bo.model.DettPratica"
modelVar="dettPraticaExtra">
<%
String tipoIntegrazione = Validator.isNotNull(dettPraticaExtra.getTipoIntegrazione()) ? LanguageUtil.get(pageContext, "label-integrazione-"+dettPraticaExtra.getTipoIntegrazione()) : "";
%>
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap" value='<%= Validator.isNotNull(dettPraticaExtra.getDataEffettuazione()) ? dateFormatDate.format(dettPraticaExtra.getDataEffettuazione()) : ""%>' />
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
<%= intPratica.getTitle(locale,true) %>
</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"
modelVar="fineLavoriParziale">
<liferay-ui:search-container-column-text name="Data" cssClass="text-nowrap" value='<%= Validator.isNotNull(fineLavoriParziale.getDataEffettuazione()) ? dateFormatDate.format(fineLavoriParziale.getDataEffettuazione()) : ""%>' />
<liferay-ui:search-container-column-text name="n-progetto" cssClass="text-nowrap">
<%= intPratica.getTitle(locale,true) %>
</liferay-ui:search-container-column-text>
<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>
</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:param>
</liferay-util:include>
</c:if>
<aui:input name="normEsenteCollaudo" label="fl-collaudo" disabled="<%= disabledEditing || !dettPratica.getCollaudoStatico() %>"/>
</div>
</div>
</div>
<div class="col-sm-12 col-md-12 container-allegati-fine-lavoro">
<%
String comingFrom = "page_fine_lavori";
%>
<aui:script use="aui-base">
var allegatiEdit = 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) {
if (allegatiEdit) {
Liferay.Portlet.refresh(
"#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 %>_"
);
}
});
</liferay-ui:panel>
</div>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<c:if test="<%= Validator.isNotNull(direttoreLavori) %>">
<p>
<%= MessageFormat.format(LanguageUtil.get(pageContext, "fl-firma-direttore"), direttoreLavori.getNome(), direttoreLavori.getCognome(), direttoreLavori.getCodiceFiscale()) %>
</p>
</c:if>
</div>
</div>
<hr>
<div class="row">
<div class="col-sm-12 col-md-12">
<%= LanguageUtil.get(pageContext, "fl-allegati") %>:
</div>
<div class="col-sm-12 col-md-12 container-allegati-fine-lavoro">
<%
String comingFrom = "page_fine_lavori";
%>
<aui:script use="aui-base">
var allegatiEdit = 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){
if(allegatiEdit){
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
}
}
});
Liferay.on('allegati-<%= comingFrom %>-open', function (event) {
allegatiEdit = true;
modalWin.after('hide', function(event) {
if(allegatiEdit){
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
}
});
Liferay.on('allegati-<%= comingFrom %>-ready', function (event) {
allegatiEdit = false;
modalWin.after('destroy', function(event) {
if(allegatiEdit){
Liferay.Portlet.refresh("#p_p_id_<%=PortletKeys.ALLEGATI%>_INSTANCE_<%=comingFrom%>_");
}
});
</aui:script>
<liferay-portlet:runtime portletName='<%= PortletKeys.ALLEGATI + "_INSTANCE_" + comingFrom %>'
queryString='<%= "&classPk=" + fineLavori.getFineLavoriId() + "&className="
+ FineLavori.class.getName() + "&comingFrom=" + comingFrom + "&disabled="
+ disabledEditing + "&inBO=" + disabledEditing %>' />
</div>
</div>
</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({
});
Liferay.on('allegati-<%=comingFrom%>-open',function(event) {
allegatiEdit=true;
});
Liferay.on('allegati-<%=comingFrom%>-ready',function(event) {
if(allegatiEdit){
allegatiEdit=false;
}
});
</aui:script>
<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>
</div>
</div>
</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',
title: 'Verifica Fine Lavori',
uri: '<%= verifyRenderURL %>',
});
</aui:script>
</c:if>
uri: '<%=verifyRenderURL%>'
}
);
</aui:script>
</c:if>
<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">
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 %>"
}
/* SDB: disabilitato. Il checkbox arriva disabilitato se il dettPratica da cui si fa il fine lavori ha collaudo statico false.
* se sarà necessario questo listener disabilita il checkbox al momento che viene dececcato.
*/
if(false){
AUI().one('#<portlet:namespace />normEsenteCollaudoCheckbox').on('click', function(event){
if(confirm("ATTENZIONE:\n rimuovendo la selezione non sarà possibile riattivarla in queste fase.")){
if (!this.attr('checked')){
this.addClass('disabled');
this.set('disabled', true);
}
} 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 %>"
}
});
});
modalWin.after('destroy', function (event) {
if(verifyPopupReady){
window.location.href = "<%= refreshURL %>"
}
Liferay.on('verifyPopup-ready',function(event) {
verifyPopupReady=true;
});
});
Liferay.on('verifyPopup-ready', function (event) {
verifyPopupReady = true;
});
Liferay.provide(
window,
'saveFineLavori',
function (bozza) {
AUI().one('#<portlet:namespace />bozza').set('value', bozza);
submitForm(document.<portlet:namespace /><%= fmName %>);
},
['aui-base']
);
Liferay.provide(
window,
'saveFineLavori',
function(bozza) {
AUI().one('#<portlet:namespace />bozza').set('value',bozza);
submitForm(document.<portlet:namespace /><%= formName %>);
},
['aui-base']
);
</aui:script>