summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 22:04:44 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-16 22:04:44 +0100
commit1bd91b138c773aedbd5f18b9df79e28fac240dbc (patch)
treec9fb90befda3745e7c6d203600e6679c39ba0b17 /app/views
parenta518270dbafa6eb9265c4124ca2887149c3de362 (diff)
Added a users table to tenant#view. Related to #105. Still a lot of room for
improvement.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/tenants/_admin_area.de.html.haml17
-rw-r--r--app/views/tenants/_admin_area.html.haml19
2 files changed, 27 insertions, 9 deletions
diff --git a/app/views/tenants/_admin_area.de.html.haml b/app/views/tenants/_admin_area.de.html.haml
index 89e14cb..0ef9da3 100644
--- a/app/views/tenants/_admin_area.de.html.haml
+++ b/app/views/tenants/_admin_area.de.html.haml
@@ -30,15 +30,24 @@
%h2 Admin Bereich
= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant}
+%h2= t("users.index.page_title")
+- if @tenant.users.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
+ = render "users/index_core", :users => @tenant.users
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => User}
+- else
+ %p
+ = link_to "Liste aller User.", tenant_users_path(@tenant)
+
- if @tenant.user_groups.any?
- %h2 Gruppen
+ %h2= t("user_groups.index.page_title")
= render "user_groups/index_core", :user_groups => @tenant.user_groups
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => UserGroup}
%h2 Features
= render :partial => 'tenants/table_of_functions', :locals => {:tenant => @tenant}
-%h2 Gemeinschaft Konfiguration
-= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => @tenant}
-
%h2=t("phone_books.index.page_title")
= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant}
+
+%h2 Gemeinschaft Konfiguration
+= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => @tenant} \ No newline at end of file
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml
index 7136f1e..7b47587 100644
--- a/app/views/tenants/_admin_area.html.haml
+++ b/app/views/tenants/_admin_area.html.haml
@@ -29,15 +29,24 @@
%h2 Admin Area
= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant}
+%h2= t("users.index.page_title")
+- if @tenant.users.count <= GsParameter.get('NUMBER_OF_SHOWN_ITEMS')
+ = render "users/index_core", :users => @tenant.users
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => User}
+- else
+ %p
+ = link_to "Liste aller User.", tenant_users_path(@tenant)
+
- if @tenant.user_groups.any?
- %h2 Groups
+ %h2= t("user_groups.index.page_title")
= render "user_groups/index_core", :user_groups => @tenant.user_groups
+ = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => UserGroup}
%h2 Features
= render :partial => 'tenants/table_of_functions', :locals => {:tenant => @tenant}
-%h2 Gemeinschaft Configuration
-= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => @tenant}
-
%h2=t("phone_books.index.page_title")
-= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant} \ No newline at end of file
+= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant}
+
+%h2 Gemeinschaft Configuration
+= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => @tenant} \ No newline at end of file