Web Script: webscripts/fr/uoh/news_unes/news_unes_selection.get
Generated from /front/service/script/webscripts/fr/uoh/news_unes/news_unes_selection.get on 20 janv. 2019 08:50:14

Script Properties
Id:webscripts/fr/uoh/news_unes/news_unes_selection.get
Short Name:News unes selection
Description:Highlight of News unes
Authentication:none
Transaction:none
Method:GET
URL Template:/fr/uoh/news_unes/news_unes_selection
Format Style:any
Default Format:html
Negotiated Formats:[undefined]
Implementation:class org.springframework.extensions.webscripts.DeclarativeWebScript
Extensions:[undefined]

Store: /WEB-INF

File: webscripts/fr/uoh/news_unes/news_unes_selection.get.desc.xml
<webscript>
  <shortname>News unes selection</shortname>
  <description>Highlight of News unes</description>
  <url>/fr/uoh/news_unes/news_unes_selection</url>
  <authentication>none</authentication>
</webscript>
File: webscripts/fr/uoh/news_unes/news_unes_selection.get.html.ftl
<script type="text/javascript">
	$(function(){
		$('#slides').slides({
			preload: true,
			preloadImage: '${url.context}/res/images/loading.gif',
			play: 5000,
			pause: 2500,
			fadeSpeed:500,
			hoverPause: true,
			effect: 'fade'
		});
	});
</script>

<div id="container">
	
	<div id="slides">
		<div class="slides_container">
			<#list news_list as news>
				<div class="slide">
					<#-- url par défaut : détail de la news -->
					<#assign newsUrl = url.context + "/news?id=" + news.id> 
					<#assign redirect = false>
					
					<#if news.lienUrl?has_content>
						<#assign newsUrl = news.lienUrl>
						<#assign redirect = true>
					</#if>
					
					<#if always_redirect>
						<#-- Redirection externe systématique -->
						<#assign redirect = true>
					</#if>

					<div class="uohClickableContent">
						<img src="${url.context?html}/res/images/masque-diapo.png" alt="" class="frame" />
						<img src="${url.context?html}/image/get?id=${news.image?url?html}" alt="" />
						<div class="caption">
							<h3 class="titre">
								<a href="${newsUrl?html}" <#if redirect>rel="external"</#if> class="uohContentLink">
									${news.titre}
								</a>
							</h3>
							<div class="description">
								${news.description}
							</div>
						</div>
					</div>
				</div>
			</#list>
		</div>
	</div>
	
</div>
File: webscripts/fr/uoh/news_unes/news_unes_selection.get.js
<import resource="/webscripts/fr/uoh/config/common.js">

var conn = remote.connect("alfresco-system");
var data = conn.get("/fr/uoh/news_unes/news_unes_selection.json");

var news_json = eval('('+data+')');
model.news_list = uohSortNewsSelectionByCmisName(news_json.list);

model.always_redirect = false;
/* Redirection externe systématique si page bandeau_une (iframe) */
if(page.id=="bandeau_une") {
	model.always_redirect = true;
}

Store: classpath:surf/webscripts

[No implementation files]

Store: classpath:webscripts

[No implementation files]