Skip to content

Commit

Permalink
Add a "No Contacts Found" message when none are found; fix a css bug …
Browse files Browse the repository at this point in the history
…along the way
  • Loading branch information
mdiep committed Jul 4, 2008
1 parent d60bf46 commit a80a9bb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/views/contacts/_contacts.html.erb
Expand Up @@ -5,6 +5,10 @@
<th id='last-contact-column'><%= link_to_function "Last Contact", 'sort_by("last_contact")' %></th>
</tr>

<% if @contacts.size == 0 %>
<tr id='no-contacts-found-row'> <td colspan='2'>No Contacts Found</td> </tr>
<% end %>
<% @contacts.each do |c| %>
<tr> <td><%= link_to c.full_name, contact_url(c) %></td> <td><%= c.last_contact.nil? ? "" : c.last_contact.strftime("%A, %b %d") %></td> </tr>
<% end %>
Expand Down
9 changes: 8 additions & 1 deletion public/stylesheets/style.css
Expand Up @@ -76,7 +76,14 @@ table td
padding: 0.5em 0;
}

table tr.footer-row td
div#content table tr#no-contacts-found-row td
{
border-bottom: 0;
font-weight: bold;
text-align: center;
}

div#content table tr.footer-row td
{
border-top: solid #e8e8e8 3px;
border-bottom: 0;
Expand Down

0 comments on commit a80a9bb

Please sign in to comment.