Albirew/nyaa-pantsu
Archivé
1
0
Bifurcation 0

change name of variable used in comment loop for clarity purposes

Cette révision appartient à :
kilo 2017-11-09 18:28:38 +01:00 révisé par GitHub
Parent 7fe94d7fea
révision 637530e3ef
Aucune clé n'a été trouvée pour cette signature dans la base de données
ID de la clé GPG: 4AEE18F83AFDEB23

Voir le fichier

@ -212,23 +212,23 @@
{{idx := 1}}
{{previousComment := ""}}
{{previousUser := 0}}
{{range index, element := Torrent.Comments}}
{{if previousComment != element.Content || previousUser != element.UserID || element.UserID == 0}}
{{range _, comment := Torrent.Comments}}
{{if previousComment != comment.Content || previousUser != comment.UserID || comment.UserID == 0}}
<div class="torrent-info-box comment-box">
<span class="comment-index">
<a href="#comment_{{idx}}">{{idx}}</a>
<small style="padding-left: 4px;" class="date-full">{{formatDate(element.Date, false)}}</small>
<small style="padding-left: 4px;" class="date-full">{{formatDate(comment.Date, false)}}</small>
</span>
<span class="comment-userinfo"><img src="{{ getAvatar(element.UserAvatar, 50) }}"/>
{{if element.UserID > 0}}<a href="/user/{{element.UserID}}/{{element.Username}}" class="comment-user">{{element.Username}}</a>{{if element.UserStatus != ""}}<span class="user-status">{{T(element.UserStatus)}}</span>{{end}}{{else}}
<span class="comment-userinfo"><img src="{{ getAvatar(comment.UserAvatar, 50) }}"/>
{{if comment.UserID > 0}}<a href="/user/{{comment.UserID}}/{{comment.Username}}" class="comment-user">{{comment.Username}}</a>{{if comment.UserStatus != ""}}<span class="user-status">{{T(comment.UserStatus)}}</span>{{end}}{{else}}
<span class="comment-user">れんちょん</span>{{end}}
</span>
<div class="comment-content">{{element.Content|raw}}</div>
<div class="comment-content">{{comment.Content|raw}}</div>
</div>
{{idx = idx + 1}}
{{end}}
{{previousComment = element.Content}}
{{previousUser = element.UserID}}
{{previousComment = comment.Content}}
{{previousUser = comment.UserID}}
{{end}}
{{ if len(Torrent.Comments) == 0 }}
<p id="no-comment-message">{{ T("torrent_no_comments") }}</p>