_comment.rhtml
1.9 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
34
35
36
37
38
39
40
41
42
43
44
<%= content_tag('a', '', :name => comment.anchor) %>
<div class="article-comment<%= ' comment-from-owner' if ( comment.author && (@page.profile.name == comment.author.name) ) %> comment-logged-<%= comment.author ? 'in' : 'out' %>">
<% if logged_in? && (user == @page.profile || user == comment.author || user.has_permission?(:moderate_comments, @page.profile)) %>
<% button_bar(:style => 'float: right; margin-top: 0px;') do %>
<%= icon_button(:delete, _('Remove this comment'), { :profile => params[:profile], :remove_comment => comment.id, :view => params[:view] }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %>
<% end %>
<% end %>
<% if comment.author %>
<%= link_to content_tag( 'span', comment.author.short_name, :class => 'comment-info' ), comment.author.url,
:class => 'comment-picture',
:style => 'background-image:url(%s)' % profile_icon(comment.author, :minor)
%>
<% else %>
<%# unauthenticated user: display gravatar icon %>
<%= content_tag 'span', content_tag('span', comment.name + '<br/>'+ _('(unauthenticated user)'), :class => 'comment-info'),
:class => 'comment-picture',
:style => 'background-image:url(%s)' % str_gravatar_url_for( comment.email, :size => 50 )
%>
<% end %>
<div class='comment-wrapper-1'>
<div class='comment-wrapper-2'>
<div class='comment-wrapper-3'>
<div class='comment-wrapper-4'>
<div class='comment-wrapper-5'>
<div class='comment-wrapper-6'>
<div class='comment-wrapper-7'>
<div class='comment-wrapper-8'>
<div class="comment-details">
<div class="comment-created-at">
<%= show_time(comment.created_at) %>
</div>
<h4><%= comment.title %></h4>
<div class="comment-text">
<p/>
<%= txt2html comment.body %>
</div>
</div>
</div></div></div></div>
</div></div></div></div>
<br style='clear: both'/>
</div>