<div id="content">
  <h2>Recent Expenses</h2>

  <% @expenses.each do |group, expenses| %>
    <h3><%= group %></h3>

    <ul class="expenses">
      <% expenses.each do |expense| -%>
        <li><strong><%= number_to_currency expense.cost %></strong> on <span><%= h expense.item %></span>.</li>
      <% end %>
    </ul>
  <% end %>
</div>

<div id="sidebar">
  <h2>Averages</h2>

  <dl id="summary">
    <dt>Average per month</dt>
    <dd><%= number_to_currency(@averages[:month] || 0) %></dd>
    <dt>Average per week</dt>
    <dd><%= number_to_currency(@averages[:week] || 0) %></dd>
    <dt>Average per day</dt>
    <dd><%= number_to_currency(@averages[:day] || 0) %></dd>
  </dl>
</div>
<div id="content">
  <h2>Recent Expenses</h2>

  <% if @expenses.length > 0 %>
    <% @expenses.each do |group, expenses| %>
      <h3><%= group %></h3>

      <ul class="expenses">
        <% expenses.each do |expense| -%>
          <li><strong><%= number_to_currency expense.cost %></strong> on <span><%= h expense.item %></span>.</li>
        <% end %>
      </ul>
    <% end %>
  <% else %>
    <h3>No Expenses</h3>

    <p>You do not have any expenses, yet. Once you spend some money add it using the field above.</p>
  <% end %>
</div>

<div id="sidebar">
  <h2>Averages</h2>

  <dl id="summary">
    <dt>Average per month</dt>
    <dd><%= number_to_currency(@averages[:month] || 0) %></dd>
    <dt>Average per week</dt>
    <dd><%= number_to_currency(@averages[:week] || 0) %></dd>
    <dt>Average per day</dt>
    <dd><%= number_to_currency(@averages[:day] || 0) %></dd>
  </dl>
</div>
Add a message for users with no expenses.
Add a message for users with no expenses.
