]> source.dussan.org Git - redmine.git/commitdiff
AuthSource list: display associated users count and disable 'Delete' buton if any...
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 24 Oct 2008 15:39:40 +0000 (15:39 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 24 Oct 2008 15:39:40 +0000 (15:39 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1944 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/auth_sources/list.rhtml

index 6836e6c673bd1de0295a732367f3a74174fb299e..5729ec77c026308a1d4196e4d9fd3a3509c46fc9 100644 (file)
@@ -9,6 +9,7 @@
          <th><%=l(:field_name)%></th>
          <th><%=l(:field_type)%></th>
          <th><%=l(:field_host)%></th>
+         <th><%=l(:label_user_plural)%></th>
          <th></th>
          <th></th>
   </tr></thead>
     <td><%= link_to source.name, :action => 'edit', :id => source%></td>
     <td align="center"><%= source.auth_method_name %></td>
     <td align="center"><%= source.host %></td>    
+    <td align="center"><%= source.users.count %></td>
     <td align="center"><%= link_to l(:button_test), :action => 'test_connection', :id => source %></td>
-    <td align="center"><%= button_to l(:button_delete), { :action => 'destroy', :id => source }, :confirm => l(:text_are_you_sure), :class => "button-small" %></td>
+    <td align="center"><%= button_to l(:button_delete), { :action => 'destroy', :id => source },
+                                                        :confirm => l(:text_are_you_sure),
+                                                        :class => "button-small",
+                                                        :disabled => source.users.any? %></td>
   </tr>
 <% end %>
   </tbody>