java/nekurak.net-web/web/WEB-INF/casti/pridatPodnik.jsp
changeset 73 34c7eb5f2fae
parent 57 7162ed62c9ab
child 145 0efefbf5f8b6
     1.1 --- a/java/nekurak.net-web/web/WEB-INF/casti/pridatPodnik.jsp	Sun Mar 07 21:19:35 2010 +0100
     1.2 +++ b/java/nekurak.net-web/web/WEB-INF/casti/pridatPodnik.jsp	Thu Mar 18 14:22:16 2010 +0100
     1.3 @@ -3,47 +3,50 @@
     1.4  	  xmlns:c="http://java.sun.com/jsp/jstl/core"
     1.5  	  xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"
     1.6  	  xmlns:fn="http://java.sun.com/jsp/jstl/functions"
     1.7 +	  xmlns:nk="urn:jsptagdir:/WEB-INF/tags/nekurak"
     1.8  	  version="2.0">
     1.9  
    1.10      <jsp:useBean id="podnik" class="cz.frantovo.nekurak.dto.Podnik" scope="request"/>
    1.11      <jsp:useBean id="pridatPodnik" class="cz.frantovo.nekurak.web.PridatPodnik" scope="request"/>
    1.12  
    1.13 -    <h1><fmt:message key="pridatPodnik.nadpis"/></h1>
    1.14 +    <fmt:message key="pridatPodnik.nadpis" var="titulekStranky"/>
    1.15 +    <nk:stranka titulek="${titulekStranky}">
    1.16  
    1.17 -    <c:choose>
    1.18 -	<c:when test="${param.akcePridat == 'pridej'}">
    1.19 -	    <c:catch var="pridatPodnikChyba">
    1.20 -		<jsp:setProperty name="podnik" property="*"/>
    1.21 -		<jsp:setProperty name="pridatPodnik" property="podnik" value="${podnik}"/>
    1.22 -		<c:set var="pridatPodnikOK" value="${pridatPodnik.pridano}"/>
    1.23 -	    </c:catch>
    1.24 -	    <c:choose>
    1.25 -		<c:when test="${pridatPodnikChyba == null}">
    1.26 -		    <p><fmt:message key="pridatPodnik.bylPridan"/></p>
    1.27 -		</c:when>
    1.28 -		<c:otherwise>
    1.29 -		    <p class="chybovaHlaska"><fmt:message key="pridatPodnik.nebylPridan"/></p>
    1.30 -		</c:otherwise>
    1.31 -	    </c:choose>
    1.32 -	</c:when>
    1.33 -	<c:otherwise>
    1.34 -	    <form method="post" action="?akce=pridatPodnik&amp;amp;akcePridat=pridej">
    1.35 -		<fieldset>
    1.36 -		    <label><fmt:message key="dto.podnik.nazev"/>: <input type="text" name="nazev" maxlength="255"/></label><br/>
    1.37 -		    <label><fmt:message key="dto.podnik.popis"/>: <input type="text" name="popis" maxlength="255"/></label><br/>
    1.38 -			<fmt:message key="dto.podnik.url.tip" var="urlTip"/>
    1.39 -		    <label title="${urlTip}"><fmt:message key="dto.podnik.url"/>: <input type="text" name="url" maxlength="255"/></label><br/>
    1.40 -		    <label><fmt:message key="dto.podnik.ulice"/>: <input type="text" name="ulice" maxlength="64"/></label><br/>
    1.41 -			<fmt:message key="dto.podnik.cisloPopisne.tip" var="cisloPopisneTip"/>
    1.42 -		    <label title="${cisloPopisneTip}"><fmt:message key="dto.podnik.cisloPopisne"/>: <input type="text" name="cisloPopisne" maxlength="5"/></label><br/>
    1.43 -		    <label><fmt:message key="dto.podnik.mesto"/>: <input type="text" name="mesto" maxlength="64"/></label><br/>
    1.44 -		    <button value="submit"><fmt:message key="pridatPodnik.tlacitko"/></button>
    1.45 -		</fieldset>
    1.46 -	    </form>
    1.47 -	</c:otherwise>
    1.48 -    </c:choose>
    1.49 +	<h1><c:out value="${titulekStranky}"/></h1>
    1.50  
    1.51 +	<c:choose>
    1.52 +	    <c:when test="${param.akcePridat == 'pridej'}">
    1.53 +		<c:catch var="pridatPodnikChyba">
    1.54 +		    <jsp:setProperty name="podnik" property="*"/>
    1.55 +		    <jsp:setProperty name="pridatPodnik" property="podnik" value="${podnik}"/>
    1.56 +		    <c:set var="pridatPodnikOK" value="${pridatPodnik.pridano}"/>
    1.57 +		</c:catch>
    1.58 +		<c:choose>
    1.59 +		    <c:when test="${pridatPodnikChyba == null}">
    1.60 +			<p><fmt:message key="pridatPodnik.bylPridan"/></p>
    1.61 +		    </c:when>
    1.62 +		    <c:otherwise>
    1.63 +			<p class="chybovaHlaska"><fmt:message key="pridatPodnik.nebylPridan"/></p>
    1.64 +		    </c:otherwise>
    1.65 +		</c:choose>
    1.66 +	    </c:when>
    1.67 +	    <c:otherwise>
    1.68 +		<form method="post" action="?akce=pridatPodnik&amp;amp;akcePridat=pridej">
    1.69 +		    <fieldset>
    1.70 +			<label><fmt:message key="dto.podnik.nazev"/>: <input type="text" name="nazev" maxlength="255"/></label><br/>
    1.71 +			<label><fmt:message key="dto.podnik.popis"/>: <input type="text" name="popis" maxlength="255"/></label><br/>
    1.72 +			    <fmt:message key="dto.podnik.url.tip" var="urlTip"/>
    1.73 +			<label title="${urlTip}"><fmt:message key="dto.podnik.url"/>: <input type="text" name="url" maxlength="255"/></label><br/>
    1.74 +			<label><fmt:message key="dto.podnik.ulice"/>: <input type="text" name="ulice" maxlength="64"/></label><br/>
    1.75 +			    <fmt:message key="dto.podnik.cisloPopisne.tip" var="cisloPopisneTip"/>
    1.76 +			<label title="${cisloPopisneTip}"><fmt:message key="dto.podnik.cisloPopisne"/>: <input type="text" name="cisloPopisne" maxlength="5"/></label><br/>
    1.77 +			<label><fmt:message key="dto.podnik.mesto"/>: <input type="text" name="mesto" maxlength="64"/></label><br/>
    1.78 +			<button value="submit"><fmt:message key="pridatPodnik.tlacitko"/></button>
    1.79 +		    </fieldset>
    1.80 +		</form>
    1.81 +	    </c:otherwise>
    1.82 +	</c:choose>
    1.83  
    1.84 -
    1.85 +    </nk:stranka>
    1.86  
    1.87  </jsp:root>