Added custom fields in issue related mail notifications.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@822 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2007-10-10 19:43:54 +00:00
parent 5f10cc8673
commit 38f540a701
4 changed files with 20 additions and 6 deletions

View File

@ -18,6 +18,7 @@
class Mailer < ActionMailer::Base
helper ApplicationHelper
helper IssuesHelper
helper CustomFieldsHelper
def account_information(user, password)
set_language_if_valid user.language

View File

@ -59,6 +59,8 @@ class Version < ActiveRecord::Base
@wiki_page
end
def to_s; name end
# Versions are sorted by effective_date
# Those with no effective_date are at the end, sorted by name
def <=>(version)

View File

@ -2,9 +2,15 @@
<%= issue.subject %>
<ul>
<li><%=l(:field_author)%>: <%= issue.author.name %></li>
<li><%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %></li>
<li><%=l(:field_status)%>: <%= issue.status.name %></li>
<li><%=l(:field_author)%>: <%= issue.author %></li>
<li><%=l(:field_status)%>: <%= issue.status %></li>
<li><%=l(:field_priority)%>: <%= issue.priority %></li>
<li><%=l(:field_assigned_to)%>: <%= issue.assigned_to %></li>
<li><%=l(:field_category)%>: <%= issue.category %></li>
<li><%=l(:field_fixed_version)%>: <%= issue.fixed_version %></li>
<% issue.custom_values.each do |c| %>
<li><%= c.custom_field.name %>: <%= show_value(c) %></li>
<% end %>
</ul>
<%= textilizable(issue.description) %>

View File

@ -1,8 +1,13 @@
<%= "#{issue.tracker.name} ##{issue.id}: #{issue.subject}" %>
<%= url_for :only_path => false, :host => Setting.host_name, :controller => 'issues', :action => 'show', :id => issue %>
<%=l(:field_author)%>: <%= issue.author.name %>
<%=l(:field_assigned_to)%>: <%= issue.assigned_to ? issue.assigned_to.name : "-" %>
<%=l(:field_status)%>: <%= issue.status.name %>
<%=l(:field_author)%>: <%= issue.author %>
<%=l(:field_status)%>: <%= issue.status %>
<%=l(:field_priority)%>: <%= issue.priority %>
<%=l(:field_assigned_to)%>: <%= issue.assigned_to %>
<%=l(:field_category)%>: <%= issue.category %>
<%=l(:field_fixed_version)%>: <%= issue.fixed_version %>
<% issue.custom_values.each do |c| %><%= c.custom_field.name %>: <%= show_value(c) %>
<% end %>
<%= issue.description %>