##// END OF EJS Templates
Deprecated :confirm => 'Text' option....
Jean-Philippe Lang -
r9754:7b40767428ac
parent child
Show More
@@ -985,6 +985,16 module ApplicationHelper
985 html.html_safe
985 html.html_safe
986 end
986 end
987
987
988 def delete_link(url, options={})
989 options = {
990 :method => :delete,
991 :data => {:confirm => l(:text_are_you_sure)},
992 :class => 'icon icon-del'
993 }.merge(options)
994
995 link_to l(:button_delete), url, options
996 end
997
988 def back_url_hidden_field_tag
998 def back_url_hidden_field_tag
989 back_url = params[:back_url] || request.env['HTTP_REFERER']
999 back_url = params[:back_url] || request.env['HTTP_REFERER']
990 back_url = CGI.unescape(back_url.to_s)
1000 back_url = CGI.unescape(back_url.to_s)
@@ -31,7 +31,7
31 <td align="center"><%= checked_image project.is_public? %></td>
31 <td align="center"><%= checked_image project.is_public? %></td>
32 <td align="center"><%= format_date(project.created_on) %></td>
32 <td align="center"><%= format_date(project.created_on) %></td>
33 <td class="buttons">
33 <td class="buttons">
34 <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-lock') unless project.archived? %>
34 <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %>
35 <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
35 <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %>
36 <%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
36 <%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %>
37 <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>
37 <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>
@@ -10,7 +10,7
10 <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
10 <span class="size">(<%= number_to_human_size attachment.filesize %>)</span>
11 <% if options[:deletable] %>
11 <% if options[:deletable] %>
12 <%= link_to image_tag('delete.png'), attachment_path(attachment),
12 <%= link_to image_tag('delete.png'), attachment_path(attachment),
13 :confirm => l(:text_are_you_sure),
13 :data => {:confirm => l(:text_are_you_sure)},
14 :method => :delete,
14 :method => :delete,
15 :class => 'delete',
15 :class => 'delete',
16 :title => l(:button_delete) %>
16 :title => l(:button_delete) %>
@@ -21,11 +21,7
21 <td align="center"><%= h source.users.count %></td>
21 <td align="center"><%= h source.users.count %></td>
22 <td class="buttons">
22 <td class="buttons">
23 <%= link_to l(:button_test), {:action => 'test_connection', :id => source}, :class => 'icon icon-test' %>
23 <%= link_to l(:button_test), {:action => 'test_connection', :id => source}, :class => 'icon icon-test' %>
24 <%= link_to l(:button_delete), { :action => 'destroy', :id => source },
24 <%= delete_link auth_source_path(source) %>
25 :method => :delete,
26 :confirm => l(:text_are_you_sure),
27 :class => 'icon icon-del',
28 :disabled => source.users.any? %>
29 </td>
25 </td>
30 </tr>
26 </tr>
31 <% end %>
27 <% end %>
@@ -136,7 +136,7
136 :class => 'icon-copy', :disabled => !@can[:move] %></li>
136 :class => 'icon-copy', :disabled => !@can[:move] %></li>
137 <% end %>
137 <% end %>
138 <li><%= context_menu_link l(:button_delete), issues_path(:ids => @issues.collect(&:id), :back_url => @back),
138 <li><%= context_menu_link l(:button_delete), issues_path(:ids => @issues.collect(&:id), :back_url => @back),
139 :method => :delete, :confirm => issues_destroy_confirmation_message(@issues), :class => 'icon-del', :disabled => !@can[:delete] %></li>
139 :method => :delete, :data => {:confirm => issues_destroy_confirmation_message(@issues)}, :class => 'icon-del', :disabled => !@can[:delete] %></li>
140
140
141 <%= call_hook(:view_issues_context_menu_end, {:issues => @issues, :can => @can, :back => @back }) %>
141 <%= call_hook(:view_issues_context_menu_end, {:issues => @issues, :can => @can, :back => @back }) %>
142 </ul>
142 </ul>
@@ -28,6 +28,6
28 <li>
28 <li>
29 <%= context_menu_link l(:button_delete),
29 <%= context_menu_link l(:button_delete),
30 {:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
30 {:controller => 'timelog', :action => 'destroy', :ids => @time_entries.collect(&:id), :back_url => @back},
31 :method => :delete, :confirm => l(:text_time_entries_destroy_confirmation), :class => 'icon-del', :disabled => !@can[:delete] %>
31 :method => :delete, :data => {:confirm => l(:text_time_entries_destroy_confirmation)}, :class => 'icon-del', :disabled => !@can[:delete] %>
32 </li>
32 </li>
33 </ul>
33 </ul>
@@ -22,10 +22,7
22 <% end %>
22 <% end %>
23 <td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'update', :id => custom_field}, :put) %></td>
23 <td align="center" style="width:15%;"><%= reorder_links('custom_field', {:action => 'update', :id => custom_field}, :put) %></td>
24 <td class="buttons">
24 <td class="buttons">
25 <%= link_to(l(:button_delete), custom_field_path(custom_field),
25 <%= delete_link custom_field_path(custom_field) %>
26 :method => :delete,
27 :confirm => l(:text_are_you_sure),
28 :class => 'icon icon-del') %>
29 </td>
26 </td>
30 </tr>
27 </tr>
31 <% end; reset_cycle %>
28 <% end; reset_cycle %>
@@ -1,7 +1,7
1 <div class="contextual">
1 <div class="contextual">
2 <% if User.current.allowed_to?(:manage_documents, @project) %>
2 <% if User.current.allowed_to?(:manage_documents, @project) %>
3 <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
3 <%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
4 <%= link_to l(:button_delete), document_path(@document), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
4 <%= delete_link document_path(@document) %>
5 <% end %>
5 <% end %>
6 </div>
6 </div>
7
7
@@ -20,10 +20,7
20 <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
20 <td class="center" style="width:15%;"><%= checked_image enumeration.active? %></td>
21 <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :put) %></td>
21 <td style="width:15%;"><%= reorder_links('enumeration', {:action => 'update', :id => enumeration}, :put) %></td>
22 <td class="buttons">
22 <td class="buttons">
23 <%= link_to l(:button_delete), enumeration_path(enumeration),
23 <%= delete_link enumeration_path(enumeration) %>
24 :method => :delete,
25 :confirm => l(:text_are_you_sure),
26 :class => 'icon icon-del' %>
27 </td>
24 </td>
28 </tr>
25 </tr>
29 <% end %>
26 <% end %>
@@ -34,7 +34,7
34 <td class="digest"><%= file.digest %></td>
34 <td class="digest"><%= file.digest %></td>
35 <td align="center">
35 <td align="center">
36 <%= link_to(image_tag('delete.png'), attachment_path(file),
36 <%= link_to(image_tag('delete.png'), attachment_path(file),
37 :confirm => l(:text_are_you_sure), :method => :delete) if delete_allowed %>
37 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %>
38 </td>
38 </td>
39 </tr>
39 </tr>
40 <% end
40 <% end
@@ -16,7 +16,7
16 <tr class="<%= cycle 'odd', 'even' %>">
16 <tr class="<%= cycle 'odd', 'even' %>">
17 <td><%= link_to h(group), edit_group_path(group) %></td>
17 <td><%= link_to h(group), edit_group_path(group) %></td>
18 <td align="center"><%= group.users.size %></td>
18 <td align="center"><%= group.users.size %></td>
19 <td class="buttons"><%= link_to l(:button_delete), group, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %></td>
19 <td class="buttons"><%= delete_link group %></td>
20 </tr>
20 </tr>
21 <% end %>
21 <% end %>
22 </table>
22 </table>
@@ -1,6 +1,6
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_issue_status_new), new_issue_status_path, :class => 'icon icon-add' %>
2 <%= link_to l(:label_issue_status_new), new_issue_status_path, :class => 'icon icon-add' %>
3 <%= link_to(l(:label_update_issue_done_ratios), update_issue_done_ratio_issue_statuses_path, :class => 'icon icon-multiple', :method => 'post', :confirm => l(:text_are_you_sure)) if Issue.use_status_for_done_ratio? %>
3 <%= link_to(l(:label_update_issue_done_ratios), update_issue_done_ratio_issue_statuses_path, :class => 'icon icon-multiple', :method => 'post', :data => {:confirm => l(:text_are_you_sure)}) if Issue.use_status_for_done_ratio? %>
4 </div>
4 </div>
5
5
6 <h2><%=l(:label_issue_status_plural)%></h2>
6 <h2><%=l(:label_issue_status_plural)%></h2>
@@ -27,10 +27,7
27 <td align="center"><%= checked_image status.is_closed? %></td>
27 <td align="center"><%= checked_image status.is_closed? %></td>
28 <td align="center" style="width:15%;"><%= reorder_links('issue_status', {:action => 'update', :id => status}, :put) %></td>
28 <td align="center" style="width:15%;"><%= reorder_links('issue_status', {:action => 'update', :id => status}, :put) %></td>
29 <td class="buttons">
29 <td class="buttons">
30 <%= link_to(l(:button_delete), issue_status_path(status),
30 <%= delete_link issue_status_path(status) %>
31 :method => :delete,
32 :confirm => l(:text_are_you_sure),
33 :class => 'icon icon-del') %>
34 </td>
31 </td>
35 </tr>
32 </tr>
36 <% end %>
33 <% end %>
@@ -3,5 +3,5
3 <%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
3 <%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
4 <%= watcher_tag(@issue, User.current) %>
4 <%= watcher_tag(@issue, User.current) %>
5 <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue}, :class => 'icon icon-copy' %>
5 <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue}, :class => 'icon icon-copy' %>
6 <%= link_to l(:button_delete), issue_path(@issue), :confirm => issues_destroy_confirmation_message(@issue), :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
6 <%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if User.current.allowed_to?(:delete_issues, @project) %>
7 </div>
7 </div>
@@ -23,7 +23,7
23 image_tag('link_break.png'),
23 image_tag('link_break.png'),
24 { :url => {:controller => 'issue_relations', :action => 'destroy', :id => relation},
24 { :url => {:controller => 'issue_relations', :action => 'destroy', :id => relation},
25 :method => :delete,
25 :method => :delete,
26 :confirm => l(:text_are_you_sure) },
26 :data => {:confirm => l(:text_are_you_sure)} },
27 :title => l(:label_relation_delete)
27 :title => l(:label_relation_delete)
28 ) if authorize_for('issue_relations', 'destroy') %></td>
28 ) if authorize_for('issue_relations', 'destroy') %></td>
29 </tr>
29 </tr>
@@ -1,8 +1,7
1 <div class="contextual">
1 <div class="contextual">
2 <% if !@query.new_record? && @query.editable_by?(User.current) %>
2 <% if !@query.new_record? && @query.editable_by?(User.current) %>
3 <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
3 <%= link_to l(:button_edit), edit_query_path(@query), :class => 'icon icon-edit' %>
4 <%= link_to l(:button_delete), query_path(@query), :confirm => l(:text_are_you_sure),
4 <%= delete_link query_path(@query) %>
5 :method => :delete, :class => 'icon icon-del' %>
6 <% end %>
5 <% end %>
7 </div>
6 </div>
8
7
@@ -17,7 +17,7
17 l(:button_delete),
17 l(:button_delete),
18 {:action => 'destroy', :id => @topic},
18 {:action => 'destroy', :id => @topic},
19 :method => :post,
19 :method => :post,
20 :confirm => l(:text_are_you_sure),
20 :data => {:confirm => l(:text_are_you_sure)},
21 :class => 'icon icon-del'
21 :class => 'icon icon-del'
22 ) if @message.destroyable_by?(User.current) %>
22 ) if @message.destroyable_by?(User.current) %>
23 </div>
23 </div>
@@ -52,7 +52,7
52 image_tag('delete.png'),
52 image_tag('delete.png'),
53 {:action => 'destroy', :id => message},
53 {:action => 'destroy', :id => message},
54 :method => :post,
54 :method => :post,
55 :confirm => l(:text_are_you_sure),
55 :data => {:confirm => l(:text_are_you_sure)},
56 :title => l(:button_delete)
56 :title => l(:button_delete)
57 ) if message.destroyable_by?(User.current) %>
57 ) if message.destroyable_by?(User.current) %>
58 </div>
58 </div>
@@ -39,7 +39,7 entries_by_day = entries.group_by(&:spent_on)
39 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry},
39 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry},
40 :title => l(:button_edit) %>
40 :title => l(:button_edit) %>
41 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry},
41 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry},
42 :confirm => l(:text_are_you_sure),
42 :data => {:confirm => l(:text_are_you_sure)},
43 :method => :delete,
43 :method => :delete,
44 :title => l(:button_delete) %>
44 :title => l(:button_delete) %>
45 <% end -%>
45 <% end -%>
@@ -5,11 +5,7
5 :class => 'icon icon-edit',
5 :class => 'icon icon-edit',
6 :accesskey => accesskey(:edit),
6 :accesskey => accesskey(:edit),
7 :onclick => 'Element.show("edit-news"); return false;') if User.current.allowed_to?(:manage_news, @project) %>
7 :onclick => 'Element.show("edit-news"); return false;') if User.current.allowed_to?(:manage_news, @project) %>
8 <%= link_to(l(:button_delete),
8 <%= delete_link news_path(@news) if User.current.allowed_to?(:manage_news, @project) %>
9 news_path(@news),
10 :confirm => l(:text_are_you_sure),
11 :method => :delete,
12 :class => 'icon icon-del') if User.current.allowed_to?(:manage_news, @project) %>
13 </div>
9 </div>
14
10
15 <h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2>
11 <h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2>
@@ -46,7 +42,7
46 <% next if comment.new_record? %>
42 <% next if comment.new_record? %>
47 <div class="contextual">
43 <div class="contextual">
48 <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
44 <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'comments', :action => 'destroy', :id => @news, :comment_id => comment},
49 :confirm => l(:text_are_you_sure), :method => :delete, :title => l(:button_delete) %>
45 :data => {:confirm => l(:text_are_you_sure)}, :method => :delete, :title => l(:button_delete) %>
50 </div>
46 </div>
51 <h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
47 <h4><%= avatar(comment.author, :size => "24") %><%= authoring comment.created_on, comment.author %></h4>
52 <%= textilizable(comment.comments) %>
48 <%= textilizable(comment.comments) %>
@@ -34,7 +34,7
34 <div class="contextual">
34 <div class="contextual">
35 <%= link_to(l(:button_reset), project_enumerations_path(@project),
35 <%= link_to(l(:button_reset), project_enumerations_path(@project),
36 :method => :delete,
36 :method => :delete,
37 :confirm => l(:text_are_you_sure),
37 :data => {:confirm => l(:text_are_you_sure)},
38 :class => 'icon icon-del') %>
38 :class => 'icon icon-del') %>
39 </div>
39 </div>
40
40
@@ -20,7 +20,7
20 <td class="buttons">
20 <td class="buttons">
21 <% if User.current.allowed_to?(:manage_boards, @project) %>
21 <% if User.current.allowed_to?(:manage_boards, @project) %>
22 <%= link_to l(:button_edit), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
22 <%= link_to l(:button_edit), edit_project_board_path(@project, board), :class => 'icon icon-edit' %>
23 <%= link_to l(:button_delete), project_board_path(@project, board), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
23 <%= delete_link project_board_path(@project, board) %>
24 <% end %>
24 <% end %>
25 </td>
25 </td>
26 </tr>
26 </tr>
@@ -14,7 +14,7
14 <td class="buttons">
14 <td class="buttons">
15 <% if User.current.allowed_to?(:manage_categories, @project) %>
15 <% if User.current.allowed_to?(:manage_categories, @project) %>
16 <%= link_to l(:button_edit), edit_issue_category_path(category), :class => 'icon icon-edit' %>
16 <%= link_to l(:button_edit), edit_issue_category_path(category), :class => 'icon icon-edit' %>
17 <%= link_to l(:button_delete), issue_category_path(category), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
17 <%= delete_link issue_category_path(category) %>
18 <% end %>
18 <% end %>
19 </td>
19 </td>
20 </tr>
20 </tr>
@@ -41,7 +41,7
41 l(:button_delete),
41 l(:button_delete),
42 { :url => membership_path(member),
42 { :url => membership_path(member),
43 :method => :delete,
43 :method => :delete,
44 :confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil) },
44 :data => {:confirm => (!User.current.admin? && member.include?(User.current) ? l(:text_own_membership_delete_confirmation) : nil)} },
45 :title => l(:button_delete),
45 :title => l(:button_delete),
46 :class => 'icon icon-del'
46 :class => 'icon icon-del'
47 ) if member.deletable? %>
47 ) if member.deletable? %>
@@ -22,10 +22,7
22 :class => 'icon icon-user') %>
22 :class => 'icon icon-user') %>
23 <%= link_to(l(:button_edit), edit_repository_path(repository),
23 <%= link_to(l(:button_edit), edit_repository_path(repository),
24 :class => 'icon icon-edit') %>
24 :class => 'icon icon-edit') %>
25 <%= link_to(l(:button_delete), repository_path(repository),
25 <%= delete_link repository_path(repository) %>
26 :confirm => l(:text_are_you_sure),
27 :method => :delete,
28 :class => 'icon icon-del') %>
29 <% end %>
26 <% end %>
30 </td>
27 </td>
31 </tr>
28 </tr>
@@ -21,7 +21,7
21 <td class="buttons">
21 <td class="buttons">
22 <% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
22 <% if version.project == @project && User.current.allowed_to?(:manage_versions, @project) %>
23 <%= link_to l(:button_edit), edit_version_path(version), :class => 'icon icon-edit' %>
23 <%= link_to l(:button_edit), edit_version_path(version), :class => 'icon icon-edit' %>
24 <%= link_to l(:button_delete), version_path(version), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
24 <%= delete_link version_path(version) %>
25 <% end %>
25 <% end %>
26 </td>
26 </td>
27 </tr>
27 </tr>
@@ -17,7 +17,7
17 <small>
17 <small>
18 <% if query.editable_by?(User.current) %>
18 <% if query.editable_by?(User.current) %>
19 <%= link_to l(:button_edit), edit_query_path(query), :class => 'icon icon-edit' %>
19 <%= link_to l(:button_edit), edit_query_path(query), :class => 'icon icon-edit' %>
20 <%= link_to l(:button_delete), query_path(query), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
20 <%= delete_link query_path(query) %>
21 </small>
21 </small>
22 <% end %>
22 <% end %>
23 </td>
23 </td>
@@ -20,10 +20,7
20 <% end %>
20 <% end %>
21 </td>
21 </td>
22 <td class="buttons">
22 <td class="buttons">
23 <%= link_to(l(:button_delete), role_path(role),
23 <%= delete_link role_path(role) unless role.builtin? %>
24 :method => :delete,
25 :confirm => l(:text_are_you_sure),
26 :class => 'icon icon-del') unless role.builtin? %>
27 </td>
24 </td>
28 </tr>
25 </tr>
29 <% end %>
26 <% end %>
@@ -40,7 +40,7
40 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry, :project_id => nil},
40 <%= link_to image_tag('edit.png'), {:controller => 'timelog', :action => 'edit', :id => entry, :project_id => nil},
41 :title => l(:button_edit) %>
41 :title => l(:button_edit) %>
42 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry, :project_id => nil},
42 <%= link_to image_tag('delete.png'), {:controller => 'timelog', :action => 'destroy', :id => entry, :project_id => nil},
43 :confirm => l(:text_are_you_sure),
43 :data => {:confirm => l(:text_are_you_sure)},
44 :method => :delete,
44 :method => :delete,
45 :title => l(:button_delete) %>
45 :title => l(:button_delete) %>
46 <% end -%>
46 <% end -%>
@@ -18,10 +18,7
18 <td align="center"><% unless tracker.workflows.count > 0 %><span class="icon icon-warning"><%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), {:controller => 'workflows', :action => 'edit', :tracker_id => tracker} %>)</span><% end %></td>
18 <td align="center"><% unless tracker.workflows.count > 0 %><span class="icon icon-warning"><%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), {:controller => 'workflows', :action => 'edit', :tracker_id => tracker} %>)</span><% end %></td>
19 <td align="center" style="width:15%;"><%= reorder_links('tracker', {:action => 'update', :id => tracker}, :put) %></td>
19 <td align="center" style="width:15%;"><%= reorder_links('tracker', {:action => 'update', :id => tracker}, :put) %></td>
20 <td class="buttons">
20 <td class="buttons">
21 <%= link_to(l(:button_delete), tracker_path(tracker),
21 <%= delete_link tracker_path(tracker) %>
22 :method => :delete,
23 :confirm => l(:text_are_you_sure),
24 :class => 'icon icon-del') %>
25 </td>
22 </td>
26 </tr>
23 </tr>
27 <% end %>
24 <% end %>
@@ -1,7 +1,7
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to l(:label_profile), user_path(@user), :class => 'icon icon-user' %>
2 <%= link_to l(:label_profile), user_path(@user), :class => 'icon icon-user' %>
3 <%= change_status_link(@user) %>
3 <%= change_status_link(@user) %>
4 <%= link_to(l(:button_delete), @user, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') if User.current != @user %>
4 <%= delete_link user_path(@user) if User.current != @user %>
5 </div>
5 </div>
6
6
7 <h2><%= link_to l(:label_user_plural), users_path %> &#187; <%=h @user.login %></h2>
7 <h2><%= link_to l(:label_user_plural), users_path %> &#187; <%=h @user.login %></h2>
@@ -46,7 +46,7
46 <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
46 <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
47 <td class="buttons">
47 <td class="buttons">
48 <%= change_status_link(user) %>
48 <%= change_status_link(user) %>
49 <%= link_to(l(:button_delete), user_path(user), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') unless User.current == user %>
49 <%= delete_link user_path(user) unless User.current == user %>
50 </td>
50 </td>
51 </tr>
51 </tr>
52 <% end -%>
52 <% end -%>
@@ -1,8 +1,7
1 <div class="contextual">
1 <div class="contextual">
2 <%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
2 <%= link_to(l(:button_edit), edit_version_path(@version), :class => 'icon icon-edit') if User.current.allowed_to?(:manage_versions, @version.project) %>
3 <%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
3 <%= link_to_if_authorized(l(:button_edit_associated_wikipage, :page_title => @version.wiki_page_title), {:controller => 'wiki', :action => 'edit', :project_id => @version.project, :id => Wiki.titleize(@version.wiki_page_title)}, :class => 'icon icon-edit') unless @version.wiki_page_title.blank? || @version.project.wiki.nil? %>
4 <%= link_to(l(:button_delete), version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)),
4 <%= delete_link version_path(@version, :back_url => url_for(:controller => 'versions', :action => 'index', :project_id => @version.project)) if User.current.allowed_to?(:manage_versions, @version.project) %>
5 :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') if User.current.allowed_to?(:manage_versions, @version.project) %>
6 <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
5 <%= call_hook(:view_versions_show_contextual, { :version => @version, :project => @project }) %>
7 </div>
6 </div>
8
7
@@ -5,7 +5,7
5 <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
5 <%= link_to_if_authorized(l(:button_lock), {:action => 'protect', :id => @page.title, :protected => 1}, :method => :post, :class => 'icon icon-lock') if !@page.protected? %>
6 <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
6 <%= link_to_if_authorized(l(:button_unlock), {:action => 'protect', :id => @page.title, :protected => 0}, :method => :post, :class => 'icon icon-unlock') if @page.protected? %>
7 <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.current_version? %>
7 <%= link_to_if_authorized(l(:button_rename), {:action => 'rename', :id => @page.title}, :class => 'icon icon-move') if @content.current_version? %>
8 <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :confirm => l(:text_are_you_sure), :class => 'icon icon-del') %>
8 <%= link_to_if_authorized(l(:button_delete), {:action => 'destroy', :id => @page.title}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :class => 'icon icon-del') %>
9 <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') unless @content.current_version? %>
9 <%= link_to_if_authorized(l(:button_rollback), {:action => 'edit', :id => @page.title, :version => @content.version }, :class => 'icon icon-cancel') unless @content.current_version? %>
10 <% end %>
10 <% end %>
11 <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
11 <%= link_to_if_authorized(l(:label_history), {:action => 'history', :id => @page.title}, :class => 'icon icon-history') %>
General Comments 0
You need to be logged in to leave comments. Login now