|
8 | 8 | <div class="card"> |
9 | 9 | <div class="card-body"> |
10 | 10 | <div class="card-text"> |
11 | | - {% for team in teams.all %} |
12 | | - |
13 | | - <div class="card mb-2"> |
14 | | - <div class="card-body"> |
15 | | - <div class="card-title">{{team.display_name}}</div> |
16 | | - <div class="card-text"> |
| 11 | + {% if teams.all %} |
| 12 | + {% for team in teams.all %} |
| 13 | + |
| 14 | + <div class="card mb-2"> |
| 15 | + <div class="card-body"> |
| 16 | + <div class="card-title">{{team.display_name}}</div> |
| 17 | + <div class="card-text"> |
17 | 18 |
|
18 | | - {% if team.project %} |
19 | | - {% with judge_scores=team.project.scores.all|filter_judge_scores:request.user %} |
20 | | - <div class="row"> |
21 | | - <div class="col-md-12 col-lg-10 team-scores"> |
22 | | - {% if judge_scores %} |
23 | | - |
24 | | - {% for score in judge_scores %} |
25 | | - {% if forloop.counter > 1 %} / {% endif %} |
26 | | - {{score.hack_project_score_category}}: <strong>{{score.score}}</strong> |
27 | | - {% endfor %} |
28 | | - {% else %} |
29 | | - No scores submitted yet. |
30 | | - {% endif %} |
| 19 | + {% if team.project %} |
| 20 | + {% with judge_scores=team.project.scores.all|filter_judge_scores:request.user %} |
| 21 | + <div class="row"> |
| 22 | + <div class="col-md-12 col-lg-10 team-scores"> |
| 23 | + {% if judge_scores %} |
| 24 | + |
| 25 | + {% for score in judge_scores %} |
| 26 | + {% if forloop.counter > 1 %} / {% endif %} |
| 27 | + {{score.hack_project_score_category}}: <strong>{{score.score}}</strong> |
| 28 | + {% endfor %} |
| 29 | + {% else %} |
| 30 | + No scores submitted yet. |
| 31 | + {% endif %} |
| 32 | + </div> |
| 33 | + <div class="col-md-12 col-lg-2"> |
| 34 | + {% if judge_scores %} |
| 35 | + <a role="button" class="btn btn-secondary btn-sm mt-2" href="/hackathon/{{team.hackathon.id}}/team/{{team.id}}/judging/?next=hackathon:judge_teams">Change Score</a> |
| 36 | + {% else %} |
| 37 | + <a role="button" class="btn btn-success btn-sm mt-2" href="/hackathon/{{team.hackathon.id}}/team/{{team.id}}/judging/?next=hackathon:judge_teams">Score Team</a> |
| 38 | + {% endif %} |
| 39 | + </div> |
31 | 40 | </div> |
32 | | - <div class="col-md-12 col-lg-2"> |
33 | | - {% if judge_scores %} |
34 | | - <a role="button" class="btn btn-secondary btn-sm mt-2" href="/hackathon/{{team.hackathon.id}}/team/{{team.id}}/judging/?next=hackathon:judge_teams">Change Score</a> |
35 | | - {% else %} |
36 | | - <a role="button" class="btn btn-success btn-sm mt-2" href="/hackathon/{{team.hackathon.id}}/team/{{team.id}}/judging/?next=hackathon:judge_teams">Score Team</a> |
37 | | - {% endif %} |
38 | | - </div> |
39 | | - </div> |
40 | | - {% endwith %} |
41 | | - {% else %} |
42 | | - <p> |
43 | | - This team has not submitted a project. |
44 | | - </p> |
45 | | - {% endif %} |
46 | | - |
| 41 | + {% endwith %} |
| 42 | + {% else %} |
| 43 | + <p> |
| 44 | + This team has not submitted a project. |
| 45 | + </p> |
| 46 | + {% endif %} |
| 47 | + |
| 48 | + </div> |
47 | 49 | </div> |
48 | 50 | </div> |
49 | | - </div> |
50 | | - {% endfor %} |
| 51 | + {% endfor %} |
| 52 | + {% else %} |
| 53 | + <p> |
| 54 | + Nothing to judge yet. Teams have not been assigned. |
| 55 | + </p> |
| 56 | + <p class="mb-0"> |
| 57 | + <a href="{% url "hackathon:view_hackathon" hackathon_id=hackathon.id %}" |
| 58 | + class="ci-link">Back To Hackathon</a> |
| 59 | + </p> |
| 60 | + {% endif %} |
51 | 61 | </div> |
52 | 62 | </div> |
53 | 63 | </div> |
|
0 commit comments