1#set($tmp = {})
2#set ($localService = $tmp.class.forName("pl.com.mds.mf.documentlibrary.util.DLFileEntryLocalServiceUtil"))
3#set($decoderClass = $tmp.class.forName("java.net.URLDecoder"))
4#set($decoder = $decoderClass.newInstance())
5#set($encoder = $tmp.class.forName("java.net.URLEncoder"))
6
7<div class="bip-article">
8 <h2>$reserved-article-title.data</h2>
9
10<div class="bip-article-meta" style="float: left" >
11#* #set ($modifiedDate = $reserved-article-modified-date.data)
12 #set ($dateLength = $modifiedDate.length() - 15)
13 #set ($modifiedDate = $modifiedDate.substring(0,$dateLength))
14
15 #if ($date && not $date.data.isEmpty())
16 <span class="bip-article-date">$date.data</span>
17 #else
18 <span class="bip-article-date">$modifiedDate</span>
19 #end
20*#
21<span class="putNoTagWrapperPlace"></span>
22 #if ($article-source && not $article-source.data.isEmpty())
23 <span class="bip-article-source">$languageUtil.get($locale , "article-source") $article-source.data</span>
24 #end
25 #if ($author && not $author.data.isEmpty())
26 <!-- <span class="bip-article-source">Autor: $author.data</span>-->
27 #end
28 </div>
29 <div style="float: right; min-width:90px;" class="zoomAndPrint"></div>
30<div style="clear:both"></div>
31
32
33 <div class="bip-article-content">
34 #if ($image && $image.getSiblings().size() > 0 && $validator.isNotNull($image.getSiblings().get(0).data) )
35 <div class="bip-article-images">
36 #foreach($img in $image.getSiblings())
37 <div class="bip-article-image">
38 <a
39 href="$img.data"
40 #if($img.title.data)
41 title="$img.title.data"
42 #end
43 rel="prettyPhoto[pp_gal]"><img src="$img.data&width=150"
44 #if ($img.description.data)
45 alt="$img.description.data"
46 #end
47 ></a>
48 </div>
49 #end
50 </div>
51 #end
52 $content.data
53 </div><!-- bip-article-content -->
54 <div class="bip-article-add">
55<table>
56<tr>
57<td class="bip-article-add-left"></td><td class="bip-article-add-center">
58<table>
59<tr>
60
61
62<!-- col1 -->
63#if( $file && $file.getSiblings().size()>0 && $file.data!="" && $link.filetitle.data!="")
64 <td style="min-width: 200px;" valign="top" >
65
66 <div class="bip-article-files">
67 <h3>$languageUtil.get($locale , "publication-files")</h3>
68 ##parse ("$journalTemplatesPath/FILES")
69
70 <ul style="clear: both;">
71 #foreach ($item in $file.getSiblings())
72 #set ($indexOfDot = $item.getData().lastIndexOf(".") + 1)
73
74 #set($tab=$item.getData().split("/"))
75 #if($tab.size()>3)
76 #set($size=$tab.size())
77 #set($s1=$size+(-1))
78 #set($s2=$size+(-2))
79 #set($s3=$size+(-3))
80
81 #set($l1=$s1.parseInt("$tab.get($s3)"))
82 #set($l2=$s1.parseInt("$tab.get($s2)"))
83
84 #set($decodedString = $decoder.decode($tab.get($s1), "UTF-8"))
85 #set($fileEntry = $localService.getFileEntryByTitle($l1,$l2,$decodedString))
86 #if( $fileEntry )
87
88 #set($fileSize = $fileEntry.getSize())
89 #set($fileSizeKB = $fileSize / 1024)
90 #set($fileSizeMB = $fileSizeKB / 1024)
91
92 #set ($ext = $fileEntry.getExtension() + ".png")
93 <li>
94 <table>
95 <tr><td style="width:30px; vertical-align:top;"><a target="_blank" href="$item.getData()"><img src="/html/themes/_unstyled/images/file_system/small/$ext" alt=""/></a></td>
96 <td><a target="_blank" href="$item.getData()">${item.filetitle.data}.${fileEntry.getExtension()} (#if($fileSizeMB>1)$fileSizeMB MB #else $fileSizeKB KB #end)</a><br/><span>$item.description.data</span></td></tr>
97 </table>
98 </li>
99 #end
100 #end
101 #end
102 </ul>
103 </div>
104 </td>
105#end
106<!-- col1 -->
107#if( $link && $link.getSiblings().size()>0 && $link.linkurl.data!="" && $link.data!="")
108 <td style="min-width: 200px;" valign="top" >
109 <div class="bip-article-links">
110 <h3>$languageUtil.get($locale , "attached-links")</h3>
111 ##parse ("$journalTemplatesPath/LINKS")
112
113 <ul style="clear: both;">
114 #foreach ($li in $link.getSiblings())
115 <li>
116 #if(!$request.isEmpty() && !$li.linkurl.data.contains("http://"))
117 <a target="_blank" href="$li.linkurl.data?redirect=$encoder.encode($request.attributes.CURRENT_URL)">$li.data</a><br/>
118 #else
119 <a target="_blank" href="$li.linkurl.data">$li.data</a><br/>
120 #end
121 <span>$li.description.data</span>
122 </li>
123 #end
124 </ul>
125 </div>
126 </td>
127#end
128</tr>
129
130</table>
131
132
133
134
135 <!-- tutaj-->
136
137
138
139
140</td><td class="bip-article-add-right"></td>
141</tr>
142</table>
143 </div>
144
145
146 <div class="bip-article-add" style="margin-top:10px">
147#set ($publishDate = $reserved-article-publish-date.data)
148#set ($modificationDate = $reserved-article-modification-date.data)
149#set ($elaborationDate = $date.data)
150#set ($dateLength = $elaborationDate.length() - 6)
151#set ($elaborationDate = $elaborationDate.substring(0,$dateLength))
152##zamiana na format dd.mm.yyyy
153#set ($crazyDate = '')
154#set ($dot = '')
155#foreach($number in $elaborationDate.split("-"))
156#set ($crazyDate = "$number$dot$crazyDate")
157#set ($dot = '.')
158#end
159
160
161#set ($publishAuthor = $reserved-article-publish-autor.data)
162#set ($modificationAuthor = $reserved-article-modification-autor.data)
163#set ($elaborationAuthor = $reserved-article-elaboration-autor.data)
164<table>
165<tr>
166<td class="bip-article-add-left"></td><td class="bip-article-add-center">
167 <div class="bip-article-files2">
168 <img src="/mf-portal-bip-theme/images/mf/biplogo.png" alt="bip" style="float:right; padding-top: 10px;" />
169 <h3>$languageUtil.get($locale , "publication-informations")</h3>
170 </div>
171 <div style="clear:both">
172 </div>
173 <div class="bip-article-metrics" style="padding:0 10px 10px 10px;">
174 <table style="width:100%">
175 <tbody>
176 <tr>
177 <td style="padding: 0 5px 5px;">
178 $languageUtil.get($locale , "approve-date") <span style="font-weight:bold">$crazyDate</span></td>
179 <td style="padding: 0 5px 5px;">
180 $languageUtil.get($locale , "publish-date-desc") <span style="font-weight:bold">$publishDate</span>
181
182 </td>
183 <td style="padding: 0 5px 5px;">
184 $languageUtil.get($locale , "modification-date") <span style="font-weight:bold">$modificationDate</span></td>
185 </tr>
186 <tr>
187 <td style="padding: 0 5px 5px;">
188 #if ($author && not $author.data.isEmpty())
189 $languageUtil.get($locale , "author"): <span style="font-weight:bold">$author.data</span>
190 #else
191 $languageUtil.get($locale , "author"): <span style="font-weight:bold">$elaborationAuthor</span>
192 #end
193 </td>
194 <td style="padding: 0 5px 5px;">
195 $languageUtil.get($locale , "publish-person") <span style="font-weight:bold">$publishAuthor</span></td>
196 <td style="padding: 0 5px 5px;">
197 $languageUtil.get($locale , "modification-person") <span style="font-weight:bold">$modificationAuthor</span></td>
198 </tr>
199 </tbody>
200 </table>
201 </div>
202</td><td class="bip-article-add-right"></td>
203</tr>
204
205 #if( $relatedArticleId && $relatedArticleId.getSiblings().size()>0 && $relatedArticleId.linkurl.data!="" && $relatedArticleId.data!="")
206
207 #parse ("$_JOURNAL_CONTEXT_/$companyId/10165/BW-M-DOKUMENTY-POWIAZANE")
208
209 #end
210</table>
211 </div>
212
213</div><!-- bip-article -->