1 {% extends '@RapsysAir/body.html.twig' %}
 
   3         <section id="dashboard">
 
   5                         <a href="{{ path('rapsys_air_session_view', {'id': session.id}) }}">{{ session.title }}</a>
 
   6                         <a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.at }}</a>
 
  10                                 <section class="cell">
 
  11                                         <h3>{% trans %}Organizer{% endtrans %}</h3>
 
  13                                                 <dt>{% trans %}Attributed to{% endtrans %}</dt>
 
  15                                                         {% if session.application is null %}
 
  16                                                                 {% trans %}None{% endtrans %}
 
  18                                                                 <a href="{{ path('rapsys_air_organizer_view', {'id': session.application.user.id}) }}">{{ session.application.user.title }}</a>
 
  22                                         {% if session.snippet.description is defined and session.snippet.description %}
 
  24                                                         <dt>{% trans %}Description{% endtrans %}</dt>
 
  25                                                         <dd>{{ session.snippet.description|striptags|markdown_to_html }}</dd>
 
  28                                         {% if session.application.user.donation is defined and session.application.user.donation %}
 
  30                                                         <dt>{% trans %}Donation{% endtrans %}</dt>
 
  31                                                         <dd><a href="{{ session.application.user.donation }}" title="{{ 'Make a donation to %title%'|trans({'%title%': session.application.user.title}) }}">{{ 'Contribute to %title%'|trans({'%title%': session.application.user.title}) }}</a></dd>
 
  34                                         {% if session.application.user.site is defined and session.application.user.site %}
 
  36                                                         <dt>{% trans %}Website{% endtrans %}</dt>
 
  37                                                         <dd><a href="{{ session.application.user.site }}" title="{{ 'Consult %title% website'|trans({'%title%': session.application.user.title}) }}">{{ 'Website of %title%'|trans({'%title%': session.application.user.title}) }}</a></dd>
 
  41                                 <section class="cell">
 
  42                                         <h3>{% trans %}Schedule{% endtrans %}</h3>
 
  44                                                 <dt>{% trans %}Slot{% endtrans %}</dt>
 
  45                                                 <dd>{{ session.slot.title }}</dd>
 
  48                                                 <dt>{% trans %}Start{% endtrans %}</dt>
 
  49                                                 <dd>{{ session.start.format('Y-m-d H:i:s') }}</dd>
 
  52                                                 <dt>{% trans %}Stop{% endtrans %}</dt>
 
  54                                                         {% if session.start.format('Y-m-d') != session.stop.format('Y-m-d') %}
 
  55                                                                 {{ session.stop.format('Y-m-d H:i:s') }}
 
  57                                                                 {{ session.stop.format('H:i:s') }}
 
  62                                                 <dt>{% trans %}Length{% endtrans %}</dt>
 
  63                                                 <dd>{{ session.length.format('H:i:s') }}</dd>
 
  66                                                 <dt>{% trans %}Locked{% endtrans %}</dt>
 
  68                                                         {% if session.locked is null %}
 
  69                                                                 {% trans %}None{% endtrans %}
 
  71                                                                 {{ session.locked.format('Y-m-d H:i:s') }}
 
  76                                                 <dt>{% trans %}Created{% endtrans %}</dt>
 
  77                                                 <dd>{{ session.created.format('Y-m-d H:i:s') }}</dd>
 
  80                                                 <dt>{% trans %}Updated{% endtrans %}</dt>
 
  81                                                 <dd>{{ session.updated.format('Y-m-d H:i:s') }}</dd>
 
  84                                 <section class="cell">
 
  85                                         <h3>{% trans %}Weather{% endtrans %}</h3>
 
  86                                         {% if session.rainrisk is not null %}
 
  88                                                         <dt>{% trans %}Rainrisk{% endtrans %}</dt>
 
  89                                                         <dd>{{ session.rainrisk }}</dd>
 
  92                                         {% if session.rainfall is not null %}
 
  94                                                         <dt>{% trans %}Rainfall{% endtrans %}</dt>
 
  95                                                         <dd>{{ session.rainfall }}</dd>
 
  98                                         {% if session.realfeel is not null %}
 
 100                                                         <dt>{% trans %}Realfeel{% endtrans %}</dt>
 
 101                                                         <dd>{{ session.realfeel }}</dd>
 
 104                                         {% if session.realfeelmin is not null %}
 
 106                                                         <dt>{% trans %}Realfeel min{% endtrans %}</dt>
 
 107                                                         <dd>{{ session.realfeelmin }}</dd>
 
 110                                         {% if session.realfeelmax is not null %}
 
 112                                                         <dt>{% trans %}Realfeel max{% endtrans %}</dt>
 
 113                                                         <dd>{{ session.realfeelmax }}</dd>
 
 116                                         {% if session.temperature is not null %}
 
 118                                                         <dt>{% trans %}Temperature{% endtrans %}</dt>
 
 119                                                         <dd>{{ session.temperature }}</dd>
 
 122                                         {% if session.temperaturemin is not null %}
 
 124                                                         <dt>{% trans %}Temperature min{% endtrans %}</dt>
 
 125                                                         <dd>{{ session.temperaturemin }}</dd>
 
 128                                         {% if session.temperaturemax is not null %}
 
 130                                                         <dt>{% trans %}Temperature max{% endtrans %}</dt>
 
 131                                                         <dd>{{ session.temperaturemax }}</dd>
 
 135                                 <section class="cell">
 
 136                                         <h3>{% trans %}Location{% endtrans %}</h3>
 
 139                                                 <dt>{% trans %}Location{% endtrans %}</dt>
 
 140                                                 <dd><a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.title }}</a></dd>
 
 144                                                 <dt>{% trans %}Address{% endtrans %}</dt>
 
 146                                                         {{ session.location.address }}
 
 147                                                         {{ session.location.zipcode }} {{ session.location.city }}
 
 151                                                 <dt>{% trans %}Maps{% endtrans %}</dt>
 
 152                                                 <dd><a href="https://www.google.fr/maps/@{{ session.location.latitude }},{{ session.location.longitude }},19z">Google Maps</a></dd>
 
 153                                                 <dd><a href="https://www.openstreetmap.org/#map=19/{{ session.location.latitude }}/{{ session.location.longitude }}">OpenStreetMap</a></dd>
 
 156                                                 <dt>{% trans %}Minimap{% endtrans %}</dt>
 
 157                                                 <dd>TODO: minimap</dd>
 
 161                         {{ include('@RapsysAir/form/_toolbox.html.twig') }}
 
 164                         <h3>{% trans %}Candidates{% endtrans %}</h3>
 
 165                         <div class="panel grid">
 
 166                                 {% if session.applications is null %}
 
 167                                         <section class="cell">
 
 168                                                 {% trans %}None{% endtrans %}
 
 171                                         {% for application in session.applications %}
 
 172                                                 <section class="cell">
 
 173                                                         <h4><a href="{{ path('rapsys_air_organizer_view', {'id': application.user.id} ) }}">{{ application.user.title }}</a></h4>
 
 175                                                                 <dt>{% trans %}Score{% endtrans %}</dt>
 
 177                                                                         {% if application.score is null %}
 
 178                                                                                 {% trans %}None{% endtrans %}
 
 180                                                                                 {{ application.score }}</dd>
 
 184                                                                 <dt>{% trans %}Created{% endtrans %}</dt>
 
 185                                                                 <dd>{{ application.created.format('Y-m-d H:i:s') }}</dd>
 
 188                                                                 <dt>{% trans %}Updated{% endtrans %}</dt>
 
 189                                                                 <dd>{{ application.updated.format('Y-m-d H:i:s') }}</dd>
 
 192                                                                 <dt>{% trans %}Canceled{% endtrans %}</dt>
 
 194                                                                         {% if application.canceled is null %}
 
 195                                                                                 {% trans %}None{% endtrans %}
 
 197                                                                                 {{ application.canceled.format('Y-m-d H:i:s') }}
 
 207         {% if locations is defined and locations %}
 
 208                 <section id="location">
 
 209                         <h2>{% trans %}Locations{% endtrans %}</h2>
 
 210                         <div class="panel grid">
 
 211                                 {% for id, title in locations %}
 
 212                                         <section class="cell">
 
 213                                                 <h3><a href="{{ path('rapsys_air_location_view', {'id': id}) }}">{{ title }}</a></h3>