Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% extends "AdonisLifestyleVeniceContestBundle:Shared:base.html.twig" %}
- {% block content %}
- <div id="page-wrapper">
- <div class="page-header">
- <h1>Contests</h1>
- </div>
- <div class="row">
- <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
- {% if app.user is not null %}
- <table id="contests-table" class="table table-striped table-bordered">
- <thead>
- <tr>
- <th>Contest</th>
- <th>Start</th>
- <th>Sign up to</th>
- <th>End</th>
- <th>Deadline</th>
- <th></th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- {% for contest in contests %}
- <tr>
- <td><a href="{{ path('contest_contest', {'path': contest.path}) }}">{{ contest.name }}</a></td>
- <td>{{ contest.start|date("m/d/Y") }}</td>
- <td>{{ contest.signUpTo|date("m/d/Y") }}</td>
- <td>{{ contest.end|date("m/d/Y") }}</td>
- <td>{{ contest.deadline|date("m/d/Y") }}</td>
- <td>
- {% if contest.canJoin %}
- <a href="{{ path("input_new", {"id": contest.id}) }}">
- <button type="button" class="btn btn-primary">Join Contest</button>
- </a>
- {% else %}
- {% if contest.userInParticipants(app.user.username) %}
- You are already participating
- {% else %}
- <span style="color: red">You cannot join this contest</span>
- {% endif %}
- {% endif %}
- </td>
- <td>
- <a href="{{ path('contest_contest', {'path': contest.path}) }}">
- <button type="button" class="btn btn-primary">Details</button>
- </a>
- </td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- {% else %}
- {% include '::loginCheck.html.twig' %}
- {% endif %}
- </div>
- </div>
- </div>
- {% endblock %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement