annotate app/views/timelog/_list.rhtml @ 1179:836a2c1f0e9e feature_361

Close obsolete branch feature_361
author Chris Cannam
date Wed, 01 Feb 2012 12:47:54 +0000
parents cbce1fd3b1b7
children
rev   line source
Chris@441 1 <% form_tag({}) do -%>
Chris@441 2 <%= hidden_field_tag 'back_url', url_for(params) %>
Chris@0 3 <table class="list time-entries">
Chris@0 4 <thead>
Chris@0 5 <tr>
Chris@441 6 <th class="checkbox hide-when-print">
Chris@441 7 <%= link_to image_tag('toggle_check.png'),
Chris@441 8 {},
Chris@441 9 :onclick => 'toggleIssuesSelection(Element.up(this, "form")); return false;',
Chris@441 10 :title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
Chris@441 11 </th>
Chris@0 12 <%= sort_header_tag('spent_on', :caption => l(:label_date), :default_order => 'desc') %>
Chris@0 13 <%= sort_header_tag('user', :caption => l(:label_member)) %>
Chris@0 14 <%= sort_header_tag('activity', :caption => l(:label_activity)) %>
Chris@0 15 <%= sort_header_tag('project', :caption => l(:label_project)) %>
Chris@0 16 <%= sort_header_tag('issue', :caption => l(:label_issue), :default_order => 'desc') %>
Chris@0 17 <th><%= l(:field_comments) %></th>
Chris@0 18 <%= sort_header_tag('hours', :caption => l(:field_hours)) %>
Chris@0 19 <th></th>
Chris@0 20 </tr>
Chris@0 21 </thead>
Chris@0 22 <tbody>
Chris@0 23 <% entries.each do |entry| -%>
Chris@441 24 <tr class="time-entry <%= cycle("odd", "even") %> hascontextmenu">
Chris@441 25 <td class="checkbox hide-when-print"><%= check_box_tag("ids[]", entry.id, false, :id => nil) %></td>
Chris@0 26 <td class="spent_on"><%= format_date(entry.spent_on) %></td>
Chris@0 27 <td class="user"><%=h entry.user %></td>
Chris@0 28 <td class="activity"><%=h entry.activity %></td>
Chris@0 29 <td class="project"><%=h entry.project %></td>
Chris@0 30 <td class="subject">
Chris@0 31 <% if entry.issue -%>
Chris@0 32 <%= entry.issue.visible? ? link_to_issue(entry.issue, :truncate => 50) : "##{entry.issue.id}" -%>
Chris@0 33 <% end -%>
Chris@0 34 </td>
Chris@0 35 <td class="comments"><%=h entry.comments %></td>
Chris@0 36 <td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
Chris@0 37 <td align="center">
Chris@0 38 <% if entry.editable_by?(User.current) -%>
Chris@0 39 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry, :project_id => nil},
Chris@0 40 :title => l(:button_edit) %>
Chris@0 41 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry, :project_id => nil},
Chris@0 42 :confirm => l(:text_are_you_sure),
chris@37 43 :method => :delete,
Chris@0 44 :title => l(:button_delete) %>
Chris@0 45 <% end -%>
Chris@0 46 </td>
Chris@0 47 </tr>
Chris@0 48 <% end -%>
Chris@0 49 </tbody>
Chris@0 50 </table>
Chris@441 51 <% end -%>
Chris@441 52
Chris@441 53 <%= context_menu time_entries_context_menu_path %>