diff --git a/app/assets/stylesheets/errbit.css b/app/assets/stylesheets/errbit.css
index 46bea72..61aff8b 100644
--- a/app/assets/stylesheets/errbit.css
+++ b/app/assets/stylesheets/errbit.css
@@ -841,18 +841,30 @@ table.comment tbody th {
height: 20px;
line-height: 0.5em;
}
-table.comment tbody th img {
- float: right;
+table.comment th span, table.comment th img {
+ vertical-align: middle;
+}
+table.comment th span.comment-info {
+ line-height: 21px;
}
+table.comment img.gravatar {
+ margin-right: 7px;
+}
+
table.comment tbody td {
background-color: #F9F9F9;
}
#content-comments a.destroy-comment {
color: #EE0000;
margin-right: 5px;
+ margin-top: 2px;
+ font-size: 21px;
+ line-height: 1;
+ float: right;
}
#content-comments a.destroy-comment:hover {
text-decoration: none;
+ color: #AA0000;
}
#content-comments #comment_submit {
margin-top: 15px;
diff --git a/app/helpers/errs_helper.rb b/app/helpers/errs_helper.rb
index 7cbf79c..f6a0813 100644
--- a/app/helpers/errs_helper.rb
+++ b/app/helpers/errs_helper.rb
@@ -16,9 +16,9 @@ module ErrsHelper
def gravatar_tag(email, options = {})
default_options = {
- :s => Errbit::Config.gravatar_size,
:d => Errbit::Config.gravatar_default,
- :alt => email
+ :alt => email,
+ :class => 'gravatar'
}
options.reverse_merge! default_options
params = options.extract!(:s, :d).delete_if { |k, v| v.blank? }
diff --git a/app/views/errs/show.html.haml b/app/views/errs/show.html.haml
index c127e67..bb5a5dd 100644
--- a/app/views/errs/show.html.haml
+++ b/app/views/errs/show.html.haml
@@ -28,11 +28,12 @@
%table.comment
%tr
%th
- %span= link_to '✘'.html_safe, app_err_comment_path(@app, @problem, comment), :method => :delete, :data => { :confirm => "Are sure you don't need this comment?" }, :class => "destroy-comment"
- = time_ago_in_words(comment.created_at, true) << " ago by "
- = link_to comment.user.email, user_path(comment.user)
- if Errbit::Config.use_gravatar
- = gravatar_tag comment.user.email
+ = gravatar_tag comment.user.email, :s => 24
+ %span.comment-info
+ = time_ago_in_words(comment.created_at, true) << " ago by "
+ = link_to comment.user.email, user_path(comment.user)
+ %span.delete= link_to '✘'.html_safe, app_err_comment_path(@app, @problem, comment), :method => :delete, :data => { :confirm => "Are sure you don't need this comment?" }, :class => "destroy-comment"
%tr
%td= comment.body.gsub("\n", "
").html_safe
- if Errbit::Config.allow_comments_with_issue_tracker || !@app.issue_tracker_configured?
diff --git a/config/config.example.yml b/config/config.example.yml
index 1ab3407..86eb03f 100644
--- a/config/config.example.yml
+++ b/config/config.example.yml
@@ -40,9 +40,7 @@ user_has_username: false
allow_comments_with_issue_tracker: true
# Enable Gravatar.
-use_gravatar: false
-# Default Gravatar size.
-gravatar_size: 40
+use_gravatar: true
# Default Gravatar image, can be: mm, identicon, monsterid, wavatar, retro.
gravatar_default: identicon
diff --git a/config/initializers/_load_config.rb b/config/initializers/_load_config.rb
index 1fca55e..c92ee0b 100644
--- a/config/initializers/_load_config.rb
+++ b/config/initializers/_load_config.rb
@@ -15,7 +15,6 @@ unless defined?(Errbit::Config)
Errbit::Config.allow_comments_with_issue_tracker = ENV['ERRBIT_ALLOW_COMMENTS_WITH_ISSUE_TRACKER']
Errbit::Config.use_gravatar = ENV['ERRBIT_USE_GRAVATAR']
- Errbit::Config.gravatar_size = ENV['ERRBIT_GRAVATAR_SIZE']
Errbit::Config.gravatar_default = ENV['ERRBIT_GRAVATAR_DEFAULT']
Errbit::Config.github_authentication = ENV['GITHUB_AUTHENTICATION']
diff --git a/spec/helpers/errs_helper_spec.rb b/spec/helpers/errs_helper_spec.rb
index 3f71084..1b508bc 100644
--- a/spec/helpers/errs_helper_spec.rb
+++ b/spec/helpers/errs_helper_spec.rb
@@ -18,7 +18,6 @@ describe ErrsHelper do
context "default config" do
before do
Errbit::Config.stub(:use_gravatar).and_return(true)
- Errbit::Config.stub(:gravatar_size).and_return(48)
Errbit::Config.stub(:gravatar_default).and_return('identicon')
end
@@ -27,11 +26,6 @@ describe ErrsHelper do
helper.gravatar_tag(email).should eq(expected)
end
- it "should override :s" do
- expected = "
"
- helper.gravatar_tag(email, :s => 64).should eq(expected)
- end
-
it "should override :d" do
expected = "
"
helper.gravatar_tag(email, :d => 'retro').should eq(expected)
--
libgit2 0.21.2