change name of variable used in comment loop for clarity purposes
Cette révision appartient à :
Parent
7fe94d7fea
révision
637530e3ef
1 fichiers modifiés avec 8 ajouts et 8 suppressions
|
@ -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>
|
||||
|
|
Référencer dans un nouveau ticket