<%
# Renders an accumulated workload.
# Parameters:
#  * totalWorkload: Hash that contains the total workload for each day.
%>

<% totalWorkload.keys.sort.each do |day| %>
  <%
     hours = totalWorkload[day][:hours]
     holiday = totalWorkload[day][:holiday]
     lowload = totalWorkload[day][:lowload]
     normalload = totalWorkload[day][:normalload]
     highload = totalWorkload[day][:highload]

     klass  = 'hours'
     klass += ' holiday' if holiday
     klass += ' workingday' if !holiday
     klass += ' today'   if @today === day
     klass += ' ' + load_class_for_hours(hours, lowload, normalload, highload)
  %>
  <td class="<%= klass %>">
      <span>
        <%= sprintf("%.1f", hours) %>
      </span>
  </td>
<% end %>
