summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-10-24 15:39:40 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-10-24 15:39:40 +0000
commitd1b5bc1e82de96dee8c759ad1eff5406edafb65a (patch)
tree47975c7fe508b8439ed59704804b3e2fbd0b5636
parent6c54b0ba3b3fc15754d0e200758e5f615e92b4ee (diff)
downloadredmine-d1b5bc1e82de96dee8c759ad1eff5406edafb65a.tar.gz
redmine-d1b5bc1e82de96dee8c759ad1eff5406edafb65a.zip
AuthSource list: display associated users count and disable 'Delete' buton if any (#2041).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@1944 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/auth_sources/list.rhtml7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/auth_sources/list.rhtml b/app/views/auth_sources/list.rhtml
index 6836e6c67..5729ec77c 100644
--- a/app/views/auth_sources/list.rhtml
+++ b/app/views/auth_sources/list.rhtml
@@ -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>
@@ -18,8 +19,12 @@
<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>