author | František Kučera <franta-hg@frantovo.cz> |
Wed Jun 09 15:54:11 2010 +0200 (2010-06-09) | |
changeset 138 | 0ad2c44c29b8 |
parent 134 | 4bd1e353c527 |
child 142 | 44ef544460ca |
permissions | -rw-r--r-- |
franta-hg@126 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
franta-hg@126 | 2 |
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" |
franta-hg@126 | 3 |
xmlns:c="http://java.sun.com/jsp/jstl/core" |
franta-hg@126 | 4 |
xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" |
franta-hg@126 | 5 |
xmlns:fn="http://java.sun.com/jsp/jstl/functions" |
franta-hg@126 | 6 |
xmlns:nkfn="/WEB-INF/nekurakFunkce" |
franta-hg@126 | 7 |
version="2.0"> |
franta-hg@126 | 8 |
|
franta-hg@126 | 9 |
<jsp:directive.attribute name="podnik" type="cz.frantovo.nekurak.dto.Podnik" required="true"/> |
franta-hg@126 | 10 |
|
franta-hg@126 | 11 |
<div class="komentare"> |
franta-hg@126 | 12 |
<h3><fmt:message key="komentare.vypisNadpis"/></h3> |
franta-hg@128 | 13 |
|
franta-hg@128 | 14 |
<!-- Zatím nikdo nekomentoval? --> |
franta-hg@128 | 15 |
<c:if test="${fn:length(podnik.komentare) == 0}"> |
franta-hg@128 | 16 |
<p><fmt:message key="komentare.zadneKomentare"/></p> |
franta-hg@128 | 17 |
</c:if> |
franta-hg@128 | 18 |
|
franta-hg@128 | 19 |
<!-- Komentovat! --> |
franta-hg@126 | 20 |
<c:choose> |
franta-hg@126 | 21 |
<c:when test="${prihlasenyUzivatel == null}"> |
franta-hg@127 | 22 |
<p><fmt:message key="komentare.prihlasitSe"/></p> |
franta-hg@126 | 23 |
</c:when> |
franta-hg@126 | 24 |
<c:otherwise> |
franta-hg@128 | 25 |
<p><a href="javascript:komentare.zobrazFormular()"><fmt:message key="komentare.komentovat"/></a></p> |
franta-hg@128 | 26 |
<div id="formularKomentuj" style="display: none;"> |
franta-hg@129 | 27 |
<form method="post" action="?akce=odeslatKomentar"> |
franta-hg@134 | 28 |
<fieldset> |
franta-hg@134 | 29 |
<input type="hidden" name="podnik" maxlength="255" value="${podnik.id}"/> |
franta-hg@134 | 30 |
<label><fmt:message key="komentare.nadpis"/>: <input type="text" name="nadpis" maxlength="255"/></label> |
franta-hg@134 | 31 |
<br/> |
franta-hg@134 | 32 |
<textarea name="komentar" cols="30" rows="10"></textarea> |
franta-hg@134 | 33 |
<br/> |
franta-hg@134 | 34 |
<select name="typ"> |
franta-hg@134 | 35 |
<option value="PROSTY_TEXT" selected="selected"><fmt:message key="komentar.typ.prostyText"/></option> |
franta-hg@134 | 36 |
<option value="XHTML"><fmt:message key="komentar.typ.xhtml"/></option> |
franta-hg@134 | 37 |
<option value="TEXY"><fmt:message key="komentar.typ.texy"/></option> |
franta-hg@134 | 38 |
</select> |
franta-hg@134 | 39 |
<br/> |
franta-hg@134 | 40 |
<button value="submit"><fmt:message key="komentare.tlacitkoOdeslat"/></button> |
franta-hg@134 | 41 |
</fieldset> |
franta-hg@134 | 42 |
</form> |
franta-hg@134 | 43 |
<p><fmt:message key="komentar.typ.xhtml.povoleneZnacky"/></p> |
franta-hg@128 | 44 |
</div> |
franta-hg@126 | 45 |
</c:otherwise> |
franta-hg@126 | 46 |
</c:choose> |
franta-hg@126 | 47 |
|
franta-hg@128 | 48 |
<!-- Výpis komentářů --> |
franta-hg@127 | 49 |
<c:forEach var="k" items="${podnik.komentare}"> |
franta-hg@127 | 50 |
<div class="komentar"> |
franta-hg@127 | 51 |
<h4> |
franta-hg@129 | 52 |
<fmt:message key="komentare.napsal"/>: <c:out value="${k.uzivatel}" />, |
franta-hg@127 | 53 |
<fmt:formatDate value="${k.datum}" pattern="dd. MMMM yyyy HH:mm"/> |
franta-hg@134 | 54 |
<c:if test="${k.nadpis != null && k.nadpis != ''}"> |
franta-hg@134 | 55 |
<br/> |
franta-hg@134 | 56 |
<fmt:message key="komentare.nadpis"/>: <c:out value="${k.nadpis}" /> |
franta-hg@134 | 57 |
</c:if> |
franta-hg@127 | 58 |
</h4> |
franta-hg@127 | 59 |
<!-- Pozor: předpokládáme, že v DB jsou pouze zkontrolovaná data --> |
franta-hg@127 | 60 |
<c:out value="${k.komentar}" escapeXml="false" /> |
franta-hg@127 | 61 |
</div> |
franta-hg@127 | 62 |
</c:forEach> |
franta-hg@126 | 63 |
</div> |
franta-hg@126 | 64 |
|
franta-hg@126 | 65 |
</jsp:root> |