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

Loading…
Cancel
Save