# HG changeset patch # User František Kučera # Date 1268527060 -3600 # Node ID df5aedafb826166b0a12b9b57ea32f8756cbd18e # Parent fa7e30dee3b3dd32bb544400133c8b46d9f9314a Fotky se zobrazují ty, které jsou v databázi (jen záznamy – soubory s fotkami jsou na disku). diff -r fa7e30dee3b3 -r df5aedafb826 java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/FunkceEL.java --- a/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/FunkceEL.java Sun Mar 14 01:05:35 2010 +0100 +++ b/java/nekurak.net-web/src/java/cz/frantovo/nekurak/web/FunkceEL.java Sun Mar 14 01:37:40 2010 +0100 @@ -1,5 +1,6 @@ package cz.frantovo.nekurak.web; +import cz.frantovo.nekurak.dto.Podnik; import cz.frantovo.nekurak.servlet.Fotky; /** @@ -15,4 +16,8 @@ String prostredek = nahled ? Fotky.PODADRESAR_NAHLED : Fotky.PODADRESAR_ORIGINAL; return SERVLET + "/" + prostredek + "/" + id + "." + Fotky.PRIPONA; } + + public static boolean maFotky(Podnik p) { + return !p.getFotky().isEmpty(); + } } diff -r fa7e30dee3b3 -r df5aedafb826 java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp --- a/java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp Sun Mar 14 01:05:35 2010 +0100 +++ b/java/nekurak.net-web/web/WEB-INF/casti/uvod.jsp Sun Mar 14 01:37:40 2010 +0100 @@ -4,7 +4,6 @@ xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" xmlns:nk="urn:jsptagdir:/WEB-INF/tags/nekurak" - xmlns:nkfn="/WEB-INF/nekurakFunkce" version="2.0"> @@ -35,16 +34,11 @@
- - -

${fotka.id} | ${fotka.popis}

-
-
- +
diff -r fa7e30dee3b3 -r df5aedafb826 java/nekurak.net-web/web/WEB-INF/nekurakFunkce.tld --- a/java/nekurak.net-web/web/WEB-INF/nekurakFunkce.tld Sun Mar 14 01:05:35 2010 +0100 +++ b/java/nekurak.net-web/web/WEB-INF/nekurakFunkce.tld Sun Mar 14 01:37:40 2010 +0100 @@ -10,5 +10,11 @@ cz.frantovo.nekurak.web.FunkceEL java.lang.String fotka(int, boolean) + + maFotky + Zda podnik má přiřazené nějaké fotky + cz.frantovo.nekurak.web.FunkceEL + boolean maFotky(cz.frantovo.nekurak.dto.Podnik) + diff -r fa7e30dee3b3 -r df5aedafb826 java/nekurak.net-web/web/WEB-INF/tags/nekurak/fotkyPodniku.tag --- a/java/nekurak.net-web/web/WEB-INF/tags/nekurak/fotkyPodniku.tag Sun Mar 14 01:05:35 2010 +0100 +++ b/java/nekurak.net-web/web/WEB-INF/tags/nekurak/fotkyPodniku.tag Sun Mar 14 01:37:40 2010 +0100 @@ -3,19 +3,25 @@ xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" xmlns:fn="http://java.sun.com/jsp/jstl/functions" + xmlns:nkfn="/WEB-INF/nekurakFunkce" version="2.0"> - + -
-

demo

-

demo

-

demo

+
+ +

+ + fotka + +

+

žádné další fotografie

- - + + + \ No newline at end of file diff -r fa7e30dee3b3 -r df5aedafb826 java/nekurak.net-web/web/styl.css --- a/java/nekurak.net-web/web/styl.css Sun Mar 14 01:05:35 2010 +0100 +++ b/java/nekurak.net-web/web/styl.css Sun Mar 14 01:37:40 2010 +0100 @@ -162,6 +162,10 @@ height: 280px; } +.podnik .fotky img { + border: none; +} + .podnik { clear: both; }