Commit 6205e6c981bb2e34c0fc98e382678f409b36ef96

Authored by Antonio Terceiro
1 parent 5309907b

ActionItem934: saving more space on comments

app/views/content_viewer/_comment.rhtml
1 1 <%= content_tag('a', '', :name => comment.anchor) %>
2 2 <div class="article-comment<%= ' comment-from-owner' if ( comment.author && (@page.profile.name == comment.author.name) ) %> comment-logged-<%= comment.author ? 'in' : 'out' %>">
3   - <% if logged_in? && (user == @page.profile || user == comment.author || user.has_permission?(:moderate_comments, @page.profile)) %>
4   - <% button_bar(:style => 'float: right; margin-top: 0;') do %>
5   - <%= icon_button(:delete, _('Remove'), { :profile => params[:profile], :remove_comment => comment.id }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %>
6   - <% end %>
7   - <% end %>
8 3  
9 4 <% if comment.author %>
10 5 <%= link_to content_tag( 'span', comment.author.name() ), comment.author.url,
... ... @@ -19,12 +14,18 @@
19 14 %>
20 15 <% end %>
21 16  
  17 + <% if logged_in? && (user == @page.profile || user == comment.author || user.has_permission?(:moderate_comments, @page.profile)) %>
  18 + <% button_bar(:style => 'float: right; margin-top: 0;') do %>
  19 + <%= icon_button(:delete, _('Remove'), { :profile => params[:profile], :remove_comment => comment.id }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %>
  20 + <% end %>
  21 + <% end %>
  22 +
22 23 <h4><%= comment.title %></h4>
23 24 <div class="comment-info">
24 25 <%= _('By %{author} on %{date}') % {
25 26 :author => comment.author ? link_to(comment.author.name, comment.author.url) : content_tag('u', comment.name),
26 27 :date => show_time(comment.created_at) } %>
27   - <%= '<br/>' + _('(unauthenticated user)') if ! comment.author %>
  28 + <%= _('(unauthenticated user)') if ! comment.author %>
28 29 </div>
29 30 <div class="comment-text">
30 31 <p/>
... ...
public/stylesheets/article.css
... ... @@ -56,7 +56,7 @@
56 56 position: relative;
57 57 border: 1px solid #B8CFE7;
58 58 margin-bottom: 10px;
59   - padding: 10px;
  59 + padding: 4px;
60 60 }
61 61  
62 62 .comment-from-owner {
... ... @@ -67,6 +67,7 @@
67 67 #article .article-comment h4 {
68 68 font-size: 13px;
69 69 margin: 0px;
  70 + display: inline;
70 71 }
71 72  
72 73 .comment-picture {
... ... @@ -76,7 +77,7 @@
76 77 height: 50px;
77 78 background-repeat: no-repeat;
78 79 background-position: 50% 50%;
79   - margin: 0px 10px 0px 10px;
  80 + margin: 0px 4px 4px 4px;
80 81 float: right;
81 82 }
82 83 .comment-picture span {
... ... @@ -86,13 +87,14 @@
86 87 .comment-info {
87 88 font-size: 10px;
88 89 color: #999;
  90 + display: inline;
89 91 }
90 92 .comment-from-owner .comment-info {
91 93 color: #729FCF;
92 94 }
93 95  
94 96 .comment-text {
95   - font-size: 12px;
  97 + font-size: 11px;
96 98 clear: left;
97 99 }
98 100  
... ...