Skip to content

Commit

Permalink
Homework list page improvements (#15)
Browse files Browse the repository at this point in the history
- Movie titles are now linked to the movie page
- Marks are displayed when homeworks are completed
  • Loading branch information
ptitoliv committed Jun 12, 2016
1 parent 075bfe6 commit eabb7b0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cineapp/templates/list_homeworks.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ <h1 class="text-center">Mes devoirs</h1>
</tr>
{% for cur_homework in my_homeworks %}
<tr>
<td class="text-center">{{ cur_homework.movie.name }}</td>
<td class="text-center"><a href="{{ url_for('show_movie',movie_id=cur_homework.movie_id) }}">{{ cur_homework.movie.name }}</a></td>
<td class="text-center">{{ cur_homework.movie.director }}</td>
<td class="text-center">{{ cur_homework.homework_who_user.nickname }} </td>
{% if cur_homework.mark == None %}
<td class="text-center"><a class="btn btn-primary btn-xs" href="{{ url_for('mark_movie',movie_id_form=cur_homework.movie.id) }}">Noter</a>
{% else %}
<td class="text-center"><a class="disabled btn btn-success btn-xs">Noté</a>
<td><strong>{{ cur_homework.mark }}</strong></td>
{% endif %}
</tr>
{% endfor %}
Expand All @@ -54,16 +54,14 @@ <h1 class="text-center">Devoirs donnés</h1>
</tr>
{% for cur_homework in given_homeworks %}
<tr>
<td class="text-center">{{ cur_homework.movie.name }}</td>
<td class="text-center"><a href="{{ url_for('show_movie',movie_id=cur_homework.movie_id) }}">{{ cur_homework.movie.name }}</a></td>
<td class="text-center">{{ cur_homework.movie.director }}</td>
<td class="text-center">{{ cur_homework.user.nickname }} </td>
{% if cur_homework.mark == None %}
<td class="text-center"><a class="disabled btn btn-warning btn-xs">En cours</a>
{% else %}
<td class="text-center"><a class="disabled btn btn-success btn-xs">Terminé</a>
<td><strong>{{ cur_homework.mark }}</strong></td>
{% endif %}


</tr>
{% endfor %}
</table>
Expand Down

0 comments on commit eabb7b0

Please sign in to comment.