2011-03-31 00:10:23 +01:00
|
|
|
.block
|
|
|
|
.secondary-navigation
|
|
|
|
%ul.wat-cf
|
|
|
|
%li.first.active= link_to t("layout.users.list"), users_path
|
|
|
|
%li= link_to t("layout.users.new"), new_user_path
|
|
|
|
.content
|
|
|
|
%h2.title
|
|
|
|
= t("layout.users.list_header")
|
|
|
|
.inner
|
|
|
|
%table.table
|
|
|
|
%tr
|
|
|
|
%th.first ID
|
|
|
|
%th= t("activerecord.attributes.user.name")
|
|
|
|
%th= t("activerecord.attributes.user.email")
|
2011-10-28 23:36:02 +01:00
|
|
|
%th= t("activerecord.attributes.user.global_role")
|
2011-03-31 00:10:23 +01:00
|
|
|
%th.last
|
|
|
|
- @users.each do |user|
|
|
|
|
%tr{:class => cycle("odd", "even")}
|
|
|
|
%td
|
|
|
|
= user.id
|
|
|
|
%td
|
|
|
|
= link_to user.name, user_path(user)
|
|
|
|
%td
|
|
|
|
= user.email
|
2011-10-28 23:36:02 +01:00
|
|
|
%td
|
|
|
|
= user.global_role.name
|
2011-03-31 00:10:23 +01:00
|
|
|
%td.last
|
2011-10-28 23:36:02 +01:00
|
|
|
- if current_user.can_perform? 'users', 'show'
|
|
|
|
= link_to t("layout.show"), user_path(user)
|
|
|
|
\|
|
|
|
|
- if current_user.can_perform? 'users', 'edit'
|
|
|
|
#{link_to t("layout.edit"), edit_user_path(user)}
|
|
|
|
\|
|
|
|
|
- if current_user.can_perform? 'users', 'destroy'
|
|
|
|
#{link_to t("layout.delete"), user_path(user), :method => :delete, :confirm => t("layout.users.confirm_delete")}
|
2011-03-31 00:10:23 +01:00
|
|
|
.actions-bar.wat-cf
|
2011-10-26 21:57:51 +01:00
|
|
|
.actions= will_paginate @users, :param_name => :user_page
|