summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-17 16:51:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-05-17 16:51:09 +0000
commitd6789593597694e78c4b2c5f40fe63cef3c48002 (patch)
tree12de16a8916bf2289dec6baef2ed78d86cbe1890 /app
parent8bbc6d251e7a22ec9bf8877162035e30c247f418 (diff)
downloadredmine-d6789593597694e78c4b2c5f40fe63cef3c48002.tar.gz
redmine-d6789593597694e78c4b2c5f40fe63cef3c48002.zip
Add links to attachments in new issue email notification (#12293).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11853 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/views/layouts/mailer.html.erb3
-rw-r--r--app/views/mailer/_issue.html.erb9
-rw-r--r--app/views/mailer/_issue.text.erb7
3 files changed, 18 insertions, 1 deletions
diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb
index b100fe75d..46003e69d 100644
--- a/app/views/layouts/mailer.html.erb
+++ b/app/views/layouts/mailer.html.erb
@@ -12,13 +12,14 @@ h2, h3 { font-size: 1.1em; }
a, a:link, a:visited { color: #2A5685;}
a:hover, a:active { color: #c61a1a; }
a.wiki-anchor { display: none; }
+fieldset.attachments {border-width: 1px 0 0 0;}
hr {
width: 100%;
height: 1px;
background: #ccc;
border: 0;
}
-.footer {
+span.footer {
font-size: 0.8em;
font-style: italic;
}
diff --git a/app/views/mailer/_issue.html.erb b/app/views/mailer/_issue.html.erb
index 3d851d442..829f8d576 100644
--- a/app/views/mailer/_issue.html.erb
+++ b/app/views/mailer/_issue.html.erb
@@ -13,3 +13,12 @@
</ul>
<%= textilizable(issue, :description, :only_path => false) %>
+
+<% if issue.attachments.any? %>
+ <fieldset class="attachments"><legend><%= l(:label_attachment_plural) %></legend>
+ <% issue.attachments.each do |attachment| %>
+ <%= link_to_attachment attachment, :download => true, :only_path => false %>
+ (<%= number_to_human_size(attachment.filesize) %>)<br />
+ <% end %>
+ </fieldset>
+<% end %>
diff --git a/app/views/mailer/_issue.text.erb b/app/views/mailer/_issue.text.erb
index 427b6a890..554488049 100644
--- a/app/views/mailer/_issue.text.erb
+++ b/app/views/mailer/_issue.text.erb
@@ -11,3 +11,10 @@
<% end -%>
----------------------------------------
<%= issue.description %>
+
+<% if issue.attachments.any? -%>
+---<%= l(:label_attachment_plural).ljust(37, '-') %>
+<% issue.attachments.each do |attachment| -%>
+<%= attachment.filename %> (<%= number_to_human_size(attachment.filesize) %>)
+<% end -%>
+<% end -%>