|  | @@ -1,24 +1,21 @@
 | 
											
												
													
														|  | -{# génère un fichier vcalendar à partir d'un événement #}
 |  | 
 | 
											
												
													
														|  |  BEGIN:VCALENDAR
 |  |  BEGIN:VCALENDAR
 | 
											
												
													
														|  |  VERSION:2.0
 |  |  VERSION:2.0
 | 
											
												
													
														|  |  PRODID:-//hacksw/handcal//NONSGML v1.0//EN
 |  |  PRODID:-//hacksw/handcal//NONSGML v1.0//EN
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  |  {% for period in event.getPeriods %}
 |  |  {% for period in event.getPeriods %}
 | 
											
												
													
														|  |  BEGIN:VEVENT
 |  |  BEGIN:VEVENT
 | 
											
												
													
														|  | 
 |  | +UID:{{ period.getStartOn|date('Ymd\\THis') }}Z-{{ event.id}}@orgasso.net
 | 
											
												
													
														|  |  DTSTART:{{ period.getStartOn|date('Ymd\\THis') }}Z
 |  |  DTSTART:{{ period.getStartOn|date('Ymd\\THis') }}Z
 | 
											
												
													
														|  |  DTEND:{{ period.getEndOn|date('Ymd\\THis') }}Z
 |  |  DTEND:{{ period.getEndOn|date('Ymd\\THis') }}Z
 | 
											
												
													
														|  |  SUMMARY:{{ event.name }}
 |  |  SUMMARY:{{ event.name }}
 | 
											
												
													
														|  | -DESCRIPTION:{{ event.description }}
 |  | 
 | 
											
												
													
														|  | -URL:{{ url('app_main_booking', {id: event.id}) }}
 |  | 
 | 
											
												
													
														|  | -END:VEVENT
 |  | 
 | 
											
												
													
														|  | -{% endfor %}
 |  | 
 | 
											
												
													
														|  | -
 |  | 
 | 
											
												
													
														|  | 
 |  | +{% set description_lines = [] %}
 | 
											
												
													
														|  |  {% for party in event.getParties %}
 |  |  {% for party in event.getParties %}
 | 
											
												
													
														|  | -BEGIN:VEVENT
 |  | 
 | 
											
												
													
														|  | -DTSTART:{{ party.getStartOn|date('Ymd\\THis') }}Z
 |  | 
 | 
											
												
													
														|  | -DTEND:{{ party.getEndOn|date('Ymd\\THis') }}Z
 |  | 
 | 
											
												
													
														|  | -SUMMARY:{{ party.getGame.getName }}
 |  | 
 | 
											
												
													
														|  | -DESCRIPTION:{{ party.getGame.getDescription }}
 |  | 
 | 
											
												
													
														|  | 
 |  | +    {% set line = party.getGame.getName ~ '\nHoraire : le ' ~ party.getStartOn|date('d/m') ~ ' de ' ~ party.getStartOn|date('H:i') ~ ' à ' ~ party.getEndOn|date('H:i') ~ '\n' ~ party.getGame.getDescription %}
 | 
											
												
													
														|  | 
 |  | +    {% set description_lines = description_lines|merge([line]) %}
 | 
											
												
													
														|  | 
 |  | +{% endfor %}
 | 
											
												
													
														|  | 
 |  | +{% set description = (event.description ~ '\n' ~ description_lines|join('\n'))|replace({',':'\,',';':'\;','\\':'\\\\'}) %}
 | 
											
												
													
														|  | 
 |  | +DESCRIPTION:{{ description }}
 | 
											
												
													
														|  | 
 |  | +URL:{{ url('app_main_booking', {id: event.id}) }}
 | 
											
												
													
														|  |  END:VEVENT
 |  |  END:VEVENT
 | 
											
												
													
														|  |  {% endfor %}
 |  |  {% endfor %}
 | 
											
												
													
														|  |  
 |  |  
 |