Apply new table styling on my-project-page

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

@ -38,47 +38,94 @@ 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>
<th></th> <col highlight-col>
</tr></thead> <col highlight-col>
<tbody> <col>
<% entries_by_day.keys.sort.reverse.each do |day| %> </colgroup>
<tr class="odd"> <thead>
<td><strong><%= day == Date.today ? l(:label_today).titleize : format_date(day) %></strong></td> <tr>
<td colspan="2"></td> <th>
<td class="hours"><em><%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %></em></td> <div class="generic-table--header-outer">
<td></td> <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> </tr>
<% entries_by_day[day].each do |entry| -%> </thead>
<tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;"> <tbody>
<td class="activity"><%=h entry.activity %></td> <% entries_by_day.keys.sort.reverse.each do |day| %>
<td class="subject"><%=h entry.project %> <%= ' - '.html_safe + link_to_work_package(entry.work_package, :truncate => 50) if entry.work_package%></td> <tr>
<td class="comments"><%=h entry.comments %></td> <td><strong><%= day == Date.today ? l(:label_today).titleize : format_date(day) %></strong></td>
<td class="hours"><%= html_hours("%.2f" % entry.hours) %></td> <td ></td>
<td align="center"> <td ></td>
<% if entry.editable_by?(@user) -%> <td class="hours"><em><%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %></em></td>
<%= link_to icon_wrapper('icon-context icon-edit', t(:button_edit)), <td class="-short"></td>
{:controller => '/timelog', :action => 'edit', :id => entry}, </tr>
:alt => l(:button_edit), <% entries_by_day[day].each do |entry| -%>
:class => 'no-decoration-on-hover', <tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;">
:title => l(:button_edit) %> <td class="activity"><%=h entry.activity %></td>
<%= link_to icon_wrapper('icon-context icon-delete', t(:button_delete)), <td class="subject"><%=h entry.project %> <%= ' - '.html_safe + link_to_work_package(entry.work_package, :truncate => 50) if entry.work_package%></td>
{:controller => '/timelog', :action => 'destroy', :id => entry}, <td class="comments"><%=h entry.comments %></td>
:confirm => l(:text_are_you_sure), <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
:method => :delete, <td class="buttons -short">
:class => 'no-decoration-on-hover', <% if entry.editable_by?(@user) -%>
:alt => l(:button_delete), <%= link_to icon_wrapper('icon-context icon-edit', t(:button_edit)),
:title => l(:button_delete) %> {:controller => '/timelog', :action => 'edit', :id => entry},
<% end -%> :alt => l(:button_edit),
</td> :class => 'no-decoration-on-hover',
</tr> :title => l(:button_edit) %>
<% end -%> <%= link_to icon_wrapper('icon-context icon-delete', t(:button_delete)),
<% end -%> {:controller => '/timelog', :action => 'destroy', :id => entry},
</tbody> :confirm => l(:text_are_you_sure),
</table> :method => :delete,
:class => 'no-decoration-on-hover',
:alt => l(:button_delete),
:title => l(:button_delete) %>
<% end -%>
</td>
</tr>
<% end -%>
<% end -%>
</tbody>
</table>
<div class="generic-table--header-background"></div>
</div>
</div>
<% end %> <% end %>

Loading…
Cancel
Save