confrontoNucleoComponenti.jsp 6.24 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
<%@ include file="/project/include.jsp" %>

<link rel="stylesheet" type="text/css" href="${j:getResourceUrlOfModule('anagrafiche','css/compareNucleo.css')}" />

<script type="text/javascript">
function allineaRapportoParentela(key) {
	var $sel = $('#' + key);
	var value = $sel.attr('propValue');
	$sel.val(value);
}

function showDetails(key) {
	$('#divTarget').html($('#' + key).html());
	
	var buttons = [
					{ 'img'		: juiceGetResource('shell', 'img/misc/confirm-small.gif'),
					  'text'	: 'Ok',
					  'onclick'	: 
					  	function() { 
						  hideModal('idDivInfoCompare');
						}
					}
				];
	var rec = getClientAreaRectangle().resize(670, 420, HORIZONTAL_CENTER | VERTICAL_CENTER);	
	showDivModal('idDivInfoCompare', 'Confronto', rec, false, false, buttons);	
}

</script>


<br/><br/>

<c:choose>
<c:when test="${empty componentiDto}">
<span>Non ci sono componenti da confrontare</span>
</c:when>
<c:otherwise>

<shell:fieldset title="Confronto dei componenti del nucleo">
<table border="0" cellspacing="3" cellpadding="0" width="100%">
	<c:forEach var="cmp" items="${componentiDto}">
		<tr>
			<td class="form-label" rowspan="2">
				<c:set var="imgName" value="img/${cmp.tipo}.gif"/>
				<img src="${j:getResourceUrlOfModule('anagrafiche', imgName)}" width="64" height="24" border="0" align="absmiddle">
				&nbsp;${cmp.soggetto}
			</td>
			<%-- 
			<td class="compare-form-label">${cmp.descrizione}</td>
			--%>			
			<td class="compare-form-label">
				<a href="javascript: showDetails('detail_${cmp.index}')">
					<img src="${j:getResourceUrlOfModule('anagrafiche', 'img/showDetails.gif')}" width="16" height="16" border="0" align="absmiddle"/>
				</a>
				${cmp.descrizione}
				<div id="detail_${cmp.index}" class="compare-hidden-box">
					<table border="0" cellspacing="5" cellpadding="0" width="100%" >
						<tr>
							<td colspan="2" class="compare-form-header">
								${cmp.soggetto}
							</td>
						</tr>
						<tr>
							<td width="50%" valign="top">
								<table border="0" cellspacing="3" cellpadding="0" width="100%" >
									<tr>
										<td class="compare-form-header" colspan="2"><shell:label prop="sitAnagrafe" /></td>
									</tr>
									<c:if test="${! empty cmp.anag.nucleoValid}">
									<tr>
										<td class="form-label" rowspan="2"><shell:label prop="statoDemografico" /></td>
										<td class="form-values">${cmp.anag.stDemog}</td>
									</tr>
									<tr>											
										<td class="form-values">${cmp.anag.stDemogValid}</td>
									</tr>
									<tr>
										<td class="form-label"><shell:label prop="gradoPar" /></td>
										<td class="form-values">${cmp.anag.gradoPar}</td>
									</tr>
									</c:if>
									
									<tr>
										<td class="form-label"><shell:label prop="nucleo" /></td>
										<td class="form-values">${cmp.anag.nucleo}</td>
									</tr>
									
									<c:if test="${! empty cmp.anag.nucleoValid}">
									<tr>
										<td class="form-label"><shell:label prop="validita" /></td>
										<td class="form-values">${cmp.anag.nucleoValid}</td>
									</tr>
									<tr>
										<td class="form-label"><shell:label prop="nucleoCod" /></td>
										<td class="form-values">${cmp.anag.nucleoCod}</td>
									</tr>
									</c:if>
									
								</table>
							</td>
							
							<td valign="top">
								<table border="0" cellspacing="3" cellpadding="0" width="100%" >
									<tr>
										<td class="compare-form-header" colspan="2"><shell:label prop="sitIcaro" /></td>
									</tr>
									<c:if test="${! empty cmp.icaro.sogg}">
									<tr>
										<td class="form-values" colspan="2">${cmp.icaro.sogg}</td>
									</tr>
									</c:if>
									
									<c:if test="${empty cmp.icaro.sogg}">
										<tr>
											<td class="form-label"><shell:label prop="nucleo" /></td>
											<td class="form-values">${cmp.icaro.nucleo}</td>
										</tr>
										
										<c:if test="${! empty cmp.icaro.lastNucleo}">
										<tr>
											<td class="form-label"><shell:label prop="lastNucleo" /></td>
											<td class="form-values">${cmp.icaro.lastNucleo}</td>
										</tr>
										</c:if>
										
										
										<c:if test="${! empty cmp.icaro.nucleoValid}">
										<tr>
											<td class="form-label"><shell:label prop="validita" /></td>
											<td class="form-values">${cmp.icaro.nucleoValid}</td>
										</tr>
										<tr>
											<td class="form-label"><shell:label prop="nucleoCod" /></td>
											<td class="form-values">${cmp.icaro.nucleoCod}</td>
										</tr>
										</c:if>
																			
									</c:if>
									
								</table>
							</td>
						</tr>
					</table>
				</div>
			</td>
		</tr>	
		<tr>
			<td class="form-values">
				<table border="0" cellspacing="3" cellpadding="0" width="100%" >
					<tr>
						<td class="form-values" width="65%" valign="top">
							<j:bind prop="prop_${cmp.index}1">
								<j:valueSetIterator>
									<j:radio/> ${j:getValueSetItem().description}
								</j:valueSetIterator>										
								<shell:error />
							</j:bind>
							<c:if test="${cmp.showDataLimite}">
								<j:bind prop="prop_${cmp.index}2">
									<j:text class="form-date" id="dataLimite${cmp.index}Cld"/>
									<shell:calendar inputId="dataLimite${cmp.index}Cld" />						
									<shell:error />
								</j:bind>
							</c:if>
						</td>
						<td width="35%" valign="top">
							<table border="0" cellspacing="3" cellpadding="0" width="100%" >
								<tr>
									<td class="form-label" colspan="2">Rel. parentela</td>
								</tr>
								<tr>
									<td class="form-label">Anagrafe:</td>
									<td class="form-values"><a href="javascript:allineaRapportoParentela('selCmp_${cmp.index}')">${cmp.anag.relPar}</a></td>
								</tr>
								<tr>
									<td class="form-label">Icaro:</td>
									<td class="form-values">
										<j:bind prop="prop_${cmp.index}0">
											<j:select class="form-input" id="selCmp_${cmp.index}" emptyOptionDescr="" propValue="${cmp.anag.relParId}"/>						
											<shell:error />
										</j:bind>
									</td>
								</tr>
								
							</table>
						</td>
					</tr>				
				</table>								
	  		</td>
		</tr>
	</c:forEach>
</table>
</shell:fieldset>
</c:otherwise>
</c:choose>

<div id="idDivInfoCompare" class="modalElement">
	<div id="divTarget"></div>
</div>