2012-03-29 19:34:45 +01:00
|
|
|
%h3.fix= title t("layout.users.list_header")
|
2012-03-20 18:11:28 +00:00
|
|
|
|
|
|
|
- columns = [{:type => 'html'}, {:type => 'html'}, {:type => 'html'}, {:type => 'html', :sortable => false, :searchable => false}, {:type => nil, :sortable => false, :searchable => false, :class => 'buttons'}]
|
2012-03-23 10:51:18 +00:00
|
|
|
= raw datatable(columns, {:sort_by => "[0, 'asc']", :processing => t("layout.processing"), :search_label => t("layout.search.header"),
|
2012-03-20 18:11:28 +00:00
|
|
|
:pagination_labels => {:previous => t("datatables.previous_label"), :next => t("datatables.next_label")},
|
|
|
|
:empty_label => t("datatables.empty_label"),
|
|
|
|
:info_label => t("datatables.info_label"),
|
|
|
|
:info_empty_label => t("datatables.info_empty_label"),
|
|
|
|
:filtered_label => t("datatables.filtered_label"),
|
|
|
|
:table_dom_id => 'datatable',
|
|
|
|
:auto_width => 'false',
|
|
|
|
:ajax_source => "#{url_for :controller => 'admin/users', :action => :list}",
|
|
|
|
:additional_data => {:filter => "' + $('#users_filter[type=\"radio\"]:checked').val() + '"} })
|
|
|
|
|
|
|
|
%table#datatable.tablesorter.list-users{:cellspacing => 0, :cellpadding => 0}
|
|
|
|
%thead
|
|
|
|
%tr
|
|
|
|
%th.th1= t("activerecord.attributes.user.name")
|
|
|
|
%th.th2= t("activerecord.attributes.user.uname")
|
|
|
|
%th.th3= t("activerecord.attributes.user.email")
|
|
|
|
%th.th4= t("activerecord.attributes.user.role")
|
|
|
|
%th.last
|
|
|
|
%tbody
|
|
|
|
%br
|
|
|
|
|
2012-05-02 10:18:07 +01:00
|
|
|
= render 'sidebar'
|
|
|
|
= render 'submenu'
|
2012-03-20 18:11:28 +00:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$('#users_filter[type="radio"]').live('change', function(){
|
|
|
|
$('#datatable').dataTable().fnDraw();
|
|
|
|
});
|