-
Notifications
You must be signed in to change notification settings - Fork 3.6k
/
FTL_liferay.ftl
161 lines (140 loc) · 3.62 KB
/
FTL_liferay.ftl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<#ftl strip_whitespace=true>
<#--
Use computer number format to prevent issues with locale settings. See
LPS-30525.
-->
<#setting number_format = "computer">
<#assign
css_main_file = ""
is_signed_in = false
js_main_file = ""
is_setup_complete = false
/>
<#if user??>
<#assign is_setup_complete = user.isSetupComplete() />
</#if>
<#if themeDisplay??>
<#assign
css_main_file = htmlUtil.escape(portalUtil.getStaticResourceURL(request, "${themeDisplay.getPathThemeCss()}/main.css"))
is_signed_in = themeDisplay.isSignedIn()
js_main_file = htmlUtil.escape(portalUtil.getStaticResourceURL(request, "${themeDisplay.getPathThemeJavaScript()}/main.js"))
/>
<#if !is_setup_complete>
<#assign is_setup_complete = themeDisplay.isImpersonated() />
</#if>
</#if>
<#function max x y>
<#if x < y>
<#return y>
<#else>
<#return x>
</#if>
</#function>
<#function min x y>
<#if x <= y>
<#return x>
<#else>
<#return y>
</#if>
</#function>
<#macro breadcrumbs
default_preferences = ""
>
<@liferay_portlet["runtime"]
defaultPreferences=default_preferences
portletProviderAction=portletProviderAction.VIEW
portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.BreadcrumbEntry"
/>
</#macro>
<#macro control_menu>
<#if is_setup_complete && is_signed_in>
<@liferay_product_navigation["control-menu"] />
</#if>
</#macro>
<#macro css
file_name
>
<#if file_name == css_main_file>
<link class="lfr-css-file" href="${file_name}" id="mainLiferayThemeCSS" rel="stylesheet" type="text/css" />
<#else>
<link class="lfr-css-file" href="${file_name}" rel="stylesheet" type="text/css" />
</#if>
</#macro>
<#macro date
format
>
${dateUtil.getCurrentDate(format, locale)}</#macro>
<#macro js
file_name
>
<#if file_name == js_main_file>
<script id="mainLiferayThemeJavaScript" src="${file_name}" type="text/javascript"></script>
<#else>
<script src="${file_name}" type="text/javascript"></script>
</#if>
</#macro>
<#macro language
key
>
${languageUtil.get(locale, key)}</#macro>
<#macro language_format
arguments
key
>
${languageUtil.format(locale, key, arguments)}</#macro>
<#macro languages
default_preferences = ""
>
<@liferay_portlet["runtime"]
defaultPreferences=default_preferences
portletProviderAction=portletProviderAction.VIEW
portletProviderClassName="com.liferay.portal.kernel.servlet.taglib.ui.LanguageEntry"
/>
</#macro>
<#macro navigation_menu
default_preferences = ""
instance_id = ""
>
<@liferay_portlet["runtime"]
defaultPreferences=default_preferences
instanceId=instance_id
portletProviderAction=portletProviderAction.VIEW
portletProviderClassName="com.liferay.portal.kernel.theme.NavItem"
/>
</#macro>
<#macro search
default_preferences = ""
>
<#if is_setup_complete>
<@liferay_portlet["runtime"]
defaultPreferences=default_preferences
portletProviderAction=portletProviderAction.VIEW
portletProviderClassName="com.liferay.admin.kernel.util.PortalSearchApplicationType$Search"
/>
</#if>
</#macro>
<#macro search_bar
default_preferences = ""
>
<#if is_setup_complete>
<@liferay_portlet["runtime"]
defaultPreferences=default_preferences
instanceId="templateSearch"
portletProviderAction=portletProviderAction.VIEW
portletProviderClassName="com_liferay_portal_search_web_search_bar_portlet_SearchBarPortlet"
/>
</#if>
</#macro>
<#macro silently
foo
>
<#assign foo = foo />
</#macro>
<#macro user_personal_bar>
<#if is_setup_complete || !is_signed_in>
<@liferay_portlet["runtime"]
portletProviderAction=portletProviderAction.VIEW
portletProviderClassName="com.liferay.admin.kernel.util.PortalUserPersonalBarApplicationType$UserPersonalBar"
/>
</#if>
</#macro>