Biblioteca Java - Rev 9
Subversion Repositories:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ page contentType="text/html; charset=iso-8859-1" language="java" session="false" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="springForm"%>
<html>
<head>
<title>Inventar Linkscreens</title>
<style type="text/css">
.tg {border-collapse:collapse;border-spacing:0;border-color:#ccc;}
.tg td{font-family:Arial, sans-serif;font-size:14px;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#fff;}
.tg th{font-family:Arial, sans-serif;font-size:14px;font-weight:normal;padding:10px 5px;border-style:solid;border-width:1px;overflow:hidden;word-break:normal;border-color:#ccc;color:#333;background-color:#f0f0f0;}
.tg .tg-4eph{background-color:#f9f9f9}
.error {
color: #ff0000;
font-style: italic;
font-weight: bold;
}
</style>
</head>
<body>
<c:if test="${!empty item.id}">
<h1>
Editeaza o inregistrare
</h1>
</c:if>
<c:if test="${empty item.id}">
<h1>
Adauga o inregistrare
</h1>
</c:if>
<c:url var="addAction" value="/item/add" ></c:url>
<springForm:form name="frm" action="${addAction}" commandName="item" onsubmit="return validateForm(); return false;">
<table table-layout: fixed>
<c:if test="${!empty item.id}">
<tr>
<td>
<springForm:label path="id">
<spring:message text="ID"/>
</springForm:label>
</td>
<td>
<springForm:input path="id" readonly="true" size="8" disabled="true" />
<springForm:hidden path="id" />
</td>
</tr>
</c:if>
<tr>
<td>
<springForm:label path="nrCrt">
<spring:message text="Nr crt"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="nrCrt"/>
</td>
<td><springForm:errors path="nrCrt" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="simbolClasaMijlocFix">
<spring:message text="Simbol clasa mijloc fix"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="simbolClasaMijlocFix" />
</td>
<td><springForm:errors path="simbolClasaMijlocFix" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="mijlocFix">
<spring:message text="Mijloc fix"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="mijlocFix" />
</td>
<td><springForm:errors path="mijlocFix" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="nrInventar">
<spring:message text="Numar inventar"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="nrInventar" />
</td>
<td><springForm:errors path="nrInventar" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="cont">
<spring:message text="Cont"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="cont" />
</td>
<td><springForm:errors path="cont" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="cantitate">
<spring:message text="Cantitate"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="cantitate" />
</td>
<td><springForm:errors path="cantitate" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="UM">
<spring:message text="Unitate de masura"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="UM" />
</td>
<td><springForm:errors path="UM" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="pret">
<spring:message text="Pret"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="pret" />
</td>
<td><springForm:errors path="pret" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="valoare">
<spring:message text="Valoare"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="valoare" />
</td>
<td><springForm:errors path="valoare" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="amortizarePrecedenta">
<spring:message text="Amortizare precedenta"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="amortizarePrecedenta" />
</td>
<td><springForm:errors path="amortizarePrecedenta" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="amortizareCurenta">
<spring:message text="Amortizare curenta"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="amortizareCurenta" />
</td>
<td><springForm:errors path="amortizareCurenta" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="amortizareTotala">
<spring:message text="Amortizare totala"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="amortizareTotala" />
</td>
<td><springForm:errors path="amortizareTotala" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="valoareRamasa">
<spring:message text="Valoare ramasa"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="valoareRamasa" />
</td>
<td><springForm:errors path="valoareRamasa" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="durataNormala">
<spring:message text="Durata normala"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="durataNormala" />
</td>
<td><springForm:errors path="durataNormala" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="durataRamasa">
<spring:message text="Durata ramasa"/>
</springForm:label>
</td>
<td colspan="2">
<springForm:input path="durataRamasa" />
</td>
<td><springForm:errors path="durataRamasa" cssClass="error" /></td>
</tr>
<tr>
<td>
<springForm:label path="anLunaPrimaRata">
<spring:message text="An luna prima rata"/>
</springForm:label>
</td>
<td>
<springForm:select id="lunaPrimaRata" name="lunaPrimaRata" path="lunaPrimaRata" items="${months}">
</springForm:select>
<springForm:select id="anPrimaRata" name="anPrimaRata" path="anPrimaRata" items="${years}">
</springForm:select>
</td>
</tr>
<tr>
<td>
<springForm:label path="anLunaAdaugare">
<spring:message text="An luna adaugare"/>
</springForm:label>
</td>
<td>
<springForm:select id="lunaAdaugare" name="lunaAdaugare" path="lunaAdaugare" items="${months}">
</springForm:select>
<springForm:select id="anAdaugare" name="anAdaugare" path="anAdaugare" items="${years}">
</springForm:select>
</td>
</tr>
<tr>
<td colspan="2">
<c:if test="${!empty item.id}">
<input type="submit"
value="<spring:message text="Salveaza modificarile"/>" />
</c:if>
<c:if test="${empty item.id}">
<input type="submit" onclick="return validateForm();"
value="<spring:message text="Adauga inregistrarea"/>" />
</c:if>
</td>
</tr>
</table>
</springForm:form>
<c:url var="doFilter" value="/items/filter" ></c:url>
<form:form name="filter" action="${doFilter}" commandName="filter">
<br><br><br>
Selectati perioada de vizualzare a inregistrarilor:
<br>
START ->
<form:select id="startMonth" name="startMonth" path="startMonth" items="${months}">
</form:select>
<form:select id="startYear" name="startYear" path="startYear" items="${years}">
</form:select>
<br>
FINAL ->
<form:select id="endMonth" name="endMonth" path="endMonth" items="${months}">
</form:select>
<form:select id="endYear" name="endYear" path="endYear" items="${years}">
</form:select>
<br>
<input type="submit"
value="<spring:message text="Filtreaza inregistrarile"/>" name="filterOnly" />
<input type="submit"
value="<spring:message text="Descarca PDF"/>" name="download" />
<input type="submit"
value="<spring:message text="Descarca PDF normalizat"/>" name="downloadNormalized" />
</form:form>
<h3>Lista inventar</h3>
<c:if test="${!empty listItems}">
<table class="tg" table-layout: fixed>
<tr>
<th width="120">Nr Crt</th>
<th width="120">Simbol Clasa Mijloc Fix</th>
<th width="120">Mijloc Fix</th>
<th width="30">Numar inventar</th>
<th width="10">Cont</th>
<th width="10">Cantitate</th>
<th width="10">UM</th>
<th width="20">Pret</th>
<th width="20">Valoare</th>
<th width="20">Amortizare precedenta</th>
<th width="20">Amortizare curenta</th>
<th width="20">Amortizare totala</th>
<th width="20">Valoare ramasa</th>
<th width="5">Durata normala (ani)</th>
<th width="5">Durata ramasa (luni)</th>
<th width="120">An luna prima rata</th>
<th width="120">An luna adaugare</th>
<th width="60">Editeaza</th>
<th width="60">Sterge</th>
</tr>
<c:forEach items="${listItems}" var="item">
<c:if test="${not empty item.id}">
<tr>
<td align="right">${item.nrCrt}</td>
<td align="right">${item.simbolClasaMijlocFix}</td>
<td align="right">${item.mijlocFix}</td>
<td align="right">${item.nrInventar}</td>
<td align="right">${item.cont}</td>
<td align="right">${item.cantitate}</td>
<td align="right">${item.UM}</td>
<td align="right">${item.pret}</td>
<td align="right">${item.valoare}</td>
<td align="right">${item.amortizarePrecedenta}</td>
<td align="right">${item.amortizareCurenta}</td>
<td align="right">${item.amortizareTotala}</td>
<td align="right">${item.valoareRamasa}</td>
<td align="right">${item.durataNormala}</td>
<td align="right">${item.durataRamasa}</td>
<td align="right">${item.anLunaPrimaRata}</td>
<td align="right">${item.anLunaAdaugare}</td>
<td align="center">
<c:if test="${not empty item.id}">
<a href="<c:url value='/edit/${item.id}' />" >Editeaza</a>
</c:if>
</td>
<td align="center">
<c:if test="${not empty item.id}">
<a href="<c:url value='/remove/${item.id}' />" >Sterge</a>
</c:if>
</td>
</tr>
</c:if>
<c:if test="${empty item.id}">
<tr>
<td align="left" colspan="8"><b>${item.simbolClasaMijlocFix}<b></td>
<td align="right"><b>${item.valoare}</b></td>
<td align="right"><b>${item.amortizarePrecedenta}<b></td>
<td align="right"><b>${item.amortizareCurenta}</b></td>
<td align="right"><b>${item.amortizareTotala}</b></td>
<td align="left"><b>${item.valoareRamasa}</b></td>
<td colspan="7"></td>
</tr>
</c:if>
</c:forEach>
</table>
</c:if>
</body>
</html>