From 7a6f04c25fbb1166b909daff645727ba8c32f00b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 29 Oct 2016 14:07:10 +0000 Subject: Enables context menu on My Page for time entries. git-svn-id: http://svn.redmine.org/redmine/trunk@15937 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/my/blocks/_timelog.html.erb | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) (limited to 'app/views') diff --git a/app/views/my/blocks/_timelog.html.erb b/app/views/my/blocks/_timelog.html.erb index 6f4081f4e..bbdb194de 100644 --- a/app/views/my/blocks/_timelog.html.erb +++ b/app/views/my/blocks/_timelog.html.erb @@ -14,44 +14,36 @@ entries_by_day = entries.group_by(&:spent_on) <% if entries.any? %> +<%= form_tag({}, :data => {:cm_url => time_entries_context_menu_path}) do %> - <% entries_by_day.keys.sort.reverse.each do |day| %> - + - - - <% entries_by_day[day].each do |entry| -%> - - + + <% entries_by_day[day].each do |entry| -%> + + - - - <% end -%> + + <% end -%> <% end -%>
<%= l(:label_activity) %> <%= l(:label_project) %> <%= l(:field_comments) %> <%= l(:field_hours) %>
<%= day == User.current.today ? l(:label_today).titleize : format_date(day) %> <%= html_hours("%.2f" % entries_by_day[day].sum(&:hours).to_f) %>
<%= entry.activity %>
+ <%= check_box_tag("ids[]", entry.id, false, :style => 'display:none;', :id => nil) %> + <%= entry.activity %> + <%= entry.project %> <%= h(' - ') + link_to_issue(entry.issue, :truncate => 50) if entry.issue %> <%= entry.comments %> <%= html_hours("%.2f" % entry.hours) %> - <% if entry.editable_by?(@user) -%> - <%= link_to l(:button_edit), {:controller => 'timelog', :action => 'edit', :id => entry}, - :title => l(:button_edit), - :class => 'icon-only icon-edit' %> - <%= link_to l(:button_delete), {:controller => 'timelog', :action => 'destroy', :id => entry}, - :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, - :title => l(:button_delete), - :class => 'icon-only icon-del' %> - <% end -%> -
+<% end %> <% else %>

<%= l(:label_no_data) %>

<% end %> -- cgit v1.2.3