diff options
| author | hukl <contact@smyck.org> | 2009-10-20 17:47:31 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-10-20 17:47:38 +0200 |
| commit | dd60eb392d2c1a4fa616b4a22083742314a99e9a (patch) | |
| tree | 52eadb9b04ee6cf6548b0bda45cfd45445c417bc | |
| parent | cdf1e60f63ea1bbe819d91ca8f1e3be8c71f247e (diff) | |
basic user editing
| -rw-r--r-- | app/views/users/edit.html.erb | 2 | ||||
| -rw-r--r-- | app/views/users/index.html.erb | 14 |
2 files changed, 13 insertions, 3 deletions
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 5b73242..dae13ce 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb | |||
| @@ -24,7 +24,7 @@ | |||
| 24 | </tr> | 24 | </tr> |
| 25 | <tr> | 25 | <tr> |
| 26 | <td class="description"></td> | 26 | <td class="description"></td> |
| 27 | <td class="right"><%= f.submit "Create" %></td> | 27 | <td class="right"><%= f.submit "Update" %></td> |
| 28 | </tr> | 28 | </tr> |
| 29 | </table> | 29 | </table> |
| 30 | <% end %> \ No newline at end of file | 30 | <% end %> \ No newline at end of file |
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 8526d84..03085c1 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb | |||
| @@ -2,9 +2,19 @@ | |||
| 2 | 2 | ||
| 3 | <table id="user_list"> | 3 | <table id="user_list"> |
| 4 | <tr> | 4 | <tr> |
| 5 | <td>login</td> | 5 | <th>login</th> |
| 6 | </tr> | 6 | </tr> |
| 7 | <%= user_list_by_admin_status %> | 7 | <% @users.each do |user| %> |
| 8 | <tr> | ||
| 9 | <td><%= user.login %></td> | ||
| 10 | <td><%= link_to "show", user_path(user) %></td> | ||
| 11 | <td> | ||
| 12 | <% if current_user == user || current_user.admin? %> | ||
| 13 | <%= link_to "Edit", edit_user_path(user) %> | ||
| 14 | <% end %> | ||
| 15 | </td> | ||
| 16 | </tr> | ||
| 17 | <% end %> | ||
| 8 | </table> | 18 | </table> |
| 9 | 19 | ||
| 10 | 20 | ||
