app/views/users/index.html.erb in iqvoc-3.5.7 vs app/views/users/index.html.erb in iqvoc-4.0.0
- old
+ new
@@ -1,29 +1,29 @@
-<h2><%= t('txt.views.users.index.header') %></h2>
-
-<table class="management">
- <tr>
- <th><%= t('txt.views.users.name') %></th>
- <th><%= t('txt.views.users.email') %></th>
- <th><%= t('txt.views.users.telephone_number') %></th>
- <th><%= t('txt.views.users.role') %></th>
- <th><%= t('txt.views.users.active') %></th>
- </tr>
-
- <% @users.each do |user| %>
+<%= page_header :title => t('txt.views.users.index.header') %>
+<table class="table">
+ <thead>
<tr>
- <td><%=h user.name %></td>
- <td><%=h user.email %></td>
- <td><%=h user.telephone_number %></td>
- <td><%=h user.role.humanize %></td>
- <td><%=h user.active? ? 1 : 0 %></td>
- <td><%= link_to t('txt.views.users.edit_link'), edit_user_path(:id => user), :class => "button" %></td>
- <td><%= button_to t('txt.views.users.destroy_link'), user_path(:id => user), :confirm => t('txt.views.users.sure'), :method => :delete %></td>
+ <th><%= t('txt.views.users.name') %></th>
+ <th><%= t('txt.views.users.email') %></th>
+ <th><%= t('txt.views.users.telephone_number') %></th>
+ <th><%= t('txt.views.users.role') %></th>
+ <th><%= t('txt.views.users.active') %></th>
</tr>
- <% end %>
+ </thead>
+ <tbody>
+ <% @users.each do |user| %>
+ <tr>
+ <td><%= user.name %></td>
+ <td><%= user.email %></td>
+ <td><%= user.telephone_number %></td>
+ <td><%= user.role.humanize %></td>
+ <td><%= user.active? ? glyph(:yes) : glyph(:no) %></td>
+ <td>
+ <%= link_to t('txt.views.users.edit_link'), edit_user_path(:id => user), :class => "btn" %>
+ <%= link_to t('txt.views.users.destroy_link'), user_path(:id => user), :confirm => t('txt.views.users.sure'), :method => :delete, :class => "btn btn-danger" %>
+ </td>
+ </tr>
+ <% end %>
+ </tbody>
</table>
-<%= content_for :sub_navigation do %>
- <ul>
- <li><%= link_to t('txt.views.users.new_link'), new_user_path, :class => "button" %></li>
- </ul>
-<% end %>
+<%= render 'sidebar' %>