list.rhtml
54 lines
| 2.4 KiB
| text/html+ruby
|
RhtmlLexer
|
r90 | <div class="contextual"> | ||
|
r154 | <%= link_to l(:label_user_new), {:action => 'add'}, :class => 'icon icon-add' %> | ||
|
r90 | </div> | ||
|
r12 | <h2><%=l(:label_user_plural)%></h2> | ||
|
r330 | |||
|
r1104 | <% form_tag({}, :method => :get) do %> | ||
|
r344 | <fieldset><legend><%= l(:label_filter_plural) %></legend> | ||
<label><%= l(:field_status) %> :</label> | ||||
<%= select_tag 'status', status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %> | ||||
</fieldset> | ||||
<% end %> | ||||
| ||||
|
r330 | <table class="list"> | ||
|
r105 | <thead><tr> | ||
|
r330 | <%= sort_header_tag('login', :caption => l(:field_login)) %> | ||
<%= sort_header_tag('firstname', :caption => l(:field_firstname)) %> | ||||
<%= sort_header_tag('lastname', :caption => l(:field_lastname)) %> | ||||
|
r1107 | <%= 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') %> | ||||
|
r330 | <th></th> | ||
|
r105 | </tr></thead> | ||
<tbody> | ||||
|
r1104 | <% for user in @users -%> | ||
<tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>"> | ||||
<td class="username"><%= link_to user.login, :action => 'edit', :id => user %></td> | ||||
<td class="firstname"><%= user.firstname %></td> | ||||
<td class="lastname"><%= user.lastname %></td> | ||||
<td class="email"><%= user.mail %></td> | ||||
<td align="center"><%= image_tag('true.png') if 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> | ||||
<td> | ||||
<small> | ||||
<% if user.locked? -%> | ||||
<%= link_to l(:button_unlock), {:action => 'edit', :id => user, :user => {:status => User::STATUS_ACTIVE}}, :method => :post, :class => 'icon icon-unlock' %> | ||||
<% elsif user.registered? -%> | ||||
<%= link_to l(:button_activate), {:action => 'edit', :id => user, :user => {:status => User::STATUS_ACTIVE}}, :method => :post, :class => 'icon icon-unlock' %> | ||||
<% else -%> | ||||
<%= link_to l(:button_lock), {:action => 'edit', :id => user, :user => {:status => User::STATUS_LOCKED}}, :method => :post, :class => 'icon icon-lock' %> | ||||
<% end -%> | ||||
</small> | ||||
</td> | ||||
|
r2 | </tr> | ||
|
r1104 | <% end -%> | ||
|
r105 | </tbody> | ||
|
r2 | </table> | ||
|
r330 | |||
|
r1013 | <p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p> | ||
|
r951 | |||
|
r1019 | <% html_title(l(:label_user_plural)) -%> | ||