1<#assign journalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") />
2
3<div id="changeDisplay">
4 <div class="displayNotesContainer">
5 <div class="displayColumn active"><i class="fas fa-th"></i></div>
6 <div class="displayList"><i class="fas fa-list"></i></div>
7 </div>
8</div>
9<div class="listado-notas-horizontal">
10 <#if entries?has_content>
11 <#list entries as curEntry>
12 <#assign journalArticle = curEntry.getAssetRenderer().getAssetObject()
13 viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry.getAssetRenderer(), curEntry, true)
14 />
15 <#assign contenidoNota = journalArticleService.getArticleContent(journalArticle, "TPL_NOTA_LISTADO_HORIZONTAL", "VIEW", locale, themeDisplay)/>
16
17 <div class="nota">
18 ${contenidoNota}
19 </div>
20 </#list>
21 <#else>
22 <script>$('#clonePagination').hide();</script>
23 <div class="no-results"><@liferay.language key="enotas.nota.notFound" /></div>
24 </#if>
25</div>
26
27<script>
28$( document ).ready(function() {
29 var display = localStorage.getItem("Display");
30
31 if(display == "grid-display"){
32 $('.displayColumn').addClass('active')
33 $('.displayList').removeClass('active')
34 }else{
35 $('.displayColumn').removeClass('active')
36 $('.displayList').addClass('active')
37 }
38
39 $( ".displayColumn" ).click(function() {
40 if(!$('.displayColumn').hasClass('active')) {
41 $('.displayColumn').addClass('active')
42 $('.displayList').removeClass('active')
43 $('body').addClass("grid-display");
44 $('body').removeClass("list-display");
45 localStorage.setItem("Display", "grid-display");
46 }
47 });
48 $( ".displayList" ).click(function() {
49 if(!$('.displayList').hasClass('active')) {
50 $('.displayList').addClass('active')
51 $('.displayColumn').removeClass('active')
52 $('body').removeClass("grid-display");
53 $('body').addClass("list-display");
54 localStorage.setItem("Display", "list-display");
55 }
56 });
57});
58</script>