This commit is contained in:
albert
2010-11-19 16:24:17 -05:00
parent a156cc8c62
commit c6304c6e08
41 changed files with 346 additions and 53 deletions

View File

@@ -0,0 +1,12 @@
<div id="preview">
</div>
<%= simple_form_for(dmail) do |f| %>
<%= hidden_field_tag "dmail[parent_id]", dmail.parent_id || dmail.id, :id => "dmail_parent_id" %>
<%= f.input :to_name, :label => "To" %>
<%= f.input :title %>
<%= f.input :body, :html_options => {:size => "50x25"} %>
<%= f.button :submit %>
<%= submit_tag "Preview" %>
<% end %>

View File

@@ -0,0 +1,5 @@
<tr>
<td><%= link_to dmail.from_name, user_path(dmail.from) %></td>
<td><%= link_to dmail.title, dmail_path(dmail) %></td>
<td><%= compact_time(dmail.created_at) %></td>
</tr>

View File

@@ -0,0 +1,10 @@
<div>
<%= simple_form_for @search do |f| %>
<%= hidden_field_tag :folder, params[:folder] %>
<%= f.input :title_contains %>
<%= f.input :body_contains %>
<%= f.input :to_name_equals %>
<%= f.input :from_name_equals %>
<%= f.button :submit %>
<% end %>
</div>

View File

@@ -0,0 +1,7 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Received", dmails_path(:folder => "received") %></li>
<li><%= link_to "Sent", dmails_path(:folder => "sent") %></li>
<li><%= link_to "New", new_dmail_path %></li>
</menu>
<% end %>

View File

@@ -0,0 +1,5 @@
<tr>
<td><%= link_to dmail.to_name, user_path(dmail.from) %></td>
<td><%= link_to dmail.title, dmail_path(dmail) %></td>
<td><%= compact_time(dmail.created_at) %></td>
</tr>

View File

@@ -0,0 +1,2 @@
<h1>Edit Message</h1>
<%= render "form", :locals => {:dmail => @dmail} %>

View File

@@ -0,0 +1,15 @@
<h1>Messages</h1>
<%= render "search" %>
<table>
<tbody>
<% @dmails.each do |dmail| %>
<% if params[:folder] == "sent" %>
<%= render "sent", :locals => {:dmail => dmail} %>
<% else %>
<%= render "received", :locals => {:dmail => dmail} %>
<% end %>
<% end %>
</tbody>
</table>

View File

@@ -0,0 +1,2 @@
<h1>New Message</h1>
<%= render "form", :locals => {:dmail => @dmail} %>