diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-22 15:33:06 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-22 15:33:06 +0100 |
commit | 39aa7132ceed3d4beab3a9b828e571bbfc67c07e (patch) | |
tree | 6c88289c9f99be0af8635636fcdf64102090e5ec /app/views/tenants/_admin_area.html.haml | |
parent | 5ad8203ce4f1bfea997960d0b52c626dea24b944 (diff) | |
parent | 6f69c1a85055ec7c2515719d79d2a7a4e60cec50 (diff) |
Merge branch 'develop'5.1-beta1
Diffstat (limited to 'app/views/tenants/_admin_area.html.haml')
-rw-r--r-- | app/views/tenants/_admin_area.html.haml | 126 |
1 files changed, 21 insertions, 105 deletions
diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index d648143..627f221 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,116 +1,32 @@ -%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." += render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => tenant} + += render :partial => 'users_table', :locals => {:tenant => tenant} + += render :partial => 'user_groups_table', :locals => {:tenant => tenant} + +%h2 Features += render :partial => 'tenants/table_of_functions', :locals => {:tenant => tenant} + += render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} + +%h2 Gemeinschaft Konfiguration += render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} %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 + Das System kann = PhoneModel.count - different phone models from the manufacturers + 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) + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last - = succeed ' and ' do - =link_to manufacturer, manufacturer_path(manufacturer) + = succeed ' und ' do + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - else = succeed '.' do - =link_to manufacturer, manufacturer_path(manufacturer) - -%h3 SIP-Accounts and Phones - -%table - %tr{:class => 'even'} - %th - %th - = @tenant - %th - All users of - = "\"#{@tenant}\"" - %tr{:class => 'odd'} - %td - SIP accounts - %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 - Phones - %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 Misc - -%table - %tr{:class => 'even'} - %th - Feature - %th - Counter - %th - %tr{:class => 'odd'} - %td - Callthroughs - %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 - Conferences - %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 - Hunt groups - %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 - ACDs - %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 - GUI functions - %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} + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) -- if STRICT_INTERNAL_EXTENSION_HANDLING == true - %h3= t('phone_number_ranges.index.page_title') += render :partial => 'call_routes', :locals => {:tenant => tenant} - - 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 - This tenant was created - = distance_of_time_in_words_to_now(@tenant.created_at) - ago. There are still - = pluralize(Delayed::Job.count, 'background job') - not finished. This can take a couple of minutes. Please reload this page later. - - 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} += render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways}
\ No newline at end of file |