1<div class="teaser linkliste ${Hoehe.getData()}">
2
3<#if Spitzmarke.getData()!="">
4 <h2 class="spitzmarke">${Spitzmarke.getData()}</h2>
5</#if>
6
7<div class="green-line"></div>
8
9<#assign layoutService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService") />
10
11<#if Link.getSiblings()?has_content>
12<div class="slidebox-wrapper">
13
14 <div class="slidebox">
15 <ul class="links">
16
17
18 <#assign maxLinks=Link?size/>
19
20 <#list Link.getSiblings() as cur_link>
21
22 <#assign is_last=false/>
23 <#if maxLinks==cur_link_index+1>
24 <#assign is_last=true/>
25 </#if>
26
27
28 <#assign tlink=""/>
29 <#assign tlink_text="">
30
31 <#-- if internal link, use page name as default link text -->
32 <#if (cur_link.InternerLink.getData()?has_content) &&
33 (cur_link.InternerLink.getFriendlyUrl()?has_content)>
34
35 <#assign tlink = cur_link.InternerLink.getFriendlyUrl()>
36
37 <#-- always use relative URL -->
38 <#if tlink?starts_with("http")>
39 <#assign tlink = "/"+tlink?split("/")[3]>
40 </#if>
41
42
43
44 <#-- page might have been deleted -->
45 <#assign tlink_text="">
46
47
48 <#if (layoutService.getLayout( getterUtil.getLong(groupId), getterUtil.getBoolean(false), getterUtil.getLong(cur_link.InternerLink.getData()))??)>
49
50 <#assign layout = layoutService.getLayout( getterUtil.getLong(groupId), getterUtil.getBoolean(false), getterUtil.getLong(cur_link.InternerLink.getData())) />
51
52 <#assign tlink_text = layout.getName(locale)/>
53
54 </#if>
55
56 </#if>
57
58 <#-- overwrite linktext, if editor has set it manually -->
59 <#if (cur_link.Linktext.getData()?has_content)>
60 <#assign tlink_text = cur_link.Linktext.getData()>
61 </#if>
62
63 <#assign linktarget="">
64
65 <#if ! tlink?has_content>
66 <#assign tlink = cur_link.ExternerLink.getData()>
67 <#assign linktarget="_blank">
68 </#if>
69
70
71
72
73 <li class="item">
74
75
76 <#if cur_link.PdfDatei?? && cur_link.PdfDatei.getData()?has_content>
77
78 <#assign cur_Datei = cur_link.PdfDatei>
79 <#assign fileUrl = getterUtil.getString(cur_Datei.getData())>
80 <#assign fileUid = stringUtil.extractLast(fileUrl, "/")>
81
82 <#assign DLAppServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")>
83 <#assign Datei = DLAppServiceUtil.getFileEntryByUuidAndGroupId(fileUid,groupId)>
84
85 <#assign downloadURL = fileUrl?substring(0, fileUrl?last_index_of("/")) />
86 <#assign downloadURL = downloadURL?substring(0, downloadURL?last_index_of("/")) />
87 <#assign downloadURL = downloadURL + "/" + htmlUtil.escapeURL(Datei.getTitle()) />
88
89 <#if (Datei.getDescription()?has_content)>
90 <#assign dateiText=Datei.getDescription()>
91 <#else>
92 <#assign dateiText=Datei.getTitle()>
93 </#if>
94
95 <#-- Add the filesize to linktext -->
96 <#if Datei??>
97 <#assign fileSize = ((Datei.getSize()/1024)?round)/>
98 <#assign unit="KB"/>
99
100 <#if (fileSize > 1000) >
101 <#setting locale="de_DE">
102 <#assign fileSize = (fileSize / 1024)?string["0.#"]/>
103 <#assign unit="MB"/>
104 </#if>
105
106 <#assign dateiGroesse="["+fileSize+" "+unit+ getAccessibilityInformation(fileUid,groupId) + "]"/>
107 <#assign dateiText+= " " + dateiGroesse>
108 </#if>
109
110 <a href="${downloadURL}" class="mehr-link download-link" target="_blank" alt="${dateiText}"
111 title="${dateiText}">${dateiText}</a>
112 <#else>
113 <a href="${tlink}" target="${linktarget}" alt="${tlink_text}"
114 title="${tlink_text}">${tlink_text}</a>
115
116 </#if>
117 </li>
118
119 </#list>
120 </ul>
121 </div>
122</div>
123<div class="buttons">
124 <a href="#noGo" class="slide-down"></a>
125 <a href="#noGo" class="slide-up"></a>
126</div>
127
128
129</#if>
130
131
132</div>
133
134<#function getAccessibilityInformation fileUid,groupId>
135 <#assign DLAppServiceUtil = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppService")>
136 <#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
137 <#assign dlFileEntryTypeLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryTypeLocalService")>
138 <#assign dlFileVersionLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileVersionLocalService")>
139
140 <#assign Datei = dlFileEntryLocalService.getFileEntryByUuidAndGroupId(fileUid,groupId) />
141
142 <#assign fileEntryTypeId = Datei.getFileEntryTypeId() />
143
144 <#if fileEntryTypeId gt 0 >
145 <#assign imageFileEntryType = dlFileEntryTypeLocalService.getDLFileEntryType(fileEntryTypeId) />
146 <#assign dlFileVersion = dlFileVersionLocalService.getLatestFileVersion(Datei.getUserId(), Datei.getFileEntryId()) />
147 <#assign fieldsMap = Datei.getDDMFormValuesMap(dlFileVersion.getFileVersionId()) />
148
149 <#list fieldsMap?keys as ddmFormKey>
150 <#assign ddmForm = fieldsMap[ddmFormKey]/>
151
152 <#list ddmForm.getDDMFormFieldValues() as formField>
153 <#if formField.getName() == 'notAccessible'>
154 <#assign notAccessbile = formField.getValue().getString(locale) />
155 <#if getterUtil.getBoolean(notAccessbile)>
156 <#return "; nicht barrierefrei" />
157 </#if>
158 </#if>
159
160 </#list>
161
162 </#list>
163 </#if>
164
165 <#return "" />
166</#function>