1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-23 00:50:00 +00:00

use enumerated index for comment anchors

This commit is contained in:
nyaadev 2017-05-23 02:59:31 +02:00
parent af61e5b1e9
commit f32d1a0c64

View file

@ -138,7 +138,7 @@
</h3> </h3>
</div> </div>
{% for comment in comments %} {% for comment in comments %}
<div class="panel panel-default comment-panel" id="com-{{ comment.id }}"> <div class="panel panel-default comment-panel" id="com-{{ loop.index }}">
<div class="panel-body"> <div class="panel-body">
<div class="col-md-2"> <div class="col-md-2">
<p> <p>
@ -151,7 +151,7 @@
</div> </div>
<div class="col-md-10"> <div class="col-md-10">
<div class="row"> <div class="row">
<a href="#com-{{ comment.id }}"><small>{{ comment.created_time | timesince }}</small></a> <a href="#com-{{ loop.index }}"><small>{{ comment.created_time | timesince }}</small></a>
{% if g.user.is_moderator or g.user.id == comment.user_id %} {% if g.user.is_moderator or g.user.id == comment.user_id %}
<form class="delete-comment-form" action="{{ url_for('delete_comment', torrent_id=torrent.id, comment_id=comment.id) }}" method="POST"> <form class="delete-comment-form" action="{{ url_for('delete_comment', torrent_id=torrent.id, comment_id=comment.id) }}" method="POST">
<button name="submit" type="submit" class="btn btn-danger btn-xs" title="Delete">Delete</button> <button name="submit" type="submit" class="btn btn-danger btn-xs" title="Delete">Delete</button>