]> Raphaƫl G. Git Repositories - airbundle/blobdiff - Resources/views/session/edit.html.twig
Set synchronized as not nullable
[airbundle] / Resources / views / session / edit.html.twig
index 5751cc9acce55586a99d3dcdc380ca8ecd58d1ff..6a9abfb2891f4ea089a832d01e421322d0511850 100644 (file)
@@ -1,50 +1,60 @@
 {% extends '@RapsysAir/body.html.twig' %}
 {% block content %}
        <section id="form">
 {% extends '@RapsysAir/body.html.twig' %}
 {% block content %}
        <section id="form">
-               <h2>
-                       <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>
-               {% if form.modify is defined or form.raincancel is defined %}
+               <header>
+                       <h2>
+                               <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>
+                       <p>{{ description }}</p>
+               </header>
+               {% if form.modify is defined or form.move is defined or form.cancel is defined or form.raincancel is defined or form.forcecancel is defined or is_granted('ROLE_ADMIN') %}
                        {{ form_start(form) }}
                                {% if form.modify is defined %}
                        {{ form_start(form) }}
                                {% if form.modify is defined %}
-                                       {% if is_granted('ROLE_REGULAR') %}
-                                               <div>
-                                                       {{ form_row(form.begin) }}
-
-                                                       {{ form_row(form.length) }}
-
-                                                       {{ form_row(form.modify) }}
-                                               </div>
-                                       {% endif %}
-                                       {% if is_granted('ROLE_SENIOR') %}
-                                               <div class="dangerous">
-                                                       {{ form_row(form.location) }}
-
-                                                       {{ form_row(form.move) }}
-                                               </div>
-                                       {% endif %}
+                                       <div>
+                                               {{ form_row(form.begin) }}
+
+                                               {{ form_row(form.length) }}
+
+                                               {{ form_row(form.modify) }}
+                                       </div>
+                               {% endif %}
+                               {% if form.move is defined %}
+                                       <div class="dangerous">
+                                               {{ form_row(form.location) }}
+
+                                               {{ form_row(form.move) }}
+                                       </div>
+                               {% endif %}
+                               {% if form.cancel is defined or form.raincancel is defined or form.forcecancel is defined or is_granted('ROLE_ADMIN') %}
                                        <div class="mortal">
                                                {% if is_granted('ROLE_ADMIN') %}
                                                        {{ form_row(form.user) }}
                                                {% endif %}
 
                                        <div class="mortal">
                                                {% if is_granted('ROLE_ADMIN') %}
                                                        {{ form_row(form.user) }}
                                                {% endif %}
 
-                                               {{ form_row(form.cancel) }}
+                                               {% if form.cancel is defined %}
+                                                       {{ form_row(form.cancel) }}
+                                               {% endif %}
+
+                                               {% if form.raincancel is defined %}
+                                                       {{ form_row(form.raincancel) }}
+                                               {% endif %}
+
+                                               {% if form.forcecancel is defined %}
+                                                       {{ form_row(form.forcecancel) }}
+                                               {% endif %}
 
                                                {% if is_granted('ROLE_ADMIN') %}
 
                                                {% if is_granted('ROLE_ADMIN') %}
-                                                       {{ form_row(form.attribute) }}
+                                                       {% if form.attribute is defined %}
+                                                               {{ form_row(form.attribute) }}
 
 
-                                                       {{ form_row(form.autoattribute) }}
+                                                               {{ form_row(form.autoattribute) }}
+                                                       {% endif %}
 
                                                        {{ form_row(form.lock) }}
                                                {% endif %}
                                        </div>
 
                                                        {{ form_row(form.lock) }}
                                                {% endif %}
                                        </div>
-                               {% elseif form.raincancel is defined %}
-                                       <div>
-                                               {{ form_row(form.raincancel) }}
-                                       </div>
                                {% endif %}
                                {% endif %}
-
                                {# render csrf token etc .#}
                                <footer style="display:none">{{ form_rest(form) }}</footer>
                        {{ form_end(form) }}
                                {# render csrf token etc .#}
                                <footer style="display:none">{{ form_rest(form) }}</footer>
                        {{ form_end(form) }}