]> source.dussan.org Git - redmine.git/commitdiff
replaced some submit buttons by links on projects/settings
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 26 Dec 2006 11:42:37 +0000 (11:42 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Tue, 26 Dec 2006 11:42:37 +0000 (11:42 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@119 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/projects/settings.rhtml

index 3f9cba0a06791261cf72bea482b2fac0b143b691..6c2e53cdb08101d05d9edf02d901c097dfbd6f1f 100644 (file)
         <% end %>
     </td>\r
     <td>
-               <% if authorize_for('members', 'destroy') %>\r
-               <%= start_form_tag :controller => 'members', :action => 'destroy', :id => member %>\r
-               <%= submit_tag l(:button_delete), :class => "button-small" %>\r
-               <%= end_form_tag %>
-        <% end %>\r
+        <%= link_to_if_authorized l(:button_delete), {:controller => 'members', :action => 'destroy', :id => member}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
     </td>\r
        </tr>\r
        <% end %>\r
   <td width="100"><strong><%=h version.name %></strong></td>\r
   <td width="100"><%= format_date(version.effective_date) %></td>\r
   <td><%=h version.description %></td>
-  <td>&nbsp;&nbsp;&nbsp;
-      <%= link_to_if_authorized l(:button_edit), :controller => 'versions', :action => 'edit', :id => version %>
-      <% if authorize_for('versions', 'destroy') %>
-      &nbsp;\r
-      <%= start_form_tag :controller => 'versions', :action => 'destroy', :id => version %>\r
-      <%= submit_tag l(:button_delete), :class => "button-small" %>\r
-      <%= end_form_tag %>  
-      <% end %>\r
+  <td>
+      <%= link_to_if_authorized l(:button_edit), { :controller => 'versions', :action => 'edit', :id => version }, :class => 'pic picEdit' %>
+      <%= link_to_if_authorized l(:button_delete), {:controller => 'versions', :action => 'destroy', :id => version}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
   </td>\r
   </tr>\r
 <% end %>\r
         <% end %>\r
     </td>\r
     <td>
-        <% if authorize_for('issue_categories', 'destroy') %>\r
-        <%= start_form_tag :controller => 'issue_categories', :action => 'destroy', :id => @category %>\r
-        <%= submit_tag l(:button_delete), :class => "button-small" %>\r
-        <%= end_form_tag %>
-        <% end %>\r
+        <%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => @category}, :confirm => l(:text_are_you_sure), :post => true, :class => 'pic picDelete' %>
     </td>\r
        </tr>\r
        <% end %>\r