1<#assign
2 LayoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")
3 parentLayout = LayoutLocalService.getParentLayout(themeDisplay.layout)
4 custom_page_configuration = ((parentLayout.getExpandoBridge().getAttribute("custom_page_configuration", false))!"{}")?eval
5/>
6<#if
7 custom_page_configuration?has_content
8 && custom_page_configuration['eventoid']?has_content
9 && !config.has('eventoid')
10 && (!config.has('queryParams') || !config.queryParams.has('eventoid'))
11>
12 <#assign VOID = config.put('eventoid', custom_page_configuration['eventoid']) />
13 <#if config.has('queryParams') && !config.queryParams.has('eventoid') >
14 <#assign VOID = config.queryParams.put('eventoid', custom_page_configuration['eventoid']) />
15 </#if>
16</#if>
17
18<!--script src="https://www.unisalento.it/webdav/guest/document_library/scripts_ufficio_sviluppo/app-compress.js" type="module"-->
19<script>
20function getAllCV(azienda) {
21 AUI().use('liferay-portlet-url', 'aui-io-request', function(A) {
22 var namespace = '_it_unisalento_eventi_front_portlet_';
23 var portletURL = Liferay.PortletURL.createResourceURL();
24 portletURL.setResourceId('/evento/zipfiles');
25 portletURL.setParameter('javax.portlet.action', '/evento/zipfiles');
26 var p_p_id = namespace.substr(1, namespace.length - 2);
27 portletURL.setPortletId(p_p_id);
28 portletURL.setPlid(${config.plid});
29 var requestData = {};
30 requestData["eventoId"] = ${config.eventoid};
31 requestData["fieldName"] = '${config.fieldname}';
32 requestData["filename"] = azienda == null?'${config.filename}':azienda;
33 requestData["trackname"] = azienda || '%';
34 portletURL.setParameters(requestData);
35 console.log(portletURL.toString());
36 var a = document.createElement('a');
37 a.href = portletURL.toString();
38 a.download = '${config.filename}';
39 a.style.display = 'none';
40 document.body.appendChild(a);
41 a.click();
42 document.body.removeChild(a);
43 })
44}
45</script>
46<#assign
47 startpage = paramUtil.getInteger(request, renderResponse.getNamespace() + "startpage", 1)
48 deltaP = paramUtil.getInteger(request, renderResponse.getNamespace() + "delta", delta)
49 currenturl = request.getAttribute('CURRENT_COMPLETE_URL')
50 groupId = themeDisplay.getScopeGroupId()
51 namespace = renderResponse.getNamespace()
52 paramid = paramUtil.getString(request, "paramid")
53/>
54
55<#if config.has('senduseremail')>
56 <#assign
57 user = themeDisplay.getUser()
58 email = user.emailAddress
59 />
60 <#if permissionChecker.isOmniadmin()>
61 <#assign email = "%" />
62 </#if>
63 <#assign VOID = config.put("email", email) />
64</#if>
65
66<#assign
67 portletURL = renderResponse.createRenderURL()
68 VOID = portletURL.setParameter("delta", delta?c)
69 entries = queryUtil.query(config.toMap(), (startpage - 1) * deltaP, startpage * deltaP)
70/>
71
72
73<div class="query_container">
74 <#if entries?has_content && entries?size gt 0>
75 <div class="row">
76 <div class="col-xs-12 col-sm-6">
77 <label for="filter">Filtro</label>
78 <input name="filter" type="text" onkeyup="us_filter(this)">
79 </div>
80 <div class="col-xs-12 col-sm-6">
81 <#if queryUtil.canDownload()><a href="${downloadURL}" target="_blank" class="btn btn-sm">Download</a></#if>
82 <#if queryUtil.canDownload()><a href="javascript:if(confirm('Attenzione, il download potrebbe richiedere molto tempo. Continuare?')) { getAllCV() }" class="btn btn-sm">Download All CVs</a></#if>
83 </div>
84 </div>
85 </#if>
86 <script>
87 function us_filter(vm) {
88 if (vm.value.trim().length) {
89 $('#ustable tbody tr').hide();
90 $("#ustable tbody tr").filter(function() {return $(this).text().toLowerCase().indexOf(vm.value.toLowerCase())>-1}).show()
91 } else {
92 $('#ustable tbody tr').show();
93 }
94 }
95 </script>
96 <#if entries?has_content>
97 <#assign num_records = entries?size />
98 <#if entries?size gt 1>
99 <#assign num_records = (entries[1]?last)?number />
100 </#if>
101 <table class="table" id="ustable">
102 <#list entries as objects>
103 <#assign tag=((objects_index == 0)?string("th","td"))>
104 ${(objects_index == 0)?string("<thead>","")}
105 ${(objects_index == 1)?string("<tbody>","")}
106 <tr>
107 <#list objects as cell>
108 <#if !cell?is_last>
109 <#if cell??>
110 <#assign value = cell />
111 <#if cell?is_number >
112 <#assign value = cell?c >
113 </#if>
114 <#if cell?is_boolean >
115 <#assign value = "<input type='checkbox' disabled " + cell?string("checked", "") + ">" />
116 </#if>
117 <#if cell?is_date >
118 <#assign value = cell?string["dd/MM/yyyy, HH:mm"] >
119 </#if>
120 <${tag}><#if value?starts_with('https://') ><a href="${value}"></#if>${value}<#if value?starts_with('https://') ></a></#if></${tag}>
121 <#else>
122 <${tag}/>
123 </#if>
124 </#if>
125 </#list>
126 <#-- ESEMPIO DI CELLA ACTION CHE RIMANDA AD UNA SCHEDA DI DETTAGLIO -->
127 <#-- <#if objects_index==0>
128 <${tag}>Azioni</${tag}>
129 <#else>
130 <${tag}><a href="/query2?partecipanteid=${objects[0]}">Dettaglio</a></${tag}>
131 </#if> -->
132 </tr>
133 ${(objects_index == entries?size-1)?string("</tbody>","")}
134 ${(objects_index == 0)?string("</thead>","")}
135 </#list>
136 </table>
137 <#assign maxPages = (num_records / deltaP)?floor />
138 <#if ((num_records % deltaP) != 0) >
139 <#assign maxPages = maxPages + 1 />
140 </#if>
141 <@liferay_ui["page-iterator"] cur=startpage curParam="startpage" delta=deltaP deltaConfigurable=true deltaParam="delta" forcePost=false id="us-query-pagination" markupView="lexicon" maxPages=maxPages portletURL=portletURL total=num_records type="regular" />
142 <#else>
143 Nessun dato da mostrare
144 </#if>
145</div>