Adding user email feature

This commit is contained in:
2013-10-06 04:09:56 -07:00
parent 04bab84293
commit 57e6ac1fc5
6 changed files with 72 additions and 12 deletions

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
</head>
<body>
<p><b>From:</b> <%= link_to @from_user.name, @from_user %></p>
<p>
<%= simple_format @body %>
</p>
<p>
<i>To reply, visit <%= link_to @url, @url %></i> .
</p>
</body>
</html>

View File

@@ -0,0 +1,14 @@
<h3>Send Email to <%= @user.name %></h3>
<%= form_tag do %>
<div class="field">
<%= label_tag :subject %><br/>
<%= text_field_tag :subject, @subject, :size => 52 %>
</div>
<div class="field">
<%= label_tag :body %><br/>
<%= text_area_tag :body, @body, :cols => 40 %>
</div>
<div class="field">
<%= submit_tag "Send", :class => "btn" %>
</div>
<% end %>