summaryrefslogtreecommitdiff
path: root/app/views/tenants/_admin_area.de.html.haml
blob: b9b47d5081c5448bbb8e37ef8522187316da9eeb (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
%p
  Sie sind Mitglied der  
  = link_to 'Admin Gruppe', tenant_user_group_path(@tenant, @tenant.user_groups.find_by_name('Admins'))
  und haben deshalb besondere Rechte. Aber wie Peter Parker schon sagte: "With great power comes great responsibility."

%p
  Dieser Mandant hat  
  = 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(', ')})"
  die in Summe 
  = link_to pluralize(@tenant.users.count, 'user'), tenant_users_path(@tenant)
  verwalten.
  Das System kann  
  = PhoneModel.count
  verschiedene Telefonmodelle von den folgenden Herstellern verwalten:  
  - 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 ' und ' do
        =link_to manufacturer, manufacturer_path(manufacturer)
    - else
      = succeed '.' do
        =link_to manufacturer, manufacturer_path(manufacturer)

%h3 SIP-Konten und Telefone

%table
  %tr{:class => 'even'}
    %th
    %th
      = @tenant
    %th
      Alle Benutzer von
      = "\"#{@tenant}\""
  %tr{:class => 'odd'}
    %td
      SIP-Konten
    %td
      = link_to @tenant.sip_accounts.count.to_s, tenant_sip_accounts_path(@tenant)
      = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => SipAccount}
    %td= @tenant.users_sip_accounts.count.to_s
  %tr{:class => 'even'}
    %td
      Telefone
    %td
      = link_to @tenant.phones.count.to_s, tenant_phones_path(@tenant)
      = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Phone}
    %td= @tenant.users_phones.count.to_s

%h3 Allgemein

%table
  %tr{:class => 'even'}
    %th
      Funktion
    %th
      Anzahl
    %th
  %tr{:class => 'odd'}
    %td
      Callthrough
    %td
      = link_to @tenant.callthroughs.count.to_s, tenant_callthroughs_path(@tenant)
    %td
      = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Callthrough}
  %tr{:class => 'even'}
    %td
      Konferenzen
    %td
      = link_to @tenant.conferences.count.to_s, tenant_conferences_path(@tenant)
    %td
      = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => Conference}
  %tr{:class => 'odd'}
    %td
      Rufgruppen
    %td
      = link_to @tenant.hunt_groups.count.to_s, tenant_hunt_groups_path(@tenant)
    %td
      = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => HuntGroup}
  %tr{:class => 'even'}
    %td
      Warteschleifen
    %td
      = link_to @tenant.automatic_call_distributors.count.to_s, tenant_automatic_call_distributors_path(@tenant)
    %td
      = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => AutomaticCallDistributor}
  %tr{:class => 'odd'}
    %td
      Oberflächen-Funktionen
    %td
      = link_to GuiFunction.count.to_s, gui_functions_path
    %td

-# Phone books
-#
- if GuiFunction.display?('show_phone_books_in_user_show_view', current_user)
  - if can?( :index, PhoneBook )
    %h2=t("phone_books.index.page_title")
    = render "phone_books/index_core", :phone_books => @tenant.phone_books
    = render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneBook}    

- if STRICT_INTERNAL_EXTENSION_HANDLING == true
  %h3= t('phone_number_ranges.index.page_title')

  - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(INTERNAL_EXTENSIONS).try(:phone_numbers).try(:count).to_i == 0
    Der Mandant 
    = "\"#{@tenant}\""
    wurde erst vor 
    = distance_of_time_in_words_to_now(@tenant.created_at)
    erstellt. Es gibt immer noch nicht abgeschlossene
    = pluralize(Delayed::Job.count, 'Hintergrundprozesse')
    \. Bitte warten Sie noch ein paar Minuten und laden anschließend diese Seite erneut.
  - else
    =render 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => SERVICE_NUMBERS))
    =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange}