Apply new table styling on my-project-page

pull/6827/head
Henriette Dinger 9 years ago
parent 37381c8cab
commit 3300248d58
  1. 69
      app/views/my_projects_overviews/blocks/_spent_time.html.erb

@ -38,21 +38,65 @@ See doc/COPYRIGHT.md for more details.
</div>
<% if entries.any? %>
<table class="list time-entries">
<thead><tr>
<th><%= l(:label_activity) %></th>
<th><%= Project.model_name.human %></th>
<th><%= TimeEntry.human_attribute_name(:comments) %></th>
<th><%= TimeEntry.human_attribute_name(:hours) %></th>
<div class="generic-table--container">
<div class="generic-table--results-container">
<table interactive-table class="generic-table time-entries">
<colgroup>
<col highlight-col>
<col highlight-col>
<col highlight-col>
<col highlight-col>
<col>
</colgroup>
<thead>
<tr>
<th>
<div class="generic-table--header-outer">
<div class="generic-table--header">
<span>
<%= l(:label_activity) %>
</span>
</div>
</div>
</th>
<th>
<div class="generic-table--header-outer">
<div class="generic-table--header">
<span>
<%= Project.model_name.human %>
</span>
</div>
</div>
</th>
<th>
<div class="generic-table--header-outer">
<div class="generic-table--header">
<span>
<%= TimeEntry.human_attribute_name(:comments) %>
</span>
</div>
</div>
</th>
<th>
<div class="generic-table--header-outer">
<div class="generic-table--header">
<span>
<%= TimeEntry.human_attribute_name(:hours) %>
</span>
</div>
</div>
</th>
<th></th>
</tr></thead>
</tr>
</thead>
<tbody>
<% entries_by_day.keys.sort.reverse.each do |day| %>
<tr class="odd">
<tr>
<td><strong><%= day == Date.today ? l(:label_today).titleize : format_date(day) %></strong></td>
<td colspan="2"></td>
<td ></td>
<td ></td>
<td class="hours"><em><%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %></em></td>
<td></td>
<td class="-short"></td>
</tr>
<% entries_by_day[day].each do |entry| -%>
<tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;">
@ -60,7 +104,7 @@ See doc/COPYRIGHT.md for more details.
<td class="subject"><%=h entry.project %> <%= ' - '.html_safe + link_to_work_package(entry.work_package, :truncate => 50) if entry.work_package%></td>
<td class="comments"><%=h entry.comments %></td>
<td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
<td align="center">
<td class="buttons -short">
<% if entry.editable_by?(@user) -%>
<%= link_to icon_wrapper('icon-context icon-edit', t(:button_edit)),
{:controller => '/timelog', :action => 'edit', :id => entry},
@ -81,4 +125,7 @@ See doc/COPYRIGHT.md for more details.
<% end -%>
</tbody>
</table>
<div class="generic-table--header-background"></div>
</div>
</div>
<% end %>

Loading…
Cancel
Save