příprava pro komentovací formulář
authorFrantišek Kučera <franta-hg@frantovo.cz>
Tue, 08 Jun 2010 03:18:12 +0200
changeset 12824fbed5ba743
parent 127 2b6107e510d8
child 129 420d7024f6f4
příprava pro komentovací formulář
java/nekurak.net-lib/src/cz/frantovo/nekurak/preklady_cs.properties
java/nekurak.net-web/web/WEB-INF/tags/nekurak/komentareVypis.tag
java/nekurak.net-web/web/WEB-INF/tags/nekurak/stranka.tag
java/nekurak.net-web/web/js/komentare.js
     1.1 --- a/java/nekurak.net-lib/src/cz/frantovo/nekurak/preklady_cs.properties	Tue Jun 08 02:37:04 2010 +0200
     1.2 +++ b/java/nekurak.net-lib/src/cz/frantovo/nekurak/preklady_cs.properties	Tue Jun 08 03:18:12 2010 +0200
     1.3 @@ -83,7 +83,7 @@
     1.4  komentare.vypisNadpis=Koment\u00E1\u0159e k tomuto podniku
     1.5  komentare.prihlasitSe=Pro vkl\u00E1d\u00E1n\u00ED koment\u00E1\u0159\u016F se pros\u00EDm p\u0159ihla\u0161te.
     1.6  komentare.zadneKomentare=Zat\u00EDm nikdo nekomentoval.
     1.7 -komentare.=
     1.8 +komentare.komentovat=Komentovat!
     1.9  komentare.=
    1.10  komentare.=
    1.11  komentare.=
    1.12 \ No newline at end of file
     2.1 --- a/java/nekurak.net-web/web/WEB-INF/tags/nekurak/komentareVypis.tag	Tue Jun 08 02:37:04 2010 +0200
     2.2 +++ b/java/nekurak.net-web/web/WEB-INF/tags/nekurak/komentareVypis.tag	Tue Jun 08 03:18:12 2010 +0200
     2.3 @@ -10,21 +10,26 @@
     2.4  
     2.5      <div class="komentare">
     2.6  	<h3><fmt:message key="komentare.vypisNadpis"/></h3>
     2.7 +
     2.8 +	<!-- Zatím nikdo nekomentoval? -->
     2.9 +	<c:if test="${fn:length(podnik.komentare) == 0}">
    2.10 +	    <p><fmt:message key="komentare.zadneKomentare"/></p>
    2.11 +	</c:if>
    2.12 +
    2.13 +	<!-- Komentovat! -->
    2.14  	<c:choose>
    2.15  	    <c:when test="${prihlasenyUzivatel == null}">
    2.16  		<p><fmt:message key="komentare.prihlasitSe"/></p>
    2.17  	    </c:when>
    2.18  	    <c:otherwise>
    2.19 -		<p>Uživatel: <c:out value="${prihlasenyUzivatel}" /></p>
    2.20 +		<p><a href="javascript:komentare.zobrazFormular()"><fmt:message key="komentare.komentovat"/></a></p>
    2.21 +		<div id="formularKomentuj" style="display: none;">
    2.22 +		    <p>tady bude formulář</p>
    2.23 +		</div>
    2.24  	    </c:otherwise>
    2.25  	</c:choose>
    2.26  
    2.27 -	<c:if test="${fn:length(podnik.komentare) == 0}">
    2.28 -	    <p><fmt:message key="komentare.zadneKomentare"/></p>
    2.29 -	</c:if>
    2.30 -
    2.31 -
    2.32 -
    2.33 +	<!-- Výpis komentářů -->
    2.34  	<c:forEach var="k" items="${podnik.komentare}">
    2.35  	    <div class="komentar">
    2.36  		<h4>
     3.1 --- a/java/nekurak.net-web/web/WEB-INF/tags/nekurak/stranka.tag	Tue Jun 08 02:37:04 2010 +0200
     3.2 +++ b/java/nekurak.net-web/web/WEB-INF/tags/nekurak/stranka.tag	Tue Jun 08 03:18:12 2010 +0200
     3.3 @@ -29,6 +29,7 @@
     3.4  	    <script type="text/javascript" src="js/jquery.js"></script>
     3.5  	    <script type="text/javascript" src="js/jquery.bxSlider.js"></script>
     3.6  	    <script type="text/javascript" src="js/hlasovani.js"></script>
     3.7 +	    <script type="text/javascript" src="js/komentare.js"></script>
     3.8  	    <link rel="alternate" type="application/atom+xml" title="podniky" href="atom/" />
     3.9  	</head>
    3.10  	<body>
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/java/nekurak.net-web/web/js/komentare.js	Tue Jun 08 03:18:12 2010 +0200
     4.3 @@ -0,0 +1,5 @@
     4.4 +var komentare = {};
     4.5 +
     4.6 +komentare.zobrazFormular = function () {
     4.7 +    $("#formularKomentuj").toggle();
     4.8 +};