русский [Beta] русский [Beta] English [Beta] English [Beta]
Image

Контактная информация

Приём граждан России по вопросам ЗАГС, нотариата, обмена паспортов и другим консульским вопросам по будням с 10:00 до 12:00.

Адрес: 22100 Аландские острова, Финляндия, Норра Эспланадгатан, 11
Тел./факс: + 358 18 19524

 

Новости

Во время обработки запрошенного шаблона произошла ошибка...
Error on line 42, column 17 in 10132#10165#22886599
document.selectSingleNode("/root/dynamic-element/dynamic-content[@language-id='" + fieldLocale + "']") is undefined.
It cannot be assigned to node
1<#assign  
2    liferay_ui = taglibLiferayHash["/WEB-INF/tld/liferay-ui.tld"] 
3    LayoutLocalService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") 
4    DLFileEntryLocalServiceUtil = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") 
5 
6/> 
7<#if validator.isNull(portletSetupLinkToLayoutUuid)> 
8    <#assign flag = true> 
9</#if> 
10<#if validator.isNotNull(portletSetupLinkToLayoutUuid) && (portletSetupLinkToLayoutUuid != 'current-page')> 
11    <#assign linkToLayoutUuid = portletSetupLinkToLayoutUuid> 
12        <#assign 
13            destLayout = LayoutLocalService.getLayoutByUuidAndGroupId(linkToLayoutUuid, groupId, false) 
14            destId = destLayout.getTypeSettingsProperty('default-asset-publisher-portlet-id')?split("_")[2] 
15            srcId = renderResponse.getNamespace()?split("_")[3] 
16
17</#if> 
18 
19<#list entries as entry> 
20	<#assign entry = entry /> 
21	<#assign groupId = entry.getGroupId()/> 
22	<#assign imgsrc = ''/> 
23	 
24	<#assign assetRenderer = entry.getAssetRenderer() /> 
25  <#switch entry.getClassName()> 
26    <#case "com.liferay.portlet.journal.model.JournalArticle"><#-- Сетевой контент --> 
27    	<#assign article = assetRenderer.getArticle() /> 
28      <#assign structureId = article.getStructureId() />	 
29      <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) /> 
30      <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) /> 
31    	<#if assetLinkBehavior != "showFullContent"> 
32    		<#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry, true) /> 
33    	</#if> 
34      <#if validator.isNotNull(portletSetupLinkToLayoutUuid) && (portletSetupLinkToLayoutUuid != 'current-page')> 
35          <#assign viewURL = viewURL?replace(srcId, destId) > 
36      </#if>     
37      <#if structureId =="2684936"> <#-- Внешняя ссылка --> 
38          <#assign document = saxReaderUtil.read(article.getContent())> 
39          <#assign rootElement = document.getRootElement() /> 
40          <#assign fieldLocale = getLocale(rootElement) /> 
41            <#if (article.getAvailableLanguageIds()?size > 1)>  
42                <#assign node = document.selectSingleNode("/root/dynamic-element/dynamic-content[@language-id='" + fieldLocale + "']") > 
43            <#else> 
44                <#assign node = document.selectSingleNode("/root/dynamic-element/dynamic-content") > 
45            </#if> 
46          <#assign viewURL= node.getText()> 
47      </#if> 
48     
49     
50<#-- Get first image --> 
51      <#if structureId =="4539192"> <#-- Новости с фото --> 
52          <#assign imgsrc = getField(assetRenderer.getArticle(), "docURL") /> 
53          <#if validator.isBlank(imgsrc)> 
54              <#assign imgsrc = getField(assetRenderer.getArticle(), "docURLt") /> 
55          </#if> 
56      </#if> 
57       
58      <#-- if validator.isBlank(imgsrc)> 
59          <#assign imgsrc = assetRenderer.getThumbnailPath(renderRequest) /> 
60      </#if --> 
61      <#-- assign imgsrc = assetRenderer.getThumbnailPath(renderRequest) / --> 
62 
63      <#if article.isSmallImage()> 
64          <#assign imgsrc = assetRenderer.getURLImagePreview(renderRequest) /> 
65      </#if>   
66      <#if imgsrc?starts_with("http")> 
67      <#elseif imgsrc?contains("?")> 
68          <#assign imgsrc = imgsrc+"&imageThumbnail=1"> 
69      <#elseif !validator.isBlank(imgsrc)> 
70          <#assign imgsrc = imgsrc+"?imageThumbnail=1"> 
71      </#if> 
72    <#break> 
73    <#case "com.liferay.portlet.documentlibrary.model.DLFileEntry"><#-- док. и медиа(файл) --> 
74      <#assign viewURL= entry.getAssetRenderer().getURLDownload(themeDisplay)> 
75      <#assign entryTitle = entry.getDescription()> 
76      <#if entryTitle = ""> 
77        <#assign file = DLFileEntryLocalServiceUtil.getDLFileEntryByUuidAndGroupId(entry.getClassUuid(), groupId)> 
78        <#assign entryTitle = file.title?replace('.'+file.extension,'', 'i')> 
79      </#if> 
80      <#assign imgsrc = entry.getAssetRenderer().getThumbnailPath(renderRequest)> 
81    <#break> 
82  </#switch> 
83 
84 
85 
86 
87    <div class="asset-abstract item clearfix<#if validator.isBlank(imgsrc)> noimg</#if>"> 
88		<div class="lfr-meta-actions asset-actions"> 
89			<@getPrintIcon /> 
90			<@getFlagsIcon /> 
91			<@getEditIcon /> 
92		</div> 
93		<#if entry.getClassName() == "com.liferay.portlet.journal.model.JournalArticle"> 
94		    <@getMetadataField fieldName="publish-date" /> 
95		</#if> 
96		<#if !validator.isBlank(imgsrc)> 
97        <div class="imgwrap"> 
98        <img src="${imgsrc}"> 
99        </div> 
100        </#if> 
101        <div class="title"> 
102		<a href="${viewURL}"<#if (entry.getClassName() == "com.liferay.portlet.journal.model.JournalArticle")&&(structureId =="2684936")> target="_blank"</#if>> 
103		    ${entryTitle} 
104		</a> 
105		</div> 
106	</div> 
107</#list> 
108 
109<style> 
110.teaser-date { 
111 /* border-bottom: 1px solid #bebebf; 
112  color: #ce2350; */ 
113  font-weight: bold; 
114  margin-bottom: 4px; 
115  margin-top: 6px; 
116  padding: 0; 
117
118.imgwrap { 
119    float: left; 
120    height: 100%; 
121    max-width: 100px; 
122
123.imgwrap img { 
124    max-width: 100px; 
125
126.title { 
127    margin-left: 100px; 
128    padding: 0 0.5em 0.5em; 
129
130.title a { 
131    font-size: 1.1em; 
132    line-height: 1.2em; 
133    text-decoration: none; 
134
135.noimg .imgwrap {display: none;} 
136.noimg .title {margin-left: 0;} 
137</style> 
138 
139      
140<#-- GET Field from Journal Article --> 
141<#function getField journalArticle fieldName> 
142         <#assign document = saxReaderUtil.read(journalArticle.getContent()) /> 
143         <#assign rootElement = document.getRootElement() /> 
144          
145         <#-- Get locale to use to extract URL --> 
146         <#assign fieldLocale = getLocale(rootElement) /> 
147          
148          
149        <#assign xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='docTitle']//dynamic-element[@name='" + fieldName + "']//dynamic-content[@language-id='" + fieldLocale + "']") />     
150    
151         <#if (xPathSelector.selectSingleNode(rootElement))?? > 
152            <#assign returnField = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
153            
154         <#else> 
155            <#assign returnField = ""/> 
156         </#if> 
157 
158         <#return returnField /> 
159    </#function> 
160      
161    <#-- get locale - checks is current locale in the list of available locales --> 
162    <#function getLocale rootElement> 
163        <#assign availableLocales = rootElement.attribute("available-locales").getText() /> 
164         <#assign defaultLocale = rootElement.attribute("default-locale").getText() /> 
165         <#if (availableLocales?contains(locale)) > 
166            <#assign returnLocale = locale /> 
167         <#else> 
168            <#assign returnLocale = defaultLocale /> 
169         </#if> 
170          
171         <#return returnLocale /> 
172    </#function> 
173     
174 
175<#macro getEditIcon> 
176	<#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())> 
177		<#assign redirectURL = renderResponse.createRenderURL() /> 
178 
179		${redirectURL.setParameter("struts_action", "/asset_publisher/add_asset_redirect")} 
180		${redirectURL.setWindowState("pop_up")} 
181 
182		<#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("pop_up"), redirectURL)!"" /> 
183 
184		<#if validator.isNotNull(editPortletURL)> 
185			<#assign title = languageUtil.format(locale, "edit-x", entryTitle) /> 
186 
187			<@liferay_ui["icon"] 
188				image="edit" 
189				message=title 
190				url="javascript:Liferay.Util.openWindow({dialog: {width: 960}, id:'" + renderResponse.getNamespace() + "editAsset', title: '" + title + "', uri:'" + htmlUtil.escapeURL(editPortletURL.toString()) + "'});" 
191			/> 
192		</#if> 
193	</#if> 
194</#macro> 
195 
196<#macro getFlagsIcon> 
197	<#if enableFlags == "true"> 
198		<@liferay_ui["flags"] 
199			className=entry.getClassName() 
200			classPK=entry.getClassPK() 
201			contentTitle=entry.getTitle(locale) 
202			label=false 
203			reportedUserId=entry.getUserId() 
204		/> 
205	</#if> 
206</#macro> 
207 
208<#macro getMetadataField 
209	fieldName 
210
211	<#if stringUtil.split(metadataFields)?seq_contains(fieldName)> 
212		<div class="teaser-date"> 
213			<#if fieldName == "publish-date"> 
214				${dateUtil.getDate(entry.getPublishDate(), "dd.MM.yy", locale)} 
215			</#if> 
216		</div> 
217	</#if> 
218</#macro> 
219 
220<#macro getPrintIcon> 
221	<#if enablePrint == "true" > 
222		<#assign printURL = renderResponse.createRenderURL() /> 
223 
224		${printURL.setParameter("struts_action", "/asset_publisher/view_content")} 
225		${printURL.setParameter("assetEntryId", entry.getEntryId()?string)} 
226		${printURL.setParameter("viewMode", "print")} 
227		${printURL.setParameter("type", entry.getAssetRendererFactory().getType())} 
228 
229		<#if (validator.isNotNull(assetRenderer.getUrlTitle()))> 
230			<#if (assetRenderer.getGroupId() != themeDisplay.getScopeGroupId())> 
231				${printURL.setParameter("groupId", assetRenderer.getGroupId()?string)} 
232			</#if> 
233 
234			${printURL.setParameter("urlTitle", assetRenderer.getUrlTitle())} 
235		</#if> 
236 
237		${printURL.setWindowState("pop_up")} 
238 
239		<@liferay_ui["icon"] 
240			image="print" 
241			message="print" 
242			url="javascript:Liferay.Util.openWindow({id:'" + renderResponse.getNamespace() + "printAsset', title: '" + languageUtil.format(locale, "print-x-x", ["hide-accessible", entryTitle]) + "', uri: '" + htmlUtil.escapeURL(printURL.toString()) + "'});" 
243		/> 
244	</#if> 
245</#macro> 

  

 

  • Президент РФ
  • Правительство РФ
  • Совет Федерации
  • Государственная Дума
  • Министерство иностранных дел РФ
  • Официальная Россия
  • РБК
  • РИА Новости
  • Вести