Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 2.86 KB | None | 0 0
  1. {% extends "AdonisLifestyleVeniceContestBundle:Shared:base.html.twig" %}
  2.  
  3. {% block content %}
  4.     <div id="page-wrapper">
  5.         <div class="page-header">
  6.             <h1>Contests</h1>
  7.         </div>
  8.  
  9.         <div class="row">
  10.             <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
  11.                 {% if app.user is not null %}
  12.                 <table id="contests-table" class="table table-striped table-bordered">
  13.                     <thead>
  14.                         <tr>
  15.                             <th>Contest</th>
  16.                             <th>Start</th>
  17.                             <th>Sign up to</th>
  18.                             <th>End</th>
  19.                             <th>Deadline</th>
  20.                             <th></th>
  21.                             <th></th>
  22.                         </tr>
  23.                     </thead>
  24.                     <tbody>
  25.                         {% for contest in contests %}
  26.                             <tr>
  27.                                 <td><a href="{{ path('contest_contest', {'path': contest.path}) }}">{{ contest.name }}</a></td>
  28.                                 <td>{{ contest.start|date("m/d/Y") }}</td>
  29.                                 <td>{{ contest.signUpTo|date("m/d/Y") }}</td>
  30.                                 <td>{{ contest.end|date("m/d/Y") }}</td>
  31.                                 <td>{{ contest.deadline|date("m/d/Y") }}</td>
  32.                                 <td>
  33.                                     {% if contest.canJoin %}
  34.                                         <a href="{{ path("input_new", {"id": contest.id}) }}">
  35.                                             <button type="button" class="btn btn-primary">Join Contest</button>
  36.                                         </a>
  37.                                     {% else %}
  38.                                         {% if contest.userInParticipants(app.user.username) %}
  39.                                             You are already participating
  40.                                         {% else %}
  41.                                             <span style="color: red">You cannot join this contest</span>
  42.                                         {% endif %}
  43.                                     {% endif %}
  44.                                 </td>
  45.                                 <td>
  46.                                     <a href="{{ path('contest_contest', {'path': contest.path}) }}">
  47.                                         <button type="button" class="btn btn-primary">Details</button>
  48.                                     </a>
  49.                                 </td>
  50.                             </tr>
  51.                         {% endfor %}
  52.                     </tbody>
  53.                 </table>
  54.                 {% else %}
  55.                     {% include '::loginCheck.html.twig' %}
  56.                 {% endif %}
  57.             </div>
  58.         </div>
  59.     </div>
  60. {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement