quadroRiassuntivoValutazioneTile.jsp 2.69 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
<%@ include file="/project/include.jsp" %>

<%@ page import = "java.util.Date" %>
<%@ page import = "it.cedaf.commons.DateLib" %>
<%@ page import = "it.cedaf.commons.StringLib" %>
<%@ page import = "it.cedaf.icare.quadririassuntivi.view.dto.QuadroRiassuntivoJspSupport" %>
<%@ page import = "it.cedaf.icare.business.managers.quadririassuntivi.Info" %>
<%@ page import = "it.cedaf.icare.quadririassuntivi.view.dto.ValutazioneItem" %>
<%@ page import = "it.cedaf.icare.business.managers.quadririassuntivi.ValutazioneInfo" %>


<% 
ValutazioneItem item = (ValutazioneItem) request.getAttribute("currentItem");	
ValutazioneInfo valutazioneInfo = item.getValutazioneInfo(); 

Info info = QuadroRiassuntivoJspSupport.getInfo(item);
String responsabile = getStringValue(info.getOperatoreResponsabile());
String emailAddress = info.getMailOperatoreResponsabile();
if (!StringLib.isNullOrEmptyString(emailAddress)) {
	responsabile = "<a href='mailto:" + emailAddress + "'>" + responsabile + "</a>";
}

Date itemFrom = item.getFrom();
Date itemTo = item.getTo();
String itemFrom_str = DateLib.format(itemFrom);
String itemTo_str = "&nbsp;";
if (itemTo != null && item.getRange() && item.getCompleted()) {
	itemTo_str = DateLib.format(itemTo);
}

boolean showEsito = !StringLib.isNullOrEmptyString(valutazioneInfo.getEsito()) 
	|| !StringLib.isNullOrEmptyString(valutazioneInfo.getPunteggioBINA());
%>


<td width="50%">
	<table>
		<tr>
			<td class="gantt-detail-label"><shell:label prop="data" /></td>
			<td class="gantt-detail-value"><%=itemFrom_str%></td>	
		</tr>
		<tr>
			<td class="gantt-detail-label"><shell:label prop="operatoreResponsabile" /></td>
			<td class="gantt-detail-value"><%=responsabile%></td>	
		</tr><%
		if (showEsito) {
			%><tr>
				<td class="gantt-detail-label"><shell:label prop="esito" /></td>
				<td class="gantt-detail-value"><%=getStringValue(valutazioneInfo.getEsito())%></td>	
			</tr><%
		}
	%></table>
</td>
<td width="50%">
	<table>
		<tr>
			<td class="gantt-detail-label"><shell:label prop="tipoValutazione" /></td>
			<td class="gantt-detail-value"><%=getStringValue(valutazioneInfo.getTipo())%></td>	
		</tr>
		<tr>
			<td class="gantt-detail-label">&nbsp;</td>
			<td class="gantt-detail-value">&nbsp;</td>	
		</tr><%
		if (showEsito) {
			%><tr>
				<td class="gantt-detail-label"><shell:label prop="punteggioBINA" /></td>
				<td class="gantt-detail-value"><%=getStringValue(valutazioneInfo.getPunteggioBINA())%></td>	
			</tr><%
		}
	%></table>
</td>


<%! 

	// 
	public String getStringValue(String value) {
		return value != null ? value : StringLib.EMPTY_STRING;
	}
	
	// 
	public String getStringValue(Boolean value) {
		if (Boolean.TRUE.equals(value)) {
			return "S";
		} else {
			return "No";
		}
	}
%>