Commit f23b98fc by farax

video-news

parent 830d034a
...@@ -96,6 +96,11 @@ public class VideoNewsDisplayContext { ...@@ -96,6 +96,11 @@ public class VideoNewsDisplayContext {
return _position; return _position;
} }
public Boolean isallLevelsPDF() {
_allLevelsPDF = GetterUtil.getBoolean(_portletPreferences.getValue("allLevelsPDF","0"), false);
return _allLevelsPDF;
}
public int getDelta() { public int getDelta() {
_delta = GetterUtil.getInteger(_portletPreferences.getValue("delta","4"),4); _delta = GetterUtil.getInteger(_portletPreferences.getValue("delta","4"),4);
return _delta; return _delta;
...@@ -327,4 +332,6 @@ public class VideoNewsDisplayContext { ...@@ -327,4 +332,6 @@ public class VideoNewsDisplayContext {
private String _displayStyle; private String _displayStyle;
private boolean _position; private boolean _position;
private boolean _allLevelsPDF;
} }
...@@ -66,6 +66,8 @@ ...@@ -66,6 +66,8 @@
<aui:input helpMessage="horizontally-vertically" name="preferences--position--" type="toggle-switch" value="<%= assetPublisherDisplayContext.getPosition() %>" /> <aui:input helpMessage="horizontally-vertically" name="preferences--position--" type="toggle-switch" value="<%= assetPublisherDisplayContext.getPosition() %>" />
<aui:input name="preferences--allLevelsPDF--" type="toggle-switch" value="<%= assetPublisherDisplayContext.isallLevelsPDF() %>"/>
<aui:input name="preferences--selectedMimeTypes--" type="hidden" /> <aui:input name="preferences--selectedMimeTypes--" type="hidden" />
<aui:input name="preferences--styleID--" type="text" value="<%= assetPublisherDisplayContext.getStyleID() %>"/> <aui:input name="preferences--styleID--" type="text" value="<%= assetPublisherDisplayContext.getStyleID() %>"/>
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
OrderByComparator orderByComparator = DLUtil.getRepositoryModelOrderByComparator("modifiedDate", "desc"); OrderByComparator orderByComparator = DLUtil.getRepositoryModelOrderByComparator("modifiedDate", "desc");
List<FileEntry> fileEntries = DLAppServiceUtil.getGroupFileEntries(scopeGroupId, 0, folderId, currentMimeTypes, status, 0, max_delta, orderByComparator); List<FileEntry> fileEntries = DLAppServiceUtil.getGroupFileEntries(scopeGroupId, 0, folderId, currentMimeTypes, status, 0, max_delta, orderByComparator);
List <Object> foldersAndFileEntriesAndFileShortcuts = DLAppServiceUtil.getFoldersAndFileEntriesAndFileShortcuts(scopeGroupId, folderId, WorkflowConstants.STATUS_ANY,
true, QueryUtil.ALL_POS, QueryUtil.ALL_POS);
//List<DLFileEntry> dlssss = DLFileEntryLocalServiceUtil.getFileEntries(scopeGroupId, folder.getFolderId(), status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator); //List<DLFileEntry> dlssss = DLFileEntryLocalServiceUtil.getFileEntries(scopeGroupId, folder.getFolderId(), status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, orderByComparator);
//System.out.println(fileEntries.size()); //System.out.println(fileEntries.size());
%> %>
...@@ -29,7 +33,18 @@ ...@@ -29,7 +33,18 @@
</style> </style>
<div class="text-justify"> <%
if (assetPublisherDisplayContext.isallLevelsPDF()) {
%>
<div class="text-justify">
<%= "rrrrrrrrrrrrrrrrrrr" %><br>
</div>
<%
}else{
%>
<div class="text-justify">
<ul class="display-style-icon list-unstyled row" id="<%= styleID %>"> <ul class="display-style-icon list-unstyled row" id="<%= styleID %>">
<% <%
for(FileEntry fileEntry : fileEntries){ for(FileEntry fileEntry : fileEntries){
...@@ -70,6 +85,8 @@ ...@@ -70,6 +85,8 @@
}else if(PDFProcessorUtil.hasImages(fileVersion)){ }else if(PDFProcessorUtil.hasImages(fileVersion)){
String imageURL = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&previewFileIndex=1"); String imageURL = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&previewFileIndex=1");
%> %>
<%-- <div class="image-link preview"> <%-- <div class="image-link preview">
<%= imageURL %> <%= imageURL %>
</div> --%> </div> --%>
...@@ -83,21 +100,32 @@ ...@@ -83,21 +100,32 @@
<img alt="" src="<%= imageURL %>"> <img alt="" src="<%= imageURL %>">
<% } %> <% } %>
</div> </div>
<div>
<%= fileEntry.getTitle() %>
</div>
</div> </div>
</div> </div>
</li> --%> </li> --%>
<div class="pdf-column1"> <div class="pdf-column1">
<a href="<%= DLUtil.getDownloadURL(fileEntry, fileVersion, themeDisplay, "") %>"> <a href="<%= DLUtil.getDownloadURL(fileEntry, fileVersion, themeDisplay, "") %>">
<img alt="" src="<%=request.getContextPath()%>/img/pdficon.png"> <span><%= fileEntry.getTitle() %></span> <img alt="" src="<%=request.getContextPath()%>/img/pdficon.png"> <span><%= fileEntry.getTitle() %></span>
</a> </a>
</div> </div>
<% <%
} }
} }
%> %>
</ul> </ul>
</div> </div>
<%
}
%>
<%-- <div class="text-justify"> <%-- <div class="text-justify">
<% <%
......
horizontally-vertically=горизонтально/вертикално horizontally-vertically=горизонтально/вертикално
isOneStaticPhoto=Если одна статическое фото isOneStaticPhoto=Если одна статическое фото
widthVideo=Ширина видео widthVideo=Ширина видео
allLevelsPDF=Показать все содержимое папки PDF
\ No newline at end of file
...@@ -7,23 +7,30 @@ ...@@ -7,23 +7,30 @@
entryId = entry.getEntryId() entryId = entry.getEntryId()
assetRenderer = entry.getAssetRenderer() assetRenderer = entry.getAssetRenderer()
entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry, true)
/> />
<#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContent()) /> <#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContent()) />
<#assign ddmimg = docXml.valueOf("//dynamic-element[@name='image_publication']/dynamic-content/text()") /> <#assign ddmimg = docXml.valueOf("//dynamic-element[@name='image_publication']/dynamic-content/text()") />
<#assign href = docXml.valueOf("//dynamic-element[@name='readmore']/dynamic-content/text()") /> <#assign href = viewURL />
<#assign publication_note = docXml.valueOf("//dynamic-element[@name='publication_note']/dynamic-content/text()") /> <#assign publication_note = docXml.valueOf("//dynamic-element[@name='publication_note']/dynamic-content/text()") />
<li class="lfr-asset-item"> <li class="lfr-asset-item col-md-4">
<div class="taglib-vertical-card entry-display-style "> <div class="taglib-vertical-card entry-display-style">
<div class="editIcon"> <div class="editIcon">
<span><@getEditIcon /></span> <span><@getEditIcon /></span>
</div> </div>
<div class="card"> <div class="card">
<a href="${href}" target="_blank"> <a href="${href}">
<div class="aspect-ratio aspect-ratio-bg-center aspect-ratio-bg-cover" style="background-image: url('${ddmimg}&imagePreview=1')"></div> <div class="aspect-ratio aspect-ratio-bg-center aspect-ratio-bg-cover" style="background-image: url('${ddmimg}&imagePreview=1')"></div>
</a> </a>
</div> </div>
<div class="cis-text-color">${entryTitle}</div> <div class="cis-text-color">
<a href="${href}">
${entryTitle}
</a>
</div>
<a href="${href}">
<p class="note">${publication_note}</p> <p class="note">${publication_note}</p>
</a>
</div> </div>
</li> </li>
</#list> </#list>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment