Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sbsoft
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ildar Safiullin
sbsoft
Commits
147ccdc3
Commit
147ccdc3
authored
Mar 28, 2018
by
Ildar Safiullin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tt
parent
7f5b6201
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
137 additions
and
0 deletions
+137
-0
templates/preview/asset publisher/actual topics.ftl
+137
-0
No files found.
templates/preview/asset publisher/actual topics.ftl
0 → 100644
View file @
147ccdc3
<style>
#actualtopics .display-style-icon .lfr-asset-item{
width: 33%;
padding-left: 9px;
padding-right: 9px;
}
#actualtopics .aspect-ratio{
position:relative;
}
#actualtopics .entryTitleText{
font-family:Arial, Helvetica, sans-serif;
font-size:16px;
text-align: center;
display:block;
position:absolute;
left:0;
bottom:0;
width:100%;
box-sizing:border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color:#fff;
padding:2px 5% 2px 5%;
background-color:rgba(0,0,0,.4);
}
#actualtopics .editIcon{
display:block;
position:absolute;
left:0;
top:0;
width:20%;
}
#actualtopics .editIcon:hover{
background-color: red;
}
#actualtopics .empty{
display:block;
position:absolute;
left:0;
bottom: 0;
width: 100%;
height: 140px;
z-index: 0;
}
</style>
<div id="actualtopics">
<ul class="display-style-icon list-unstyled row" data-qa-id="rows0">
<#if entries?has_content>
<#list entries as entry>
<#assign
entry = entry
entryId = entry.getEntryId()
assetRenderer = entry.getAssetRenderer()
entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
/>
<#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContent()) />
<#assign ddmimg = docXml.valueOf("//dynamic-element[@name='ddmimg']/dynamic-content/text()") />
<#assign readmore = docXml.valueOf("//dynamic-element[@name='readmore']/dynamic-content/text()") />
<#list readmore?split("@") as item>
<#if item_index == 0>
<#assign linkPageId = item?number>
</#if>
<#if item_index == 1>
<#if item == "private">
<#assign linkPrivate = true>
<#else>
<#assign linkPrivate = false>
</#if>
</#if>
<#if item_index = 2>
<#assign linkGroupId = item?number>
</#if>
</#list>
<#assign LayoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
<#assign pageLayout = LayoutLocalService.getLayout(linkGroupId, linkPrivate, linkPageId)>
<#assign friendly_page_link = portalUtil.getLayoutFriendlyURL(pageLayout, themeDisplay)>
<li class="lfr-asset-item">
<div>
<div class="card">
<div class="aspect-ratio aspect-ratio-bg-cover" style="background-image: url('${ddmimg}&imagePreview=1')">
<div class="editIcon">
<span><@getEditIcon /></span>
</div>
<a href="${friendly_page_link}">
<div class="empty">
</div>
<div class="entryTitleText">
<span>${entryTitle}</span>
</div>
</a>
</div>
</div>
</div>
</li>
</#list>
</#if>
<li></li>
</ul>
</div>
<#macro getEditIcon>
<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())>
<#assign redirectURL = renderResponse.createRenderURL() />
${redirectURL.setParameter("mvcPath", "/add_asset_redirect.jsp")}
${redirectURL.setWindowState("pop_up")}
<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" />
<#if validator.isNotNull(editPortletURL)>
<#assign title = languageUtil.format(locale, "edit-x", entryTitle, false) />
<@liferay_ui["icon"]
iconCssClass="icon-edit-sign"
message=title
url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});"
/>
</#if>
</#if>
</#macro>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment