Licensing info change.
[librarian.git] / src / librarian / epub / xsltLast.xsl
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet version="1.0"
3     xmlns="http://www.w3.org/1999/xhtml"
4     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5     xmlns:dc="http://purl.org/dc/elements/1.1/"
6     xmlns:wl="http://wolnelektury.pl/functions"
7     xmlns:date="http://exslt.org/dates-and-times">
8   <xsl:output method="html" version="1.0" encoding="utf-8" />
9   <xsl:param name="outputtype"/>
10
11   <xsl:template match="utwor">
12     <html>
13       <head>
14         <link rel="stylesheet" href="style.css" type="text/css" />
15         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
16         <title>
17           <xsl:text>Strona redakcyjna</xsl:text>
18         </title>
19       </head>
20       <body>
21         <div id="book-text" >
22           <p class="info">
23             Wszystkie zasoby Wolnych Lektur możesz swobodnie wykorzystywać,
24             publikować i rozpowszechniać pod warunkiem zachowania warunków
25             licencji i zgodnie z <a href="https://wolnelektury.pl/info/zasady-wykorzystania/">Zasadami wykorzystania Wolnych Lektur</a>.<br/>
26             <xsl:choose>
27                   <xsl:when test="//dc:rights.license">
28                       Ten utwór jest udostępniony na licencji
29                       <a>
30                           <xsl:attribute name="href">
31                               <xsl:value-of select="//dc:rights.license" />
32                           </xsl:attribute>
33                           <xsl:value-of select="//dc:rights" />
34                       </a>
35                   </xsl:when>
36                   <xsl:otherwise>
37                     Ten utwór jest w domenie publicznej.
38                   </xsl:otherwise>
39             </xsl:choose>
40             <br/>
41             Wszystkie materiały dodatkowe (przypisy, motywy literackie) są
42             udostępnione na <a href="https://artlibre.org/licence/lal/pl/">Licencji Wolnej Sztuki 1.3</a>.<br/>
43             Fundacja Nowoczesna Polska zastrzega sobie prawa do wydania
44             krytycznego zgodnie z art. Art.99(2) Ustawy o prawach autorskich
45             i prawach pokrewnych. Wykorzystując zasoby z Wolnych Lektur,
46             należy pamiętać o zapisach licencji oraz zasadach, które
47             spisaliśmy w <a href="https://wolnelektury.pl/info/zasady-wykorzystania/">Zasadach wykorzystania Wolnych Lektur</a>.
48             Zapoznaj się z nimi, zanim udostępnisz dalej nasze książki.
49           </p>
50
51           <p class="info">Źródło: <a>
52               <xsl:attribute name="href">
53                   <xsl:value-of select="//dc:identifier.url" />
54               </xsl:attribute>
55               <xsl:attribute name="title">
56                   <xsl:for-each select="//dc:creator/text()"><xsl:value-of select="wl:person_name(.)"/>, </xsl:for-each><xsl:value-of select="//dc:title" />
57               </xsl:attribute>
58               <xsl:value-of select="//dc:identifier.url" />
59           </a></p>
60
61           <xsl:if test="//dc:source" >
62             <p class="info">Tekst opracowany na podstawie: <xsl:value-of select="//dc:source" /></p>
63           </xsl:if>
64
65           <xsl:if test="//dc:publisher">
66             <p class="info">
67               Wydawca:
68               <xsl:for-each select="//dc:publisher/text()">
69                 <xsl:value-of select="."/>
70                 <xsl:if test="not(position() = last())">, </xsl:if>
71               </xsl:for-each>
72             </p>
73           </xsl:if>
74
75           <xsl:if test="//dc:description" >
76             <p class="info"><xsl:value-of select="//dc:description" /></p>
77           </xsl:if>
78
79           <xsl:call-template name="editors" />
80
81           <xsl:call-template name="funders" />
82
83           <xsl:if test="@data-cover-by">
84             <p class="info">Okładka na podstawie: 
85             <xsl:choose>
86             <xsl:when test="@data-cover-source">
87                 <a>
88                 <xsl:attribute name="href">
89                   <xsl:value-of select="@data-cover-source" />
90                 </xsl:attribute>
91                 <xsl:value-of select="@data-cover-by" />
92                 </a>
93             </xsl:when>
94             <xsl:otherwise>
95                 <xsl:value-of select="@data-cover-by" />
96             </xsl:otherwise>
97             </xsl:choose>
98             </p>
99           </xsl:if>
100
101           <xsl:variable name="isbnId" select="concat($outputtype, '-id')"/>
102           <xsl:if test=".//meta[@id=$isbnId]">
103             <xsl:variable name="isbn" select=".//meta[@id=$isbnId]"/>
104             <p class="info">ISBN <xsl:value-of select="substring-after($isbn, 'ISBN-')"/></p>
105           </xsl:if>
106
107           <p class="info">&#160;</p>
108           <p class="minor-info">
109               Plik wygenerowany dnia <span id="file_date"><xsl:value-of select="substring(date:date(), 1, 10)" /></span>.
110           </p>
111
112         </div>
113       </body>
114     </html>
115   </xsl:template>
116
117   <xsl:template match="text()" >
118     <xsl:value-of select="." />
119   </xsl:template>
120
121   <xsl:template name="editors">
122     <xsl:if test="@editors">
123         <p class="info">
124             <xsl:text>Opracowanie redakcyjne i przypisy: </xsl:text>
125             <xsl:value-of select="@editors" />.</p>
126     </xsl:if>
127   </xsl:template>
128
129   <xsl:template name="funders">
130     <xsl:if test="@funders">
131         <p class="minor-info">Publikację wsparli i wsparły:
132             <xsl:value-of select="@funders" />.</p>
133     </xsl:if>
134   </xsl:template>
135
136   <xsl:template match="text()" mode="person">
137     <xsl:value-of select="wl:person_name(.)" />
138   </xsl:template>
139 </xsl:stylesheet>