summaryrefslogtreecommitdiffstats
path: root/app/views/email_addresses/_index.html.erb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-17 14:14:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-01-17 14:14:12 +0000
commite3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189 (patch)
tree3b54c10eecece6cc2674491a76a4e5e932d82d1e /app/views/email_addresses/_index.html.erb
parent7f29c2fd88f271ac59f1c10b90942fec57b35ae2 (diff)
downloadredmine-e3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189.tar.gz
redmine-e3618bdbecd9b5d86eb6d2c8c256ba3fcdf05189.zip
Add support for multiple email addresses per user (#4244).
git-svn-id: http://svn.redmine.org/redmine/trunk@13886 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/email_addresses/_index.html.erb')
-rw-r--r--app/views/email_addresses/_index.html.erb26
1 files changed, 26 insertions, 0 deletions
diff --git a/app/views/email_addresses/_index.html.erb b/app/views/email_addresses/_index.html.erb
new file mode 100644
index 000000000..644cd759b
--- /dev/null
+++ b/app/views/email_addresses/_index.html.erb
@@ -0,0 +1,26 @@
+<% if @addresses.present? %>
+ <table class="list email_addresses">
+ <% @addresses.each do |address| %>
+ <tr class="<%= cycle("odd", "even") %>">
+ <td class="email"><%= address.address %></td>
+ <td class="buttons">
+ <%= toggle_email_address_notify_link(address) %>
+ <%= delete_link user_email_address_path(@user, address), :remote => true %>
+ </td>
+ </tr>
+ <% end %>
+ </table>
+<% end %>
+
+<% unless @addresses.size >= Setting.max_additional_emails.to_i %>
+ <div>
+ <%= form_for @address, :url => user_email_addresses_path(@user), :remote => true do |f| %>
+ <p><%= l(:label_email_address_add) %></p>
+ <%= error_messages_for @address %>
+ <p>
+ <%= f.text_field :address, :size => 40 %>
+ <%= submit_tag l(:button_add) %>
+ </p>
+ <% end %>
+ </div>
+<% end %>