]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/views/session/view.html.twig
Add session edit form
[airbundle] / Resources / views / session / view.html.twig
index 1369cdbe38afbc83fea6a91ccba87d22d4834376..c3367b4cae651f2a4facc739d2e55422c6910198 100644 (file)
 {% extends '@RapsysAir/body.html.twig' %}
 {% block content %}
-<section id="session">
+<section id="dashboard">
        <h2>
-               <a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.title }}</a>
                <a href="{{ path('rapsys_air_session_view', {'id': session.id}) }}">{{ session.title }}</a>
+               <a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.at }}</a>
        </h2>
-       <section class="panel">
-               <section class="grid">
-                       <div class="row">
-                               <dl class="cell">
-                                       <dt><h3>{% trans %}Location{% endtrans %}</h3></dt>
-                                       <dd><a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.title }}</a></dd>
+       <div class="panel calendar">
+               <div class="grid">
+                       <section class="cell">
+                               <h3>{% trans %}Organizer{% endtrans %}</h3>
+                               <dl>
+                                       <dt>{% trans %}Attributed to{% endtrans %}</dt>
+                                       <dd>
+                                               {% if session.application is null %}
+                                                       {% trans %}None{% endtrans %}
+                                               {% else %}
+                                                       <a href="{{ path('rapsys_air_user_view', {'id': session.application.user.id}) }}">{{ session.application.user.title }}</a>
+                                               {% endif %}
+                                       </dd>
                                </dl>
-                               <dl class="cell">
-                                       <dt><h3>{% trans %}Slot{% endtrans %}</h3></dt>
+                       </section>
+                       <section class="cell">
+                               <h3>{% trans %}Schedule{% endtrans %}</h3>
+                               <dl>
+                                       <dt>{% trans %}Slot{% endtrans %}</dt>
                                        <dd>{{ session.slot.title }}</dd>
                                </dl>
-                               <dl class="cell">
-                                       <dt><h3>{% trans %}Created{% endtrans %}</h3></dt>
+                               <dl>
+                                       <dt>{% trans %}Start{% endtrans %}</dt>
+                                       <dd>{{ session.start.format('Y-m-d H:i:s') }}</dd>
+                               </dl>
+                               <dl>
+                                       <dt>{% trans %}Stop{% endtrans %}</dt>
+                                       <dd>
+                                               {% if session.start.format('Y-m-d') != session.stop.format('Y-m-d') %}
+                                                       {{ session.stop.format('Y-m-d H:i:s') }}
+                                               {% else %}
+                                                       {{ session.stop.format('H:i:s') }}
+                                               {% endif %}
+                                       </dd>
+                               </dl>
+                               <dl>
+                                       <dt>{% trans %}Length{% endtrans %}</dt>
+                                       <dd>{{ session.length.format('H:i:s') }}</dd>
+                               </dl>
+                               <dl>
+                                       <dt>{% trans %}Created{% endtrans %}</dt>
                                        <dd>{{ session.created.format('Y-m-d H:i:s') }}</dd>
                                </dl>
-                               <dl class="cell">
-                                       <dt><h3>{% trans %}Updated{% endtrans %}</h3></dt>
+                               <dl>
+                                       <dt>{% trans %}Updated{% endtrans %}</dt>
                                        <dd>{{ session.updated.format('Y-m-d H:i:s') }}</dd>
                                </dl>
