Commit 695f845262845eb752c14205acff4e78afce0d11
- Date: Tue Mar 25 15:44:01 +0000 2008
- Committer: David A. Cuadrado (krawek@gmail.com)
- Author: David A. Cuadrado (krawek@gmail.com)
- Commit SHA1: 695f845262845eb752c14205acff4e78afce0d11
- Tree SHA1: 51cbd215fc967b67f24f1acd47bed8ec7537acba
gravatar frame (style copied from patcito's repository)
Commit diff
| |   |
| 70 | 70 | image_tag(gravatar_url_for(email, options), image_options) |
| 71 | 71 | end |
| 72 | 72 | |
| 73 | def gravatar_frame(email, options = {}) |
| 74 | %@<div class="gravatar">#{gravatar(email, options)}</div>@ |
| 75 | end |
| 76 | |
| 73 | 77 | def flashes |
| 74 | 78 | flash.map { |type, content| content_tag(:div, content_tag(:p, content), :class => "flash_message #{type}")} |
| 75 | 79 | end |
| toggle raw diff |
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -70,6 +70,10 @@ module ApplicationHelper
image_tag(gravatar_url_for(email, options), image_options)
end
+ def gravatar_frame(email, options = {})
+ %@<div class="gravatar">#{gravatar(email, options)}</div>@
+ end
+
def flashes
flash.map { |type, content| content_tag(:div, content_tag(:p, content), :class => "flash_message #{type}")}
end |
| |   |
| 8 | 8 | project_repository_commit_path(@project, @repository, commit.id) -%></a> |
| 9 | 9 | by <strong><%=h commit.committer.name -%></strong><small> <%= user ? "[#{link_to user.login, user_path(user)}]" : "" -%></small> <%=h time_ago_in_words(commit.committed_date) -%> ago |
| 10 | 10 | </div> |
| 11 | | <div style="float: left; width: 5%;"> <%= gravatar(commit.committer.email, :size => 32) %></div> |
| 11 | <%= gravatar_frame(commit.committer.email, :size => 32) %> |
| 12 | 12 | <div class="commit_message"> <%= simple_format(h(commit.message)) -%></div> |
| 13 | 13 | |
| 14 | 14 | </li> |
| toggle raw diff |
--- a/app/views/logs/_log.html.erb
+++ b/app/views/logs/_log.html.erb
@@ -8,7 +8,7 @@
project_repository_commit_path(@project, @repository, commit.id) -%></a>
by <strong><%=h commit.committer.name -%></strong><small> <%= user ? "[#{link_to user.login, user_path(user)}]" : "" -%></small> <%=h time_ago_in_words(commit.committed_date) -%> ago
</div>
- <div style="float: left; width: 5%;"> <%= gravatar(commit.committer.email, :size => 32) %></div>
+ <%= gravatar_frame(commit.committer.email, :size => 32) %>
<div class="commit_message"> <%= simple_format(h(commit.message)) -%></div>
</li> |
| |   |
| 50 | 50 | <%= link_to h(repos.name), project_repository_path(@project, repos) -%> |
| 51 | 51 | </td> |
| 52 | 52 | <td> |
| 53 | | <%= gravatar(repos.user.email, :size => 16) %> |
| 53 | <%= gravatar_frame(repos.user.email, :size => 16) %> |
| 54 | 54 | <%= link_to h(repos.user.login), user_path(repos.user) -%> |
| 55 | 55 | </td> |
| 56 | 56 | <td> |
| toggle raw diff |
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -50,7 +50,7 @@
<%= link_to h(repos.name), project_repository_path(@project, repos) -%>
</td>
<td>
- <%= gravatar(repos.user.email, :size => 16) %>
+ <%= gravatar_frame(repos.user.email, :size => 16) %>
<%= link_to h(repos.user.login), user_path(repos.user) -%>
</td>
<td> |
| |   |
| 443 | 443 | } |
| 444 | 444 | |
| 445 | 445 | .commit_message a { |
| 446 | | color: #000; |
| 446 | color: #000; |
| 447 | } |
| 448 | |
| 449 | .gravatar { |
| 450 | background-color: white; |
| 451 | border: 1px solid #CCCCCC; |
| 452 | float: left; |
| 453 | margin-right: 1.0em; |
| 454 | padding: 2px; |
| 447 | 455 | } |
| 448 | 456 | |
| 449 | 457 | ul.project_list li { |
| toggle raw diff |
--- a/public/stylesheets/base.css
+++ b/public/stylesheets/base.css
@@ -443,7 +443,15 @@ small.commit_message {
}
.commit_message a {
- color: #000;
+ color: #000;
+}
+
+.gravatar {
+ background-color: white;
+ border: 1px solid #CCCCCC;
+ float: left;
+ margin-right: 1.0em;
+ padding: 2px;
}
ul.project_list li { |
| |   |
| 25 | 25 | end |
| 26 | 26 | end |
| 27 | 27 | |
| 28 | | if ::Dispatcher.respond_to?(:cleanup_application) |
| 29 | | ::Dispatcher.cleanup_application |
| 28 | if ActionController.const_defined?(:Dispatcher) |
| 29 | dispatcher = ::ActionController::Dispatcher.new($stdout) |
| 30 | dispatcher.cleanup_application(true) |
| 30 | 31 | elsif ::Dispatcher.respond_to?(:reset_application!) |
| 31 | 32 | ::Dispatcher.reset_application! |
| 33 | else |
| 34 | raise "Application reloading failed" |
| 32 | 35 | end |
| 33 | 36 | ::Dependencies.mechanism = :load |
| 34 | 37 | require_dependency('application.rb') unless Object.const_defined?(:ApplicationController) |
| toggle raw diff |
--- a/script/spec_server
+++ b/script/spec_server
@@ -25,10 +25,13 @@ module Spec
end
end
- if ::Dispatcher.respond_to?(:cleanup_application)
- ::Dispatcher.cleanup_application
+ if ActionController.const_defined?(:Dispatcher)
+ dispatcher = ::ActionController::Dispatcher.new($stdout)
+ dispatcher.cleanup_application(true)
elsif ::Dispatcher.respond_to?(:reset_application!)
::Dispatcher.reset_application!
+ else
+ raise "Application reloading failed"
end
::Dependencies.mechanism = :load
require_dependency('application.rb') unless Object.const_defined?(:ApplicationController) |