diff options
| author | hukl <contact@smyck.org> | 2009-10-20 21:59:34 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-10-20 21:59:34 +0200 |
| commit | 239e27aaac4b22e8b58f4c78c140759937be97ff (patch) | |
| tree | b9c77929fec8d7eddb04f9e6a31094aabb85e47b | |
| parent | 324753b94474a18ffbc8cf243e502b71b67eab86 (diff) | |
some more user view cleanup
| -rw-r--r-- | app/views/users/_user.html.erb | 20 | ||||
| -rw-r--r-- | app/views/users/index.html.erb | 4 | ||||
| -rw-r--r-- | public/stylesheets/admin.css | 2 |
3 files changed, 18 insertions, 8 deletions
diff --git a/app/views/users/_user.html.erb b/app/views/users/_user.html.erb index 90e8b88..8117bcd 100644 --- a/app/views/users/_user.html.erb +++ b/app/views/users/_user.html.erb | |||
| @@ -1,9 +1,19 @@ | |||
| 1 | <% users.each do |user| %> | ||
| 1 | <tr> | 2 | <tr> |
| 2 | <td><%= user.login %></td> | 3 | <td class="user_login"><%= user.login %></td> |
| 3 | <td><%= link_to "show", user_path(user) %></td> | 4 | <td><%= link_to "show", user_path(user) %></td> |
| 5 | <% if current_user.admin? || current_user == user %> | ||
| 4 | <td> | 6 | <td> |
| 5 | <% if current_user.admin? || current_user == user %> | 7 | <%= link_to "edit", edit_user_path(user) %> |
| 6 | <%= link_to "edit", edit_user_path(user) %> | ||
| 7 | <% end %> | ||
| 8 | </td> | 8 | </td> |
| 9 | </tr> \ No newline at end of file | 9 | <td> |
| 10 | <%= link_to( | ||
| 11 | "destroy", | ||
| 12 | user_path(user), | ||
| 13 | :method => :delete, | ||
| 14 | :confirm => "Do you really want to delete user #{user.login}?" | ||
| 15 | ) %> | ||
| 16 | </td> | ||
| 17 | <% end %> | ||
| 18 | </tr> | ||
| 19 | <% end %> \ No newline at end of file | ||
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 8d931be..59806db 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb | |||
| @@ -2,11 +2,11 @@ | |||
| 2 | <tr> | 2 | <tr> |
| 3 | <td><h1>Admins</h1></td> | 3 | <td><h1>Admins</h1></td> |
| 4 | </tr> | 4 | </tr> |
| 5 | <%= render :partial => "user", :collection => @users[:admin], :as => :user %> | 5 | <%= render :partial => "user", :locals => {:users => @users[:admin] ||= []} %> |
| 6 | <tr> | 6 | <tr> |
| 7 | <td><h1>Users</h1></td> | 7 | <td><h1>Users</h1></td> |
| 8 | </tr> | 8 | </tr> |
| 9 | <%= render :partial => "user", :collection => @users[:user], :as => :user %> | 9 | <%= render :partial => "user", :locals => {:users => @users[:user] ||= []} %> |
| 10 | </table> | 10 | </table> |
| 11 | 11 | ||
| 12 | <% content_for :subnavigation do %> | 12 | <% content_for :subnavigation do %> |
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css index 4492aa5..2641b98 100644 --- a/public/stylesheets/admin.css +++ b/public/stylesheets/admin.css | |||
| @@ -443,7 +443,7 @@ input#move_to_search_term, input#node_staged_slug { | |||
| 443 | width: 680px; | 443 | width: 680px; |
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | table.user_list td { | 446 | table.user_list td.user_login { |
| 447 | padding-right: 30px; | 447 | padding-right: 30px; |
| 448 | } | 448 | } |
| 449 | 449 | ||
