From ddb3dfa92ec0878240211cb2b7a8e125961b1360 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 23:01:16 +0100 Subject: Moved to GsParemeter.get and set defaults for a couple of validations. --- app/views/tenants/_admin_area.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index d648143..afd50b5 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -102,15 +102,15 @@ = 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 +- if GsParameter.get('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 + - if @tenant.created_at > (Time.now - 15.minutes) && Delayed::Job.count > 0 && @tenant.phone_number_ranges.find_by_name(GsParameter.get('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 'phone_number_ranges/index_core', :phone_number_ranges => (@tenant.phone_number_ranges + @tenant.country.phone_number_ranges.where(:name => GsParameter.get('SERVICE_NUMBERS'))) =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange} -- cgit v1.2.3 From 9f0034ff3c969c867258a90d1a9c6f76f392092a Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 21:58:18 +0100 Subject: Refactoring and adding some caching for tenant#view. --- app/views/tenants/_admin_area.html.haml | 25 +------------------------ 1 file changed, 1 insertion(+), 24 deletions(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index afd50b5..c838a18 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -25,30 +25,7 @@ = 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 += render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant} %h3 Misc -- cgit v1.2.3 From 49738b091eea2ca65d6f8c71b88747e314ec2950 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Thu, 10 Jan 2013 22:44:10 +0100 Subject: Refactoring and adding some caches. --- app/views/tenants/_admin_area.html.haml | 115 ++++++++------------------------ 1 file changed, 28 insertions(+), 87 deletions(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index c838a18..56b0820 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,93 +1,34 @@ -%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." +- cache([I18n.locale, @tenant, UserGroup.count, UserGroup.order(:updated_at).last, User.count, User.order(:updated_at).last, Manufacturer.count, Manufacturer.order(:updated_at).last, PhoneModel.count]) 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) + %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) = render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant} -%h3 Misc += render :partial => 'tenants/table_of_functions', :locals => {:tenant => @tenant} -%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 += render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant} --# 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 GsParameter.get('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(GsParameter.get('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 => GsParameter.get('SERVICE_NUMBERS'))) - =render :partial => 'shared/create_link', :locals => {:parent => @tenant, :child_class => PhoneNumberRange} -- cgit v1.2.3 From 45ab6dc23ef7d8d6ddf60ab355c2d1b3450f35c8 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 12 Jan 2013 22:54:59 +0100 Subject: Cache fixes. --- app/views/tenants/_admin_area.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 56b0820..b479995 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,4 +1,4 @@ -- cache([I18n.locale, @tenant, UserGroup.count, UserGroup.order(:updated_at).last, User.count, User.order(:updated_at).last, Manufacturer.count, Manufacturer.order(:updated_at).last, PhoneModel.count]) do +- cache([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')) -- cgit v1.2.3 From bdad29d001523a2ba4f515e6202babaa61739fc9 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 15 Jan 2013 18:02:06 +0100 Subject: Refactoring and caching. --- app/views/tenants/_admin_area.html.haml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index b479995..b1b17a3 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -26,9 +26,14 @@ = succeed '.' do =link_to manufacturer, manufacturer_path(manufacturer) +%h2 Admin Area = render :partial => 'tenants/sip_accounts_and_phones', :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 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 -- cgit v1.2.3 From 96fc4789d9991548b9fd1144f185da1f3464f156 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Tue, 15 Jan 2013 21:47:26 +0100 Subject: Fixed caching bugs. --- app/views/tenants/_admin_area.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index b1b17a3..65810e7 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,4 +1,4 @@ -- cache([I18n.locale, @tenant, UserGroup.count, UserGroup.order(:updated_at).last, User.count, User.order(:updated_at).last, Manufacturer.all]) do +- 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')) -- cgit v1.2.3 From 9ffaaeeb42b364f2c7d9b7d17a272c530f546c83 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 16 Jan 2013 21:46:37 +0100 Subject: Refactoring and adding user_groups to tenant#show #105 --- app/views/tenants/_admin_area.html.haml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 65810e7..7136f1e 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -29,6 +29,10 @@ %h2 Admin Area = render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant} +- if @tenant.user_groups.any? + %h2 Groups + = render "user_groups/index_core", :user_groups => @tenant.user_groups + %h2 Features = render :partial => 'tenants/table_of_functions', :locals => {:tenant => @tenant} -- cgit v1.2.3 From 1bd91b138c773aedbd5f18b9df79e28fac240dbc Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Wed, 16 Jan 2013 22:04:44 +0100 Subject: Added a users table to tenant#view. Related to #105. Still a lot of room for improvement. --- app/views/tenants/_admin_area.html.haml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'app/views/tenants/_admin_area.html.haml') 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 -- cgit v1.2.3 From 8feb9102570d23f53c3443ccd3a409d87c97828d Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Fri, 18 Jan 2013 10:57:12 +0100 Subject: Refactoring and fixing #112 --- app/views/tenants/_admin_area.html.haml | 45 ++++++++++++--------------------- 1 file changed, 16 insertions(+), 29 deletions(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 7b47587..e708215 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,31 +1,3 @@ -- 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} @@ -49,4 +21,19 @@ = 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 += render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => @tenant} + +%p + 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) \ No newline at end of file -- cgit v1.2.3 From a4c2b5b00c074d8861ef313f672032611d662fff Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 19 Jan 2013 08:53:02 +0100 Subject: Refactoring. --- app/views/tenants/_admin_area.html.haml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index e708215..50ed372 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,23 +1,12 @@ -%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) += render :partial => 'users_table', :locals => {:tenant => @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} += render :partial => 'user_groups_table', :locals => {:tenant => @tenant} %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 -- cgit v1.2.3 From 4ea0e252683d89794deff7b1b3689d2cdf61e0d0 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 20 Jan 2013 19:54:11 +0100 Subject: Added a gateways table to tenant#view. --- app/views/tenants/_admin_area.html.haml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 50ed372..b974c02 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -25,4 +25,6 @@ =link_to manufacturer, manufacturer_path(manufacturer) - else = succeed '.' do - =link_to manufacturer, manufacturer_path(manufacturer) \ No newline at end of file + =link_to manufacturer, manufacturer_path(manufacturer) + += render :partial => 'call_routes', :locals => {:tenant => @tenant} \ No newline at end of file -- cgit v1.2.3 From 4e67f8769a3a3199bfb5b363fe9baa231c329a2b Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sun, 20 Jan 2013 20:57:35 +0100 Subject: Refactoring --- app/views/tenants/_admin_area.html.haml | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index b974c02..7e7e46b 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -1,30 +1,32 @@ -= render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => @tenant} += render :partial => 'tenants/sip_accounts_and_phones', :locals => {:tenant => tenant} -= render :partial => 'users_table', :locals => {:tenant => @tenant} += render :partial => 'users_table', :locals => {:tenant => tenant} -= render :partial => 'user_groups_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_functions', :locals => {:tenant => tenant} -= render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => @tenant} += render :partial => 'tenants/table_of_phone_books', :locals => {:tenant => tenant} -%h2 Gemeinschaft Configuration -= render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => @tenant} +%h2 Gemeinschaft Konfiguration += render :partial => 'tenants/gs_parameter_table', :locals => {:tenant => tenant} %p - 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) - elsif manufacturer == Manufacturer.limit(Manufacturer.count - 1).last - = succeed ' and ' do + = succeed ' und ' do =link_to manufacturer, manufacturer_path(manufacturer) - else = succeed '.' do =link_to manufacturer, manufacturer_path(manufacturer) -= render :partial => 'call_routes', :locals => {:tenant => @tenant} \ No newline at end of file += render :partial => 'call_routes', :locals => {:tenant => tenant} + += render :partial => 'gateways', :locals => {:tenant => tenant, :gateways => gateways} \ No newline at end of file -- cgit v1.2.3 From c52babd4346b1a52c28bb7437d0434ecfb9ab70f Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 21 Jan 2013 22:25:32 +0100 Subject: Twitter Bootstrap stuff. --- app/views/tenants/_admin_area.html.haml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/views/tenants/_admin_area.html.haml') diff --git a/app/views/tenants/_admin_area.html.haml b/app/views/tenants/_admin_area.html.haml index 7e7e46b..627f221 100644 --- a/app/views/tenants/_admin_area.html.haml +++ b/app/views/tenants/_admin_area.html.haml @@ -19,13 +19,13 @@ - 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 ' und ' do - =link_to manufacturer, manufacturer_path(manufacturer) + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) - else = succeed '.' do - =link_to manufacturer, manufacturer_path(manufacturer) + =link_to link_to Haml::Engine.new("%i.icon-list").render + ' ' + manufacturer, manufacturer_path(manufacturer) = render :partial => 'call_routes', :locals => {:tenant => tenant} -- cgit v1.2.3