summaryrefslogtreecommitdiffstats
path: root/app/views/timelog
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-14 21:17:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-03-14 21:17:09 +0000
commit993b60d61eb927cff21ea0b06c1631eb986f6a51 (patch)
tree940e5d4f7c08e2e8dfcf02839c63cac8587c44a1 /app/views/timelog
parent4957752d122388f15738b47b2872465da81a6d32 (diff)
downloadredmine-993b60d61eb927cff21ea0b06c1631eb986f6a51.tar.gz
redmine-993b60d61eb927cff21ea0b06c1631eb986f6a51.zip
Adds 2 permissions (closes #859):
* edit_time_entries: lets a user edit/delete any time entry * edit_own_time_entries: lets a user edit/delete its own time entries only git-svn-id: http://redmine.rubyforge.org/svn/trunk@1249 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/timelog')
-rw-r--r--app/views/timelog/_list.rhtml13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/views/timelog/_list.rhtml b/app/views/timelog/_list.rhtml
index ae5b6376a..67e3c67d5 100644
--- a/app/views/timelog/_list.rhtml
+++ b/app/views/timelog/_list.rhtml
@@ -23,9 +23,16 @@
</td>
<td class="comments"><%=h entry.comments %></td>
<td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
-<td align="center"><%= link_to_if_authorized(l(:button_edit),
- {:controller => 'timelog', :action => 'edit', :id => entry},
- :class => 'icon icon-edit') if entry.editable_by?(User.current) %></td>
+<td align="center">
+<% if entry.editable_by?(User.current) -%>
+ <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry},
+ :title => l(:button_edit) %>
+ <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry},
+ :confirm => l(:text_are_you_sure),
+ :method => :post,
+ :title => l(:button_delete) %>
+<% end -%>
+</td>
</tr>
<% end -%>
</tbdoy>