Skip to content

Instantly share code, notes, and snippets.

@jamesgecko
Created May 10, 2011 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesgecko/965439 to your computer and use it in GitHub Desktop.
Save jamesgecko/965439 to your computer and use it in GitHub Desktop.
<h1><%= session[:employee_first_name] %>'s call queue</h1>
<%= @foo %>
<ul>
<% last_date = '' %>
<% @employee.support_calls.reverse.each do |call| %>
<% date = call.created_at.strftime('%x') %>
<% if last_date != date %>
<div class="date"><%= date %></div> The date should only appear when it's different from the last one.
<% end %>
<li><%= link_to call.customer.name + ' - ' + call.caller + ' - ' + call.problem.truncate(32), edit_support_call_path(call) %></li>
<% end %>
</ul>
<%= link_to "logout", :controller => "session", :action => "logout" %>
<%= link_to 'new', :controller => 'support_calls', :action => 'new' %>
@jamesgecko
Copy link
Author

What it's supposed to look like:
05/09/11
Joe bob - john - kjfkljdfklj
Joe bob - Angry birds - Cherp! Tweet tweet tweet! Bzz...
Joe bob - djfkl - Does customer.id work now?
04/21/11
Joe bob - fohobogawdsksjdk - Does customer.id work now?
Joe bob - jdfkjsdk - kljfkljdskl
Joe bob - Frank - Meh?

What it looks like:
05/09/11
Joe bob - john - kjfkljdfklj
05/09/11
Joe bob - Angry birds - Cherp! Tweet tweet tweet! Bzz...
05/09/11
Joe bob - djfkl - Does customer.id work now?
04/21/11
Joe bob - fohobogawdsksjdk - Does customer.id work now?
04/21/11
Joe bob - jdfkjsdk - kljfkljdskl
04/21/11
Joe bob - Frank - Meh?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment