Histórico de ofertas de prácticas
Te facilitamos la relación de los procesos de selección de estudiantes cerrados que hemos solicitado para que realicen prácticas formativas en nuestra empresa.
Se ha producido un error al procesar la plantilla.
The string doesn't match the expected date/time/date-time format. The string to parse was: "1215". The expected format was: "HH:mm". The nested reason given follows: Unparseable date: "1215" ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign timeExpDate = timeExp?date["H... [in template "20155#20195#427709" at line 135, column 49] ----
1<#assign groupId = getterUtil.getLong(groupId)>
2<#assign group = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService").getGroup(groupId)>
3<#assign theme_display = request.getAttribute("LIFERAY_SHARED_THEME_DISPLAY")>
4<#assign imagesFolder = theme_display.getPathThemeImages()>
5
6<#if locale == "en_US">
7 <#assign newLocale = "ca_ES">
8<#else>
9 <#assign newLocale = locale>
10</#if>
11
12<#function miliSeconds dateString firstDate>
13 <#assign params = dateString?split(":")>
14
15 <#if params?size == 2>
16 <#assign param1 = params[0]>
17 <#assign param2 = params[1]>
18 <#assign param1 = getterUtil.getLong(param1)*3600000>
19 <#assign param2 = getterUtil.getLong(param2)*60000>
20 <#assign finalMilSec = param1 + param2>
21 <#assign finalMilSecLong = getterUtil.getLong(finalMilSec)>
22 <#assign resultLong = firstDate + finalMilSecLong>
23
24 <#return resultLong>
25 </#if>
26</#function>
27
28<#if entries?has_content>
29 <#if locale != "en_US">
30 <div class="choose-ticket__search-bar">
31 <div class="form__field">
32 <div class="form__field__control f__text__6_wrapper">
33 <input id="oferta-practicas-search-input" type="text" placeholder='<@liferay.language key="offer.helperSearchHistoric"/>
34 ' value=""/>
35
36 <button id="f__button__6" type="button" class="button button--a" onclick="javascript:historicalStudentOffers.search();">
37 <img class="button__icon" src="${imagesFolder}/basic/16px/svg/search-white.svg" alt="<@liferay.language key="label.search"/>
38 ">
39 <span class="button__label">
40 <@liferay.language key="label.search"/>
41 </span>
42 </button>
43 </div>
44 </div>
45 </div>
46 </#if>
47 <#assign today = .now?date>
48
49 <#if locale != "en_US">
50 <ul id="historical-students-offers-ul" class="list list--links list--links-b">
51 </#if>
52 <#assign count = 0>
53 <#foreach curEntry in entries>
54 <#assign renderer = curEntry.getAssetRenderer()>
55 <#assign className = renderer.getClassName()>
56
57 <#assign dataPub = "">
58 <#assign dataExp = "">
59 <#assign isExpired = false>
60
61 <#if className == "com.liferay.journal.model.JournalArticle">
62 <#assign journalArticle = renderer.getArticle()>
63 <#assign journalArticleId = journalArticle.getArticleId()>
64 <#assign document = saxReaderUtil.read(journalArticle.getContent())>
65 <#assign rootElement = document.getRootElement()>
66 <#assign title = "">
67 <#assign titleSel = saxReaderUtil.createXPath("dynamic-element[@name='position']/dynamic-content[@language-id='" + newLocale + "']")>
68 <#assign title = titleSel.selectSingleNode(rootElement).getStringValue()>
69 <#assign numReferencia = "">
70 <#assign numReferenciaSel = saxReaderUtil.createXPath("dynamic-element[@name='reference_number']/dynamic-content[@language-id='" + newLocale + "']")>
71 <#assign numReferencia = numReferenciaSel.selectSingleNode(rootElement).getStringValue()>
72 <#assign referenceSel = saxReaderUtil.createXPath("dynamic-element[@name='reference_text']/dynamic-content[@language-id='" + newLocale + "']")>
73 <#if referenceSel.selectSingleNode(rootElement)?has_content>
74 <#assign reference = referenceSel.selectSingleNode(rootElement).getStringValue()>
75 <#else>
76 <#assign reference = "">
77 </#if>
78 <#assign refNumSel = saxReaderUtil.createXPath("dynamic-element[@name='reference_text']/dynamic-element[@name='reference_number']/dynamic-content[@language-id='" + newLocale + "']")>
79 <#if refNumSel.selectSingleNode(rootElement)?has_content>
80 <#assign refNumber = refNumSel.selectSingleNode(rootElement).getStringValue()>
81 <#else>
82 <#assign refNumber = "">
83 </#if>
84 <#assign sumissionSel = saxReaderUtil.createXPath("dynamic-element[@name='text_submission']/dynamic-content[@language-id='" + newLocale + "']")>
85 <#if sumissionSel.selectSingleNode(rootElement)?has_content>
86 <#assign sumission = sumissionSel.selectSingleNode(rootElement).getStringValue()>
87 <#else>
88 <#assign sumission = "">
89 </#if>
90 <#assign requestDateSel = saxReaderUtil.createXPath("dynamic-element[@name='text_submission']/dynamic-element[@name='request_date']/dynamic-content[@language-id='" + newLocale + "']")>
91 <#if requestDateSel.selectSingleNode(rootElement)?has_content>
92 <#assign requestDate = requestDateSel.selectSingleNode(rootElement).getStringValue()>
93 <#else>
94 <#assign requestDate = "">
95 </#if>
96 <#assign link = renderer.getURLViewInContext(renderRequest, renderResponse, "")>
97 <#assign pubDateSel = saxReaderUtil.createXPath("dynamic-element[@name='pubDate']/dynamic-content[@language-id='" + newLocale + "']")>
98 <#assign dataPub = pubDateSel.selectSingleNode(rootElement).getStringValue()>
99 <#assign expDateSel = saxReaderUtil.createXPath("dynamic-element[@name='expDate']/dynamic-content[@language-id='" + newLocale + "']")>
100 <#assign dataExp = expDateSel.selectSingleNode(rootElement).getStringValue()>
101 <#assign timePubSel = saxReaderUtil.createXPath("dynamic-element[@name='pubTime']/dynamic-content[@language-id='" + newLocale + "']")>
102 <#assign timePub = timePubSel.selectSingleNode(rootElement).getStringValue()>
103 <#assign timeExpSel = saxReaderUtil.createXPath("dynamic-element[@name='expTime']/dynamic-content[@language-id='" + newLocale + "']")>
104 <#assign timeExp = timeExpSel.selectSingleNode(rootElement).getStringValue()>
105 <#assign isExpiredSel = saxReaderUtil.createXPath("dynamic-element[@name='isExpired']/dynamic-content[@language-id='" + newLocale + "']")>
106 <#if isExpiredSel.selectSingleNode(rootElement)?has_content>
107 <#assign isExpired = isExpiredSel.selectSingleNode(rootElement).getStringValue()>
108 </#if>
109 <#-- Data publicació i expiració -----------------------------------------------
110 -->
111
112 <#if (dataPub?has_content)>
113 <#if timePub?? && timePub?has_content>
114 <#assign timePubDate = timePub?date["HH:mm"]>
115 <#assign timePubFormat = timePubDate?string["HH:mm"]>
116 <#else>
117 <#assign timePubDate = "">
118 <#assign timePubDate = "">
119 </#if>
120 <#attempt>
121 <#assign dataPub = dataPub?date["yyyy-MM-dd"]>
122
123 <#if timePubFormat?has_content && timePubFormat != "">
124 <#assign dataPubMil = miliSeconds(timePubFormat dataPub?long)>
125 <#assign dataPub = dateUtil.newDate(getterUtil.getLong(dataPubMil))>
126 </#if>
127 <#assign dataPubMil = dataPub?long-timeZoneUtil.getTimeZone("Europe/Madrid").getOffset(dataPub?long)>
128 <#recover>
129 </#attempt>
130 </#if>
131
132
133 <#if (dataExp?has_content)>
134 <#if timeExp?? && timeExp?has_content>
135 <#assign timeExpDate = timeExp?date["HH:mm"]>
136 <#assign timeExpFormat = timeExpDate?string["HH:mm"]>
137 <#else>
138 <#assign timeExpDate = "">
139 <#assign timeExpFormat = "">
140 </#if>
141 <#attempt>
142 <#assign dataExp = dataExp?date["yyyy-MM-dd"]>
143
144 <#if timeExpFormat?has_content && timeExpFormat != "">
145 <#assign dataExpMil = miliSeconds(timeExpFormat dataExp?long)>
146 <#assign dataExp = dateUtil.newDate(getterUtil.getLong(dataExpMil))>
147 </#if>
148 <#assign dataExpMil = dataExp?long-timeZoneUtil.getTimeZone("Europe/Madrid").getOffset(dataExp?long)>
149 <#recover>
150 </#attempt>
151 </#if>
152
153
154 <#if dataPub?has_content && dataExp?has_content && (today?long>=dataPubMil) && (today?long>dataExpMil) || getterUtil.getBoolean(isExpired)>
155 <#if title != "">
156 <#assign count = 1>
157
158 <#if locale != "en_US">
159 <li class="list__item oferta-practicas" data-title="${title}" data-fechapub="${dataPubMil}">
160 <a class="list__label" href="${link}">
161 ${numReferencia} - ${title}
162 <#--$dataPub
163 -->
164 </a>
165 <#if reference?has_content>
166 <p>
167 ${reference}: ${refNumber} <#if sumission>- ${sumission}</#if><#if requestDate>: ${requestDate}</#if>
168 </p>
169 </#if>
170 </li>
171 </#if>
172 </#if>
173 </#if>
174 </#if>
175 </#foreach>
176 <#if locale != "en_US">
177 </ul>
178 </#if>
179 <#if locale == "en_US" && count != 0>
180 <div class="content intro">
181 <p>
182 <@liferay.language key="offer.studentHistoric.noRes"/>
183 </p>
184 </div>
185
186 <#elseif count == 0>
187 <div class="content intro">
188 <p>
189 <@liferay.language key="offer.studentHistoric.noResults"/>
190 </p>
191 </div>
192 </#if>
193<#else>
194 <div class="content intro">
195 <p>
196 <@liferay.language key="offer.studentHistoric.noResults"/>
197 </p>
198 </div>
199</#if>
200
201<div class="content intro no-results" style="display:none;">
202 <p>
203 <@liferay.language key="offer.studentHistoric.noResults.js"/>
204 </p>
205
206</div>
207<script type="text/javascript">
208
209 $(document).ready(function(){
210 historicalStudentOffers.init();
211 });
212
213 historicalStudentOffers= {
214 init: function(){
215 if($("li.oferta-practicas").length==0){
216 return;
217 }
218
219 var maxDate = new Date("3000/06/25");
220 var orderList = $("li.oferta-practicas").sort(function(a,b){
221 var date1 = $(a).data("fechapub")==""?maxDate:new Date($(a).data("fechapub"));
222 var date2 = $(b).data("fechapub")==""?maxDate:new Date($(b).data("fechapub"));
223 //console.log($(a).data("fechapub"));
224 //console.log($(b).data("fechapub"));
225 //console.log(date1 + "----" + date2);
226 return date2 - date1;
227 });
228
229
230 var offers = [];
231 var year = null;
232 jQuery.each(orderList,function(index,li){
233 var date = new Date($(li).data("fechapub"));
234 if(year != date.getFullYear()){
235 year = date.getFullYear();
236 offers.push('<li><h2 class="title title--2" data-year-title="' + year + '">' + year + '</h2></li>');
237 }
238 //$(li).data("year",year);
239 li.dataset.year = year;
240 offers.push(li);
241 });
242
243 $("#historical-students-offers-ul").html(offers);
244
245 $('#oferta-practicas-search-input').keyup(function(event){
246 <#--if(event.which == 13)
247--> <#-- {
248--> event.preventDefault();
249 this.search();
250 <#-- }
251--> }.bind(this));
252 },
253 search: function(){
254 $('.no-results').hide();
255 var text = $("#oferta-practicas-search-input").val();
256 if(text==""){
257 $("[data-year-title]").show();
258 $(".oferta-practicas").show();
259 }else{
260 $("[data-year-title]").hide();
261 var found = false;
262 $(".oferta-practicas").each(function(index,item){
263 var title = $(item).data("title");
264 if(title.toUpperCase().includes(text.toUpperCase())){
265 var year = $(item).data("year");
266 $("[data-year-title='" + year + "']").show();
267 $(item).show();
268 found = true;
269 }else{
270 $(item).hide();
271 }
272 });
273 if(!found){
274 var txt = "<@liferay.language key="offer.studentHistoric.noResults.js"/>";
275 txt = txt.replace("@@@@", text);
276 $('.no-results p').html(txt);
277 $('.no-results').show();
278 }
279 }
280 }
281 };
282
283
284 </script>
Cerrar
© OpenStreetMap contributors