To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / app / views / users / index.html.erb @ 912:5e80956cc792
History | View | Annotate | Download (2.64 KB)
| 1 | 0:513646585e45 | Chris | <div class="contextual"> |
|---|---|---|---|
| 2 | 909:cbb26bc654de | Chris | <%= link_to l(:label_user_new), new_user_path, :class => 'icon icon-add' %>
|
| 3 | 0:513646585e45 | Chris | </div>
|
| 4 | |||
| 5 | <h2><%=l(:label_user_plural)%></h2> |
||
| 6 | |||
| 7 | <% form_tag({}, :method => :get) do %>
|
||
| 8 | <fieldset><legend><%= l(:label_filter_plural) %></legend> |
||
| 9 | 909:cbb26bc654de | Chris | <label for='status'><%= l(:field_status) %>:</label> |
| 10 | 0:513646585e45 | Chris | <%= select_tag 'status', users_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
|
| 11 | 441:cbce1fd3b1b7 | Chris | |
| 12 | <% if @groups.present? %>
|
||
| 13 | 909:cbb26bc654de | Chris | <label for='group_id'><%= l(:label_group) %>:</label> |
| 14 | 441:cbce1fd3b1b7 | Chris | <%= select_tag 'group_id', '<option></option>' + options_from_collection_for_select(@groups, :id, :name, params[:group_id].to_i), :onchange => "this.form.submit(); return false;" %>
|
| 15 | <% end %>
|
||
| 16 | |||
| 17 | 909:cbb26bc654de | Chris | <label for='name'><%= l(:label_user) %>:</label> |
| 18 | 0:513646585e45 | Chris | <%= text_field_tag 'name', params[:name], :size => 30 %>
|
| 19 | <%= submit_tag l(:button_apply), :class => "small", :name => nil %>
|
||
| 20 | 441:cbce1fd3b1b7 | Chris | <%= link_to l(:button_clear), users_path, :class => 'icon icon-reload' %>
|
| 21 | 0:513646585e45 | Chris | </fieldset>
|
| 22 | <% end %>
|
||
| 23 |
|
||
| 24 | |||
| 25 | <div class="autoscroll"> |
||
| 26 | 909:cbb26bc654de | Chris | <table class="list"> |
| 27 | 0:513646585e45 | Chris | <thead><tr> |
| 28 | 909:cbb26bc654de | Chris | <%= sort_header_tag('login', :caption => l(:field_login)) %>
|
| 29 | <%= sort_header_tag('firstname', :caption => l(:field_firstname)) %>
|
||
| 30 | <%= sort_header_tag('lastname', :caption => l(:field_lastname)) %>
|
||
| 31 | <%= sort_header_tag('mail', :caption => l(:field_mail)) %>
|
||
| 32 | <%= sort_header_tag('admin', :caption => l(:field_admin), :default_order => 'desc') %>
|
||
| 33 | <%= sort_header_tag('created_on', :caption => l(:field_created_on), :default_order => 'desc') %>
|
||
| 34 | <%= sort_header_tag('last_login_on', :caption => l(:field_last_login_on), :default_order => 'desc') %>
|
||
| 35 | 0:513646585e45 | Chris | <th></th> |
| 36 | </tr></thead> |
||
| 37 | <tbody>
|
||
| 38 | <% for user in @users -%>
|
||
| 39 | <tr class="user <%= cycle("odd", "even") %> <%= %w(anon active registered locked)[user.status] %>"> |
||
| 40 | 909:cbb26bc654de | Chris | <td class="username"><%= avatar(user, :size => "14") %><%= link_to h(user.login), edit_user_path(user) %></td> |
| 41 | <td class="firstname"><%= h(user.firstname) %></td> |
||
| 42 | <td class="lastname"><%= h(user.lastname) %></td> |
||
| 43 | <td class="email"><%= mail_to(h(user.mail)) %></td> |
||
| 44 | <td align="center"><%= checked_image user.admin? %></td> |
||
| 45 | <td class="created_on" align="center"><%= format_time(user.created_on) %></td> |
||
| 46 | <td class="last_login_on" align="center"><%= format_time(user.last_login_on) unless user.last_login_on.nil? %></td> |
||
| 47 | 128:07fa8a8b56a8 | Chris | <td class="buttons"> |
| 48 | 909:cbb26bc654de | Chris | <%= change_status_link(user) %>
|
| 49 | <%= link_to(l(:button_delete), user, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del') unless User.current == user %>
|
||
| 50 | 128:07fa8a8b56a8 | Chris | </td>
|
| 51 | 0:513646585e45 | Chris | </tr>
|
| 52 | <% end -%>
|
||
| 53 | </tbody>
|
||
| 54 | </table>
|
||
| 55 | </div>
|
||
| 56 | <p class="pagination"><%= pagination_links_full @user_pages, @user_count %></p> |
||
| 57 | |||
| 58 | <% html_title(l(:label_user_plural)) -%> |