summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2008-10-30 02:58:04 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2008-10-30 02:58:04 +0000
commited314caf7d6e871c214ac1896eaadcb5f5d21ed6 (patch)
treef05063af03cb962edfdd6d086aad6cc3ed2e2d1b /app/views
parent1399f3dd122f6145d66b912e72dc6186dff884bb (diff)
downloadredmine-ed314caf7d6e871c214ac1896eaadcb5f5d21ed6.tar.gz
redmine-ed314caf7d6e871c214ac1896eaadcb5f5d21ed6.zip
Gravatar support for issue detai, user grid, and activity stream
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1962 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/issues/_history.rhtml23
-rw-r--r--app/views/issues/show.rhtml23
-rw-r--r--app/views/projects/activity.rhtml5
-rw-r--r--app/views/users/list.rhtml2
4 files changed, 29 insertions, 24 deletions
diff --git a/app/views/issues/_history.rhtml b/app/views/issues/_history.rhtml
index b8efdb400..896e28027 100644
--- a/app/views/issues/_history.rhtml
+++ b/app/views/issues/_history.rhtml
@@ -1,14 +1,15 @@
<% reply_links = authorize_for('issues', 'edit') -%>
<% for journal in journals %>
- <div id="change-<%= journal.id %>" class="journal">
- <h4><div style="float:right;"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
- <%= content_tag('a', '', :name => "note-#{journal.indice}")%>
- <%= format_time(journal.created_on) %> - <%= journal.user.name %></h4>
- <ul>
- <% for detail in journal.details %>
- <li><%= show_detail(detail) %></li>
- <% end %>
- </ul>
- <%= render_notes(journal, :reply_links => reply_links) unless journal.notes.blank? %>
- </div>
+ <div id="change-<%= journal.id %>" class="journal">
+ <%= gravatar(journal.user.mail.blank? ? "" : journal.user.mail, :size => "48") %>
+ <h4><div style="float:right;"><%= link_to "##{journal.indice}", :anchor => "note-#{journal.indice}" %></div>
+ <%= content_tag('a', '', :name => "note-#{journal.indice}")%>
+ <%= format_time(journal.created_on) %> - <%= journal.user.name %></h4>
+ <ul>
+ <% for detail in journal.details %>
+ <li><%= show_detail(detail) %></li>
+ <% end %>
+ </ul>
+ <%= render_notes(journal, :reply_links => reply_links) unless journal.notes.blank? %>
+ </div>
<% end %>
diff --git a/app/views/issues/show.rhtml b/app/views/issues/show.rhtml
index 463fa6960..88fa1df3d 100644
--- a/app/views/issues/show.rhtml
+++ b/app/views/issues/show.rhtml
@@ -10,6 +10,7 @@
<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
<div class="issue <%= "status-#{@issue.status.position} priority-#{@issue.priority.position}" %>">
+ <%= gravatar(@issue.author.mail, :size => "64") %>
<h3><%=h @issue.subject %></h3>
<p class="author">
<%= authoring @issue.created_on, @issue.author %>.
@@ -18,28 +19,28 @@
<table width="100%">
<tr>
- <td style="width:15%"><b><%=l(:field_status)%>:</b></td><td style="width:35%"><%= @issue.status.name %></td>
- <td style="width:15%"><b><%=l(:field_start_date)%>:</b></td><td style="width:35%"><%= format_date(@issue.start_date) %></td>
+ <td style="width:15%" class="status"><b><%=l(:field_status)%>:</b></td><td style="width:35%" class="status status-<%= @issue.status.name %>"><%= @issue.status.name %></td>
+ <td style="width:15%" class="start-date"><b><%=l(:field_start_date)%>:</b></td><td style="width:35%"><%= format_date(@issue.start_date) %></td>
</tr>
<tr>
- <td><b><%=l(:field_priority)%>:</b></td><td><%= @issue.priority.name %></td>
- <td><b><%=l(:field_due_date)%>:</b></td><td><%= format_date(@issue.due_date) %></td>
+ <td class="priority"><b><%=l(:field_priority)%>:</b></td><td class="priority priority-<%= @issue.priority.name %>"><%= @issue.priority.name %></td>
+ <td class="due-date"><b><%=l(:field_due_date)%>:</b></td><td class="due-date"><%= format_date(@issue.due_date) %></td>
</tr>
<tr>
- <td><b><%=l(:field_assigned_to)%>:</b></td><td><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
- <td><b><%=l(:field_done_ratio)%>:</b></td><td><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
+ <td class="assigned-to"><b><%=l(:field_assigned_to)%>:</b></td><td><%= gravatar(@issue.assigned_to.mail, :size => "24") %><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
+ <td class="progress"><b><%=l(:field_done_ratio)%>:</b></td><td class="progress"><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td>
</tr>
<tr>
- <td><b><%=l(:field_category)%>:</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
+ <td class="category"><b><%=l(:field_category)%>:</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
<% if User.current.allowed_to?(:view_time_entries, @project) %>
- <td><b><%=l(:label_spent_time)%>:</b></td>
- <td><%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}, :class => 'icon icon-time') : "-" %></td>
+ <td class="spent-time"><b><%=l(:label_spent_time)%>:</b></td>
+ <td class="spent-hours"><%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}, :class => 'icon icon-time') : "-" %></td>
<% end %>
</tr>
<tr>
- <td><b><%=l(:field_fixed_version)%>:</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
+ <td class="fixed-version"><b><%=l(:field_fixed_version)%>:</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
<% if @issue.estimated_hours %>
- <td><b><%=l(:field_estimated_hours)%>:</b></td><td><%= lwr(:label_f_hour, @issue.estimated_hours) %></td>
+ <td class="estimated-hours"><b><%=l(:field_estimated_hours)%>:</b></td><td><%= lwr(:label_f_hour, @issue.estimated_hours) %></td>
<% end %>
</tr>
<tr>
diff --git a/app/views/projects/activity.rhtml b/app/views/projects/activity.rhtml
index fa25812ac..47d32e6a3 100644
--- a/app/views/projects/activity.rhtml
+++ b/app/views/projects/activity.rhtml
@@ -6,7 +6,10 @@
<h3><%= format_activity_day(day) %></h3>
<dl>
<% @events_by_day[day].sort {|x,y| y.event_datetime <=> x.event_datetime }.each do |e| -%>
- <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
+ <dt class="<%= e.event_type %> <%= User.current.logged? && e.respond_to?(:event_author) && User.current == e.event_author ? 'me' : nil %>">
+ <%= gravatar(e.user.mail, :size => "24") if e.respond_to?(:user) rescue nil%>
+ <%= gravatar(e.author.mail, :size => "24") if e.respond_to?(:author) rescue nil%>
+ <%= gravatar(e.committer.match('\\<.+?\\>')[0].gsub(/[<>]/, ''), :size => "24") if e.respond_to?(:committer) rescue nil%>
<span class="time"><%= format_time(e.event_datetime, false) %></span>
<%= content_tag('span', h(e.project), :class => 'project') if @project.nil? || @project != e.project %>
<%= link_to format_activity_title(e.event_title), e.event_url %></dt>
diff --git a/app/views/users/list.rhtml b/app/views/users/list.rhtml
index c41563759..945c9926c 100644
--- a/app/views/users/list.rhtml
+++ b/app/views/users/list.rhtml
@@ -29,7 +29,7 @@
<tbody>
<% for user in @users -%>
<tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>">
- <td class="username"><%= link_to h(user.login), :action => 'edit', :id => user %></td>
+ <td class="username"><%= gravatar(user.mail, :size => "24") %><%= link_to h(user.login), :action => 'edit', :id => user %></td>
<td class="firstname"><%= h(user.firstname) %></td>
<td class="lastname"><%= h(user.lastname) %></td>
<td class="email"><%= mail_to(h(user.mail)) %></td>