summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/views/users/edit.html.erb2
-rw-r--r--app/views/users/index.html.erb14
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