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 class="bip-article-title">$reserved-article-title.data</h2>
9 <div class="bip-article-meta" style="float: left" >
10#* #set ($modifiedDate = $reserved-article-modified-date.data)
11 #set ($dateLength = $modifiedDate.length() - 15)
12 #set ($modifiedDate = $modifiedDate.substring(0,$dateLength))
13
14 #if ($date && not $date.data.isEmpty())
15 <span class="bip-article-date">$date.data</span>
16 #else
17 <span class="bip-article-date">$modifiedDate</span>
18 #end
19*#
20 <span class="putNoTagWrapperPlace"></span>
21
22 #if ($article-source && not $article-source.data.isEmpty())
23 <span class="bip-article-source">Źródło: $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
29 </div>
30 <div style="float: right; min-width:90px;" class="zoomAndPrint"></div>
31 <div style="clear:both"></div>
32
33 <!-- usunięto wprowadzenie bo dublowało się
34
35 <div class="article-lead">
36 $reserved-article-description.data</div>
37 -->
38 <div class="bip-article-content">
39 #if ($image && $image.getSiblings().size() > 0)
40 <div class="bip-article-images">
41 #foreach($img in $image.getSiblings())
42 #if ($img && $img.data != "")
43 <div class="bip-article-image">
44 <a
45 href="$img.data"
46 #if($img.title.data)
47 title="$img.title.data"
48 #end
49 rel="prettyPhoto[pp_gal]"><img src="$img.data&width=150"
50 #if ($img.description.data)
51 alt="$img.description.data"
52 #end
53 ></a>
54 </div>
55 #end
56 #end
57 </div>
58 #end
59 $content.data
60 </div>
61 <div class="bip-article-add">
62
63<table>
64<tr>
65<td class="bip-article-add-left"></td><td class="bip-article-add-center">
66#if( $file && $file.getSiblings().size()>0 && $file.data!="" && $link.filetitle.data!="")
67 #if( $link.getSiblings().size()>0 && $link.linkurl.data!="" && $link.data!="")
68 <div class="bip-article-files" style="width: 50%">
69 #else
70 <div class="bip-article-files" style="width: 100%">
71 #end
72
73 <h3>$languageUtil.get($locale , "publication-files")</h3>
74 ##parse ("$journalTemplatesPath/FILES")
75
76 <ul>
77 #foreach ($item in $file.getSiblings())
78 #if ($item && $item.getData() != "")
79 #set ($indexOfDot = $item.getData().lastIndexOf(".") + 1)
80
81 #set($tab=$item.getData().split("/"))
82
83 #if($tab.size()>3)
84 #set($size=$tab.size())
85 #set($s1=$size+(-1))
86 #set($s2=$size+(-2))
87 #set($s3=$size+(-3))
88
89 #set($l1=$s1.parseInt("$tab.get($s3)"))
90 #set($l2=$s1.parseInt("$tab.get($s2)"))
91 #set($decodedString = $decoder.decode($tab.get($s1), "UTF-8"))
92 #set($fileEntry = $localService.getFileEntryByTitle($l1,$l2,$decodedString))
93 #if( $fileEntry )
94
95 #set($fileSize = $fileEntry.getSize())
96 #set($fileSizeKB = $fileSize / 1024)
97 #set($fileSizeMB = $fileSizeKB / 1024)
98
99 #set ($ext = $fileEntry.getExtension() + ".png")
100 <li>
101 <table>
102 <tr><td style="width:30px; vertical-align:top;"><a target="_blank" href="$item.getData()"><img src="/html/themes/_unstyled/images/file_system/small/$ext"/></a></td>
103 <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>
104 </table>
105 </li>
106 #end
107 #end
108 #end
109 #end
110 </ul>
111 </div>
112#end
113
114#if( $link && $link.getSiblings().size()>0 && $link.linkurl.data!="" && $link.data!="")
115
116 #if( $file && $file.getSiblings().size()>0 && $file.data!="" && $link.filetitle.data!="")
117 <div class="bip-article-links" style="width:50%">
118 #else
119 <div class="bip-article-links" style="width:100%">
120 #end
121
122 <h3>$languageUtil.get($locale , "attached-links")</h3>
123 ##parse ("$journalTemplatesPath/LINKS")
124
125 <ul>
126 #foreach ($li in $link.getSiblings())
127
128 <li>
129 #if(!$request.isEmpty() && !$li.linkurl.data.contains("http://"))
130 <a target="_blank" href="$li.linkurl.data?redirect=$encoder.encode($request.attributes.CURRENT_URL)">$li.data</a><br/>
131 #else
132 <a target="_blank" href="$li.linkurl.data">$li.data</a><br/>
133 #end
134 <span>$li.description.data</span>
135 </li>
136 #end
137 </ul>
138 </div>
139#end
140</td><td class="bip-article-add-right"></td>
141</tr>
142
143 #if( $relatedArticleId && $relatedArticleId.getSiblings().size()>0 && $relatedArticleId.linkurl.data!="" && $relatedArticleId.data!="")
144
145 #parse ("$_JOURNAL_CONTEXT_/$companyId/10165/BW-M-DOKUMENTY-POWIAZANE")
146
147 #end
148</table>
149 </div>
150</div>