summaryrefslogtreecommitdiff
path: root/app/views/users/_user_groups.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/users/_user_groups.html.haml')
-rw-r--r--app/views/users/_user_groups.html.haml7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/views/users/_user_groups.html.haml b/app/views/users/_user_groups.html.haml
new file mode 100644
index 0000000..81191ae
--- /dev/null
+++ b/app/views/users/_user_groups.html.haml
@@ -0,0 +1,7 @@
+-# User groups (only if the current user can edit or destroy them)
+-#
+- if user.user_groups.map{ |x| can?( :edit, x ) || can?( :destroy, x ) }.include?(true)
+ - if can?( :index, UserGroup )
+ %h2=t("user_groups.index.page_title")
+ - if user.user_groups.count > 0
+ = render "user_groups/index_core", :user_groups => user.user_groups.where(:tenant_id => tenant.id).order(:name)