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
ac7bc2b2
Commit
ac7bc2b2
authored
May 05, 2018
by
farax
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Contacts
parent
6c403d73
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
137 additions
and
0 deletions
+137
-0
templates/content/Contacts.ftl
+16
-0
templates/preview/asset publisher/Contacts.ftl
+65
-0
templates/preview/asset publisher/pdf-download.ftl
+56
-0
No files found.
templates/content/Contacts.ftl
0 → 100644
View file @
ac7bc2b2
<style type="text/css">.leftimg {
float:left;
margin: 7px 7px 7px 0;
width: 220px;
}
</style>
<div>
<p style="margin: 0 auto;">
<#if ddmimage.getData()?? && ddmimage.getData() != "">
<img data-fileentryid='${ddmimage.getAttribute("fileEntryId")}' alt='${ddmimage.getAttribute("alt")}' src="${ddmimage.getData()}" class="leftimg"/>
</#if>
</p>
${html.getData()}
</div>
\ No newline at end of file
templates/preview/asset publisher/Contacts.ftl
0 → 100644
View file @
ac7bc2b2
<#if entries?has_content>
<div style="padding-right: 15px;">
<#list entries as entry>
<#assign
assetRenderer = entry.getAssetRenderer()
viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry, true)
entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale))
/>
<#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContent()) />
<#assign ddmimage = docXml.valueOf("//dynamic-element[@name='ddmimage']/dynamic-content/text()") />
<#assign infoContact = docXml.valueOf("//dynamic-element[@name='infoContact']/dynamic-content/text()") />
<div style="padding-bottom: 10px; margin-bottom: 15px; border-bottom: 1px; border-bottom-style: solid;">
<div>
<span><@getEditIcon /></span>
<a href="${viewURL}">
<span class="cis-text-color">${entry.getTitle(locale)}</span>
</a>
</div>
<div class="row">
<div class="col-md-4">
<img width="200" src="<#if ddmimage ??>${ddmimage}&imagePreview=1</#if>" />
</div>
<div class="col-md-1">
</div>
<div class="col-md-7">
<#if infoContact ??>${infoContact}</#if>
<p>
<font>
<u>
<font>
<a href="${viewURL}">Биографическая справка</a>
</font>
</u>
<img src="http://www.cisstat.com/rus/linkredarr.gif" />
</font>
</p>
</div>
</div>
</div>
</#list>
</div>
</#if>
<#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
templates/preview/asset publisher/pdf-download.ftl
0 → 100644
View file @
ac7bc2b2
<#--
Application display templates can be used to modify the look of a
specific application.
Please use the left panel to quickly add commonly used variables.
Autocomplete is also available and can be invoked by typing "${".
-->
<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"] />
<#assign DLFileEntryLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
<#assign DLUtil =serviceLocator.findService("com.liferay.document.library.kernel.util.DLUtil")>
<#assign DLAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
<#assign DLFolderLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFolderLocalService")>
<#assign themeDisplay = serviceContext.getServiceContext().getThemeDisplay()/>
<#attempt>
<#assign folder=DLFolderLocalService.fetchFolder(themeDisplay.getScopeGroupId(), 0, "PDF Download") >
<#assign pdfIconFileEntry =DLAppLocalService.getFileEntry(themeDisplay.getScopeGroupId(), 0, "pdf-download") />
<#assign fileEntries = DLFileEntryLocalService.getFileEntries(themeDisplay.getScopeGroupId(), folder.getFolderId())/>
<#assign pdfDownloadImageURL= DLUtil.getPreviewURL(pdfIconFileEntry, pdfIconFileEntry.getFileVersion(), themeDisplay, "") >
<#list fileEntries as dlFileEntry>
<#if dlFileEntry ?? >
<#assign fileEntry =DLAppLocalService.getFileEntry(dlFileEntry.getFileEntryId()) />
<#if fileEntry?? >
<#assign downloadURL=DLUtil.getDownloadURL(fileEntry,fileEntry.getFileVersion(),themeDisplay,"") />
<div class="download-list">
<div class="imageDiv">
<a href="<#if downloadURL??>${downloadURL}</#if>" >
<img src="<#if pdfDownloadImageURL ??>${pdfDownloadImageURL}</#if>" />
</a>
</div>
<div class="title">
<a href="<#if downloadURL??>${downloadURL}</#if>">
<p class="description">
<#if fileEntry.getDescription()??>
${fileEntry.getDescription()}
</#if>
</p>
</a>
</div>
</div>
</#if>
</#if>
</#list>
<#recover>
</#attempt>
\ 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