Commit 6205e6c981bb2e34c0fc98e382678f409b36ef96

Authored by Antonio Terceiro
1 parent 5309907b

ActionItem934: saving more space on comments

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