Adding user email feature
This commit is contained in:
15
app/views/user_mailer/email.html.erb
Normal file
15
app/views/user_mailer/email.html.erb
Normal 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>
|
||||
14
app/views/users/compose_email.html.erb
Normal file
14
app/views/users/compose_email.html.erb
Normal 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 %>
|
||||
Reference in New Issue
Block a user