diff --git a/app/views/dmails/_received.html.erb b/app/views/dmails/_received.html.erb deleted file mode 100644 index 4d43a899f..000000000 --- a/app/views/dmails/_received.html.erb +++ /dev/null @@ -1,6 +0,0 @@ - - <%= link_to dmail.to_name, user_path(dmail.to) %> - <%= link_to dmail.from_name, user_path(dmail.from) %> - <%= link_to dmail.title, dmail_path(dmail) %> - <%= compact_time(dmail.created_at) %> - diff --git a/app/views/dmails/_secondary_links.html.erb b/app/views/dmails/_secondary_links.html.erb index b8d59e209..9ec9543d4 100644 --- a/app/views/dmails/_secondary_links.html.erb +++ b/app/views/dmails/_secondary_links.html.erb @@ -1,7 +1,7 @@ <% content_for(:secondary_links) do %> -
  • <%= link_to "Received", dmails_path(:folder => "received") %>
  • -
  • <%= link_to "Sent", dmails_path(:folder => "sent") %>
  • +
  • <%= link_to "Received", dmails_path(:search => {:to_id_eq => CurrentUser.id}) %>
  • +
  • <%= link_to "Sent", dmails_path(:search => {:from_id_eq => CurrentUser.id}) %>
  • <%= link_to "New", new_dmail_path %>
  • <%= link_to "Search", search_dmails_path %>
  • diff --git a/app/views/dmails/_sent.html.erb b/app/views/dmails/_sent.html.erb deleted file mode 100644 index 4d43a899f..000000000 --- a/app/views/dmails/_sent.html.erb +++ /dev/null @@ -1,6 +0,0 @@ - - <%= link_to dmail.to_name, user_path(dmail.to) %> - <%= link_to dmail.from_name, user_path(dmail.from) %> - <%= link_to dmail.title, dmail_path(dmail) %> - <%= compact_time(dmail.created_at) %> - diff --git a/app/views/dmails/index.html.erb b/app/views/dmails/index.html.erb index e90e8218b..6ca3454db 100644 --- a/app/views/dmails/index.html.erb +++ b/app/views/dmails/index.html.erb @@ -5,19 +5,20 @@ - - - + + + <% @dmails.each do |dmail| %> - <% if params[:folder] == "sent" %> - <%= render "sent", :dmail => dmail %> - <% else %> - <%= render "received", :dmail => dmail %> - <% end %> + + + + + + <% end %>
    ToFromSubject DateFromToSubject
    <%= compact_time(dmail.created_at) %><%= link_to dmail.from_name, user_path(dmail.from) %><%= link_to dmail.to_name, user_path(dmail.to) %><%= link_to dmail.title, dmail_path(dmail) %>