-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy path_comments.html.haml
More file actions
33 lines (33 loc) · 1.25 KB
/
_comments.html.haml
File metadata and controls
33 lines (33 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
%h2
Vos derniers commentaires
- if @comments.empty?
%p
Vous n’avez posté aucun commentaire
- else
- if @self_answer
= link_to "Ne pas inclure les réponses à mes commentaires", self: nil
-else
= link_to "Inclure les réponses à mes commentaires", self: "1"
%br
.table_container
%table#my_comments
%tr
%th.left Fil initiateur
%th.left Sujet du commentaire
%th.left Date
%th.number Note
%th.number <abbr title="Nombre de réponses">Rép.</abbr>
%th.left Dernière réponse
- @comments.each do |comment|
- next if comment.node.nil?
- answer = comment.latest_answer
%tr
%td #{translate_content_type comment.content_type} : #{link_to_content comment.content}
%td= link_to comment.title, path_for_content(comment.node.content) + "#comment-#{comment.id}"
%td.date= comment.created_at.to_s(:posted)
%td.number= comment.bound_score
%td.number
- if answer && !answer.read_by?(current_account)
= image_tag "/images/icones/comment.png", alt: "Nouveaux commentaires !", class: "thread-new-comments"
= comment.nb_answers
%td.date= answer ? answer.created_at.to_s(:posted) : " "