<%
# Renders the workload data for one single issue.
# Parameters:
#  * assignee: The user or group to render the data for.
#  * summarizedWorkload Hash that contains the summarized workload for invisible issues.
%>

<% summarizedWorkload.keys.sort.each do |day| %>
  <%
     hours = summarizedWorkload[day][:hours]
     holiday = summarizedWorkload[day][:holiday]
     lowload = summarizedWorkload[day][:lowload]
     normalload = summarizedWorkload[day][:normalload]
     highload = summarizedWorkload[day][:highload]
     klass  = 'hours'
     klass += ' holiday' if holiday
     klass += ' today'   if @today === day
     klass += ' ' + load_class_for_hours(hours, lowload, normalload, highload)

     hoursString = (hours.abs < 0.01) ? '' : sprintf("%.1f", hours, assignee)
  %>
  <td class="<%= klass %>">
      <span>
        <%= hoursString %>
      </span>
  </td>
<% end %>