<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:c="http://java.sun.com/jstl/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:a="http://richfaces.org/a4j"
                xmlns:pd="dendrarium">

    <!-- Komponent wyswietlajacy obrazek SVG + guzik do pobrania go

         PARAMETRY:
         String url  -  URL obrazka
         Boolean download  -  czy wyswietlic przycisk Pobierz
         Integer width  -  szerokosc obrazka (opc)
         Integer height  -  szerokosc obrazka (opc)
         String id  -  opcjonalne, do identyfikacji na stronie
         ...

         Autor: pta
    -->

    <table onmouseover="javascript:makeVisible('svgimg#{id}')" onmouseout="javascript:makeInvisible('svgimg#{id}')">
        <tr>
            <td style="border: none">
                <center>
                    <c:if test="#{width ne null}">
                        <embed src="#{url}" type="image/svg+xml" width="#{width}" height="#{height}" />
                    </c:if>
                    <c:if test="#{width == null}">
                        <embed src="#{url}" type="image/svg+xml" />
                    </c:if>
                </center>
            </td>
            <c:if test="#{download}">
                <td style="border:none; width: 70px; vertical-align:bottom; text-align:right">
                    <a href="#{url}" style="visibility:hidden; display:none" id="svgimg#{id}"> <img src="img/download.png" /> </a>
                </td>
            </c:if>
        </tr>
    </table>
    
</ui:composition>