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
df62cd7d
Commit
df62cd7d
authored
Mar 23, 2018
by
Ildar Safiullin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
locale
parent
85ca5457
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
7 deletions
+93
-7
modules/video-news/src/main/java/ru/systematic/cisstat/portlet/display/context/VideoNewsDisplayContext.java
+6
-0
modules/video-news/src/main/resources/META-INF/resources/configuration.jsp
+2
-0
modules/video-news/src/main/resources/META-INF/resources/view.jsp
+2
-2
modules/video-news/src/main/resources/content/Language_ru.properties
+3
-2
templates/content/news.ftl
+18
-3
templates/test/1.vm
+62
-0
No files found.
modules/video-news/src/main/java/ru/systematic/cisstat/portlet/display/context/VideoNewsDisplayContext.java
View file @
df62cd7d
...
...
@@ -86,6 +86,11 @@ public class VideoNewsDisplayContext {
return
_isOneStaticPhoto
;
}
public
String
getWidthVideo
()
{
_widthVideo
=
_portletPreferences
.
getValue
(
"widthVideo"
,
"200"
);
return
_widthVideo
;
}
public
Boolean
getPosition
()
{
_position
=
GetterUtil
.
getBoolean
(
_portletPreferences
.
getValue
(
"position"
,
"1"
),
true
);
return
_position
;
...
...
@@ -313,6 +318,7 @@ public class VideoNewsDisplayContext {
private
String
_css
;
private
String
_styleID
;
private
String
_widthVideo
;
private
Boolean
_isOneStaticPhoto
;
private
String
[]
_mimeTypes
;
...
...
modules/video-news/src/main/resources/META-INF/resources/configuration.jsp
View file @
df62cd7d
...
...
@@ -74,6 +74,8 @@
<aui:input name="preferences--isOneStaticPhoto--" type="toggle-switch" value="<%= assetPublisherDisplayContext.isOneStaticPhoto() %>"/>
<aui:input name="preferences--widthVideo--" type="text" value="<%= assetPublisherDisplayContext.getWidthVideo() %>"/>
<aui:field-wrapper label="show-media-type">
<liferay-ui:input-move-boxes
leftBoxName="currentMimeTypes"
...
...
modules/video-news/src/main/resources/META-INF/resources/view.jsp
View file @
df62cd7d
...
...
@@ -41,8 +41,8 @@
String src = DLUtil.getPreviewURL(fileEntry, fileVersion, themeDisplay, "&videoPreview=1"+"&type=" + "mp4");
//String oo = PropsUtil.get(PropsKeys.DL_FILE_ENTRY_PREVIEW_VIDEO_CONTAINERS);
%>
<li class="lfr-asset-item video">
<video src="<%= src %>" poster="<%= thumbnailImage %>" controls width="
200
"></video>
<li class="lfr-asset-item video"
style="<%= fileEntries.size()==1 ? "text-align:center;" : "" %>"
>
<video src="<%= src %>" poster="<%= thumbnailImage %>" controls width="
<%= assetPublisherDisplayContext.getWidthVideo() %>
"></video>
<div class="cis-text-color" style="white-space: nowrap;"><%= fileEntry.getTitle() %></div>
</li>
<%
...
...
modules/video-news/src/main/resources/content/Language_ru.properties
View file @
df62cd7d
horizontally-vertically
=
горизонтально/вертикално
isOneStaticPhoto
=
Если одна статическое фото
\ No newline at end of file
isOneStaticPhoto
=
Если одна статическое фото
widthVideo
=
Ширина видео
\ No newline at end of file
templates/content/news.ftl
View file @
df62cd7d
...
...
@@ -17,7 +17,21 @@
<#assign JournalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleService")>
<#assign dateFormat = dateFormatFactory.getSimpleDateFormat("dd.MM.yyyy") />
<#assign modifieDate = .vars['reserved-article-modified-date'].data />
<#assign date = .vars['reserved-article-modified-date'].data />
<#setting locale = 'ru_RU'>
<#assign date = date?date("E, dd MMM yyyy HH:mm:ss Z")>
<#--
22 мар 2018 15:15:06 +0000
-->
<#--
${dateUtil.getDate(modifieDate, "dd MMM yyyy - HH:mm:ss", locale)}
<#assign getterUtil = staticUtil["com.liferay.portal.kernel.util.GetterUtil"] />
-->
<div class="date color_red">
...
...
@@ -29,8 +43,9 @@
url="/newsroom"
/>
<#assign modifieDate = modifieDate?datetime("EEE, d MMM yyyy HH:mm:ss Z") >
${modifieDate?date}
${date}<br>
<#-- ${"2014-05-31 12:03:34"?datetime("yyyy-MM-dd HH:mm:ss")} -->
</div>
<div class="title-text">
...
...
templates/test/1.vm
0 → 100644
View file @
df62cd7d
#set ($articleService = $serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleService"))
#set ($article = $articleService.getArticle($getterUtil.getLong($groupId), $reserved-article-id.data))
#set ($portalBeanLocator = $portal.getClass().forName('com.liferay.portal.kernel.bean.PortalBeanLocatorUtil'))
#set ($dateFormatFactory = $portalBeanLocator.locate('com.liferay.portal.kernel.util.DateFormatFactoryUtil'))
#set ($dateFormat = $dateFormatFactory.getSimpleDateFormat('EEE, dd MMM yyyy hh:mm:ss Z'))
#set ($pubDate = $dateFormat.parse($reserved-article-display-date.getData()))
#set($tagdataService = $serviceLocator.findService("com.liferay.portlet.asset.service.AssetTagLocalService"))
#set ($dlHelper = $localeUtil.getClass().forName("com.bpc.csfactory.core.documentlibrary.DocumentLibraryHelperUtil").getMethod("getDocumentLibraryHelper", null).invoke(null, null))
#set($listTags = $tagdataService.getTags("com.liferay.portlet.journal.model.JournalArticle", $article.getResourcePrimKey()))
<article>
<div itemscope itemtype="http://schema.org/Article">
<header>
#set($metaParsedDate=$dateTool.format('yyyy-MM-dd',$pubDate,$locale))
<meta itemprop="datePublished" content="$metaParsedDate"/>
<h1 itemprop="name">$reserved-article-title.getData()</h1>
<div class="metas">
#set($displayParsedDate=$dateTool.format('dd MMMMM yyyy',$pubDate,$locale))
$dateTool.format('dd MMMMM yyyy',$article.getCreateDate(),$locale)
<a href="$publisher.publisher_link.data" target="_blank" rel="author" title="$publisher.publisher_title.data">
<span itemprop="author" itemscope itemtype="http://schema.org/Person">
<span itemprop="name">$publisher.publisher_title.data</span>
</span>
</a>
</div>
#if($listTags && $listTags.size() > 0)
<div class="tag">
<i class="gicon-tag gicon-grey"> </i>
#foreach($tag in $listTags)
<a title="$tag.getName()" href="#"><span itemprop="articleSection">$tag.getName()</span></a>
#if($velocityHasNext), #end
#end
</div>
#end
</header>
<div itemprop="articleBody" class="content">
$content.getData()
</div>
<footer>
#if($validator.isNotNull($documents) && $documents.document.data!="")
<div class="attachments">
<ul class="unstyled">
#foreach($dl in $documents.document.siblings)
#if($dl.data && $dl.data.length()>0)
#set($dlFileEntry = $dlHelper.getDLFileEntryByUrl($httpUtil.decodeURL($htmlUtil.unescape($dl.data))))
#if($dlFileEntry)
#set($dlFileVersion = $dlFileEntry.getLatestFileVersion(false))
#set($dlFileSize = $dlFileVersion.getSize()/1024)
<li><a target="_blank" title="$dlFileVersion.getTitle()" href="$dl.data"><i class="gicon-doc gicon-grey"> </i>$dlFileVersion.getTitle() ($stringUtil.upperCase($dlFileVersion.getExtension()) - $dlFileSize Ko)</a></li>
#end
#end
#end
</ul>
</div>
#end
</footer>
</div>
</article>
\ 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