-                       </div>
-                       <div class="row">
-                               <dl class="cell">
-                                       <dt><h3>{% trans %}Attributed to{% endtrans %}</h3></dt>
-                                       {% if session.application is null %}
-                                               <dd>{% trans %}None{% endtrans %}</dd>
-                                       {% else %}
-                                               <dd>{{ session.application.user.title }}</dd>
-                                       {% endif %}
+                       </section>
+                       <section class="cell">
+                               <h3>{% trans %}Weather{% endtrans %}</h3>
+                               {% if session.rainrisk is not null %}
+                                       <dl>
+                                               <dt>{% trans %}Rainrisk{% endtrans %}</dt>
+                                               <dd>{{ session.rainrisk }}</dd>
+                                       </dl>
+                               {% endif %}
+                               {% if session.rainfall is not null %}
+                                       <dl>
+                                               <dt>{% trans %}Rainfall{% endtrans %}</dt>
+                                               <dd>{{ session.rainfall }}</dd>
+                                       </dl>
+                               {% endif %}
+                               {% if session.realfeel is not null %}
+                                       <dl>
+                                               <dt>{% trans %}Realfeel{% endtrans %}</dt>
+                                               <dd>{{ session.realfeel }}</dd>
+                                       </dl>
+                               {% endif %}
+                               {% if session.realfeelmin is not null %}
+                                       <dl>
+                                               <dt>{% trans %}Realfeel min{% endtrans %}</dt>
+                                               <dd>{{ session.realfeelmin }}</dd>
+                                       </dl>
+                               {% endif %}
+                               {% if session.realfeelmax is not null %}
+                                       <dl>
+                                               <dt>{% trans %}Realfeel max{% endtrans %}</dt>
+                                               <dd>{{ session.realfeelmax }}</dd>
+                                       </dl>
+                               {% endif %}
+                               {% if session.temperature is not null %}
+                                       <dl>
+                                               <dt>{% trans %}Temperature{% endtrans %}</dt>
+                                               <dd>{{ session.temperature }}</dd>
+                                       </dl>
+                               {% endif %}
+                               {% if session.temperaturemin is not null %}
+                                       <dl>
+                                               <dt>{% trans %}Temperature min{% endtrans %}</dt>
+                                               <dd>{{ session.temperaturemin }}</dd>
+                                       </dl>
+                               {% endif %}
+                               {% if session.temperaturemax is not null %}
+                                       <dl>
+                                               <dt>{% trans %}Temperature max{% endtrans %}</dt>
+                                               <dd>{{ session.temperaturemax }}</dd>
+                                       </dl>
+                               {% endif %}
+                       </section>
+                       <section class="cell">
+                               <h3>{% trans %}Location{% endtrans %}</h3>
+                               <dl>
+                                       {# infos #}
+                                       <dt>{% trans %}Location{% endtrans %}</dt>
+                                       <dd><a href="{{ path('rapsys_air_location_view', {'id': session.location.id}) }}">{{ session.location.title }}</a></dd>
                                </dl>
-                               <dl class="cell">
-                                       <dt><h3>{% trans %}Begin{% endtrans %}</h3></dt>
-                                       {% if session.begin is null %}
-                                               <dd>{% trans %}None{% endtrans %}</dd>
-                                       {% else %}
-                                               <dd>{{ session.begin.format('Y-m-d H:i:s') }}</dd>
-                                       {% endif %}
+                               <dl>
+                                       {# location #}
+                                       <dt>{% trans %}Address{% endtrans %}</dt>
+                                       <dd>
+                                               {{ session.location.address }}
+                                               {{ session.location.zipcode }} {{ session.location.city }}
+                                       </dd>
                                </dl>
-                               <dl class="cell">
-                                       <dt><h3>{% trans %}End{% endtrans %}</h3></dt>
-                                       {% if session.end is null %}
-                                               <dd>{% trans %}None{% endtrans %}</dd>
-                                       {% else %}
-                                               <dd>{{ session.end.format('Y-m-d H:i:s') }}</dd>
-                                       {% endif %}
+                               <dl>
+                                       <dt>{% trans %}Maps{% endtrans %}</dt>
+                                       <dd><a href="https://www.google.fr/maps/@{{ session.location.latitude }},{{ session.location.longitude }},19z">Google Maps</a></dd>
+                                       <dd><a href="https://www.openstreetmap.org/#map=19/{{ session.location.latitude }}/{{ session.location.longitude }}">OpenStreetMap</a></dd>
                                </dl>
-                       </div>
-                       <div class="sub">
-                               <h3>{% trans %}Candidates{% endtrans %}</h3>
-                               <div class="row">
-                                       {% if session.applications is null %}
+                               <dl>
+                                       <dt>{% trans %}Minimap{% endtrans %}</dt>
+                                       <dd>TODO: minimap</dd>
+                               </dl>
+                       </section>
+               </div>
+               {{ include('@RapsysAir/form/_toolbox.html.twig') }}
+       </div>
+       <div class="panel candidate">
+               <section>
+                       <h3>{% trans %}Candidates{% endtrans %}</h3>
+                       <div class="grid">
+                               {% if session.applications is null %}
+                                       <section class="cell">
                                                {% trans %}None{% endtrans %}
-                                       {% else %}
-                                               {% for application in session.applications %}
-                                                       <dl class="cell">
-                                                               <dt><h4><a href="{{ path('rapsys_air_user_view', {'id': application.user.id} ) }}">{{ application.user.title }}</a></h4></dt>
+                                       </section>
+                               {% else %}
+                                       {% for application in session.applications %}
+                                               <section class="cell">
+                                                       <h4><a href="{{ path('rapsys_air_user_view', {'id': application.user.id} ) }}">{{ application.user.title }}</a></h4>
+                                                       <dl>
+                                                               <dt>{% trans %}Score{% endtrans %}</dt>
                                                                <dd>
-                                                                       <dl>
-                                                                               <dt>{% trans %}Created{% endtrans %}</dt>
-                                                                               <dd>{{ application.created.format('Y-m-d H:i:s') }}</dd>
-                                                                       </dl>
-                                                                       <dl>
-                                                                               <dt>{% trans %}Updated{% endtrans %}</dt>
-                                                                               <dd>{{ application.updated.format('Y-m-d H:i:s') }}</dd>
-                                                                       </dl>
+                                                                       {% if application.score is null %}
+                                                                               {% trans %}None{% endtrans %}
+                                                                       {% else %}
+                                                                               {{ application.score }}</dd>
+                                                                       {% endif %}
+                                                       </dl>
+                                                       <dl>
+                                                               <dt>{% trans %}Created{% endtrans %}</dt>
+                                                               <dd>{{ application.created.format('Y-m-d H:i:s') }}</dd>
+                                                       </dl>
+                                                       <dl>
+                                                               <dt>{% trans %}Updated{% endtrans %}</dt>
+                                                               <dd>{{ application.updated.format('Y-m-d H:i:s') }}</dd>
+                                                       </dl>
+                                                       <dl>
+                                                               <dt>{% trans %}Canceled{% endtrans %}</dt>
+                                                               <dd>
+                                                                       {% if application.canceled is null %}
+                                                                               {% trans %}None{% endtrans %}
+                                                                       {% else %}
+                                                                               {{ application.canceled.format('Y-m-d H:i:s') }}
+                                                                       {% endif %}
                                                                </dd>
                                                        </dl>
-                                               {% endfor %}
-                                       {% endif %}
-                               </div>
+                                               </section>
+                                       {% endfor %}
+                               {% endif %}
                        </div>
                </section>
-               {{ include('@RapsysAir/form/_toolbox.html.twig') }}
-       </section>
+       </div>
 </section>
 {% endblock %}