Sha256: 32aa323faf31d04e10c60e1494eb8fa3676cc58a93ccb64ada1b6e4ef29b0433

Contents?: true

Size: 1.58 KB

Versions: 3

Compression:

Stored size: 1.58 KB

Contents

<% @page_title = l(:weekly_work_sheet) + " " + @week.to_s + (@user ? " for #{@user.name}" : '')%>

<div id="spotlight">
<% columns = 2 %>

<%=render :partial => 'weekly_work_sheet_buttons'%>

<table border="1">
  <tr>
    <th><%=l :work_account %></th>
  	<% [:monday, :tuesday, :wednesday, :thursday, :friday, :saturday, :sunday].each_with_index do |day, i| %>
    <th align="center"><%=detour_to "#{l(day)} #{week_date(i+1)}", :action => :daily_work_sheet, :id => (@first_date + i).strftime('%Y-%m-%d') %></th>
	<% end %>
    <th align="center" nowrap="true"><%=l :week %> <%=@week%></th>
  </tr>

<% week_totals = Hash.new(0) %>
<% day_totals = Array.new(7, 0) %>
<% for work_account, totals in @work_accounts %>
  <tr>
    <td valign="top">
      <%=detour_to(h(work_account.name), :controller => 'work_accounts', :action => :show, :id => work_account.id) %>
    </td>
    <% totals.each_with_index do |total, day| %>
      <% if total %>
        <% day_totals[day] += total %>
        <% week_totals[work_account] += total %>
        <td align="right" valign="top"><%=t(total)%></td>
      <% else %>
        <td/>
      <% end %>
    <% end %>
    <td align="right"><%=t(week_totals[work_account])%></td>
  </tr>
<% end %>
  <tr>
  	<th><%=l :totals%></th>
<% (0..6).each do |day| %>
	<% day_totals[day] += BigDecimal('8') if @absences[day] || @public_holidays[day] %>
    <th class="hours"><%=t(day_totals[day]) if day_totals[day] > 0%></th>
<% end %>
<% week_total = day_totals.inject(BigDecimal('0')) {|total, day_total| total + day_total} %>
    <th class="hours"><%=t(week_total)%></th>
  </tr>
</table>
</div>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
backlog-0.30.0 app/views/works/weekly_work_sheet.rhtml
backlog-0.31.0 app/views/works/weekly_work_sheet.rhtml
backlog-0.31.1 app/views/works/weekly_work_sheet.rhtml