Commit b7c7c1b0 by Ildar Safiullin

ftl

parent df62cd7d
<style>
.rating-label{
display:none;
}
</style>
<#assign dateFormat = "dd.MM.yyyy" />
<ul class="news_list list-unstyled">
<#if entries?has_content>
<#list entries as entry>
<#assign
entryId = entry.getEntryId()
assetRenderer = entry.getAssetRenderer()
entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry, true)
/>
<li>
<div class="date color_red">${dateUtil.getDate(entry.getModifiedDate(), dateFormat, locale)}</div>
<a href="${viewURL}">
${entry.getTitle(locale)}
</a>
</li>
</#list>
</#if>
</ul>
\ No newline at end of file
<div id="useful-links">
<ul class="display-style-icon list-unstyled row ">
<#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 href = docXml.valueOf("//dynamic-element[@name='readmore']/dynamic-content/text()") />
<li class="lfr-asset-item" style="width:50%;">
<div class="taglib-vertical-card entry-display-style ">
<div class="editIcon">
<span><@getEditIcon /></span>
</div>
<div class="cis-text-color">${entryTitle}</div>
</div>
</li>
</#list>
</#if>
</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
<style>
#topnews h2{
margin-top: 10px;
}
#topnews .news-item .news-content h2 {
font-size: 17px;
}
#topnews .display-style-icon .lfr-asset-item h2 {
font-size: 16px;
}
</style>
<div id="topnews">
<#if entries?has_content>
<ul class="display-style-icon list-unstyled row">
<#list entries as curEntry>
<#assign
entryId = curEntry.getEntryId()
assetRenderer = curEntry.getAssetRenderer()
entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, curEntry, true)
/>
<#assign docXml = saxReaderUtil.read(curEntry.getAssetRenderer().getArticle().getContent()) />
<#assign ddmimg = docXml.valueOf("//dynamic-element[@name='ddmimg']/dynamic-content/text()") />
<#if (curEntry_index==0)>
<div class="news-item">
<img src="${ddmimg}" alt="" title="" class="news-image">
<div class="news-content">
<div class="date"><@getMetadataField fieldName="create-date" /></div>
<h2><a href="/mainnews/-/asset_publisher/JEqB8cNCGfpS/content/${assetRenderer.getUrlTitle()}?redirect=/newsroom">${curEntry.getTitle(locale)}</a></h2>
<p>${curEntry.getTitle(locale)}</p>
<p class="learn-more">
<a href="/mainnews/-/asset_publisher/JEqB8cNCGfpS/content/${assetRenderer.getUrlTitle()}?redirect=/newsroom">
<button type="button" class="btn btn-primary">Подробнее</button>
</a>
</p>
</div>
</div>
<#else>
<li class="lfr-asset-item " data-qa-id="row">
<div class="taglib-vertical-card entry-display-style">
<div class="card">
<div class="aspect-ratio aspect-ratio-bg-center aspect-ratio-bg-cover">
<div class="date"><@getMetadataField fieldName="create-date" /></div>
<h2>
<a href="/mainnews/-/asset_publisher/JEqB8cNCGfpS/content/${assetRenderer.getUrlTitle()}?redirect=/newsroom">${curEntry.getTitle(locale)}</a>
</h2>
</div>
</div>
</div>
</li>
</#if>
</#list>
</ul>
</#if>
</div>
<#macro getMetadataField fieldName>
<span class="metadata-entry">
<#assign dateFormat = "dd MMM yyyy" />
<#if fieldName == "create-date">
${dateUtil.getDate(entry.getCreateDate(), dateFormat, locale)}
</#if>
</span>
</#macro>
\ No newline at end of file
......@@ -1193,3 +1193,6 @@ body.oldDesign{
}
}
.portlet-boundary_com_liferay_site_navigation_menu_web_portlet_SiteNavigationMenuPortlet_ ul li.active{
font-weight: bold;
}
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