summaryrefslogtreecommitdiff
path: root/app/views/tenants/_admin_area.html.haml
blob: 7b475874a4d36eb3a135eadcaa6e9957bfd68c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
- cache(['tenant_show_admin_area', I18n.locale, @tenant, UserGroup.count, UserGroup.order(:updated_at).last, User.count, User.order(:updated_at).last, Manufacturer.all]) do
  %p
    You belong to the 
    = link_to 'admin group', tenant_user_group_path(@tenant, @tenant.user_groups.find_by_name('Admins'))
    and therefore have super powers. But always remember Peter Parker's: "With great power comes great responsibility."

  %p
    = succeed '.' do
      This tenant has 
      = link_to pluralize(@tenant.user_groups.count, 'user group'), tenant_user_groups_path(@tenant)
      - if @tenant.user_groups.count < 5
        = "(#{@tenant.user_groups.order(:name).map{|group| group.to_s }.join(', ')})"
      which handle a total of 
      = link_to pluralize(@tenant.users.count, 'user'), tenant_users_path(@tenant)
    This system can setup 
    = PhoneModel.count
    different phone models from the manufacturers 
    - Manufacturer.all.each do |manufacturer|
      - if manufacturer != Manufacturer.last && manufacturer != Manufacturer.limit(Manufacturer.count - 1).last
        = succeed ', ' do
          =link_to manufacturer, manufacturer_path(manufacturer)
      - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last
        = succeed ' and ' do
          =link_to manufacturer, manufacturer_path(manufacturer)
      - else
        = succeed '.' do
          =link_to manufacturer, manufacturer_path(manufacturer)

%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= 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=t("phone_books.index.page_title")
= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant}

%h2 Gemeinschaft Configuration
= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => @tenant}