<%@ include file="/project/include.jsp" %>

<script type="text/javascript">
	function scaricaFile(log) {
		var idPag = cpGetMasterColumnValueOfCurrentRow('id');
		var params = 'idPagamento=' + idPag + '&log=' + (log ? 'true' : 'false');		
		juiceDownload('it.cedaf.icare.pagamenti.etc.PagamentiEffettuatiFileContentProvider', params);
	}
	
	<bui:out modes="view">
		function eformat_cpmt_fileImportato(element, value, name) {
			element.innerHTML = value;
			document.getElementById('idSpanDownload').style.display = (value == '' ? 'none' : 'inline');
		}
	</bui:out>
</script>

<shell:fieldset title="Informazioni generali">
	<table border="0" cellspacing="3" cellpadding="0" >
		<tr>
			<td class="form-label">
				<shell:label prop="ente" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="ente" />
				</bui:out>
			</td>
		</tr>	
		<tr>
			<td class="form-label">
				<shell:label prop="dataRegistrazione" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="dataRegistrazione" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="utente" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="utente" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="fonte" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="fonte" />
				</bui:out>
			</td>
		</tr>	
		<tr>
			<td class="form-label">
				<shell:label prop="fileImportato" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="fileImportato" />
				</bui:out>
				<span id="idSpanDownload" style="display:none">
					&nbsp;&nbsp;<shell:button img="commons.docnew" text="File importato" title="Scarica il file" href="javascript:scaricaFile(false);" />
					&nbsp;&nbsp;<shell:button img="commons.docnew" text="Log" title="Scarica il log dell'importazione" href="javascript:scaricaFile(true);" />
				</span>
			</td>
		</tr>
					
 	</table>
</shell:fieldset>