2006-12-16 15:15:31 +03:00
|
|
|
<div class="contextual">
|
2011-11-23 01:43:11 +04:00
|
|
|
<%= link_to l(:label_user_new), new_user_path, :class => 'icon icon-add' %>
|
2006-12-16 15:15:31 +03:00
|
|
|
</div>
|
|
|
|
|
2006-07-29 23:54:22 +04:00
|
|
|
<h2><%=l(:label_user_plural)%></h2>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2012-04-25 21:17:49 +04:00
|
|
|
<%= form_tag({}, :method => :get) do %>
|
2007-03-18 23:44:33 +03:00
|
|
|
<fieldset><legend><%= l(:label_filter_plural) %></legend>
|
2011-10-29 05:20:28 +04:00
|
|
|
<label for='status'><%= l(:field_status) %>:</label>
|
2008-08-12 01:10:24 +04:00
|
|
|
<%= select_tag 'status', users_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
|
2011-03-16 21:20:08 +03:00
|
|
|
|
|
|
|
<% if @groups.present? %>
|
2011-10-29 05:20:28 +04:00
|
|
|
<label for='group_id'><%= l(:label_group) %>:</label>
|
2012-05-13 12:38:35 +04:00
|
|
|
<%= select_tag 'group_id', content_tag('option') + options_from_collection_for_select(@groups, :id, :name, params[:group_id].to_i), :onchange => "this.form.submit(); return false;" %>
|
2011-03-16 21:20:08 +03:00
|
|
|
<% end %>
|
|
|
|
|
2011-10-29 05:20:28 +04:00
|
|
|
<label for='name'><%= l(:label_user) %>:</label>
|
2008-10-24 20:59:15 +04:00
|
|
|
<%= text_field_tag 'name', params[:name], :size => 30 %>
|
|
|
|
<%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
2011-03-16 21:23:51 +03:00
|
|
|
<%= link_to l(:button_clear), users_path, :class => 'icon icon-reload' %>
|
2007-03-18 23:44:33 +03:00
|
|
|
</fieldset>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
2010-02-06 17:05:13 +03:00
|
|
|
<div class="autoscroll">
|
2011-09-18 05:57:49 +04:00
|
|
|
<table class="list">
|
2006-12-24 19:35:25 +03:00
|
|
|
<thead><tr>
|
2011-09-18 03:11:01 +04:00
|
|
|
<%= sort_header_tag('login', :caption => l(:field_login)) %>
|
|
|
|
<%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
|
|
|
|
<%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
|
|
|
|
<%= sort_header_tag('mail', :caption => l(:field_mail)) %>
|
|
|
|
<%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
|
|
|
|
<%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
|
|
|
|
<%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<th></th>
|
2006-12-24 19:35:25 +03:00
|
|
|
</tr></thead>
|
|
|
|
<tbody>
|
2008-02-03 22:53:52 +03:00
|
|
|
<% for user in @users -%>
|
|
|
|
<tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>">
|
2011-09-18 03:11:01 +04:00
|
|
|
<td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td>
|
|
|
|
<td class="firstname"><%= h(user.firstname) %></td>
|
|
|
|
<td class="lastname"><%= h(user.lastname) %></td>
|
|
|
|
<td class="email"><%= mail_to(h(user.mail)) %></td>
|
|
|
|
<td align="center"><%= checked_image user.admin? %></td>
|
|
|
|
<td class="created_on" align="center"><%= format_time(user.created_on) %></td>
|
|
|
|
<td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td>
|
2011-01-16 18:23:11 +03:00
|
|
|
<td class="buttons">
|
2011-09-18 03:11:01 +04:00
|
|
|
<%= change_status_link(user) %>
|
2012-08-25 01:23:10 +04:00
|
|
|
<%= delete_link user_path(user, :back_url => users_path(params)) unless User.current == user %>
|
2011-01-16 18:23:11 +03:00
|
|
|
</td>
|
2006-06-28 22:11:03 +04:00
|
|
|
</tr>
|
2008-02-03 22:53:52 +03:00
|
|
|
<% end -%>
|
2006-12-24 19:35:25 +03:00
|
|
|
</tbody>
|
2006-06-28 22:11:03 +04:00
|
|
|
</table>
|
2010-02-06 17:05:13 +03:00
|
|
|
</div>
|
2007-12-29 14:36:30 +03:00
|
|
|
<p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p>
|
2007-12-07 21:42:40 +03:00
|
|
|
|
2008-01-03 01:41:53 +03:00
|
|
|
<% html_title(l(:label_user_plural)) -%>
|