summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/page_controller.rb1
-rw-r--r--app/controllers/tenants_controller.rb21
2 files changed, 18 insertions, 4 deletions
diff --git a/app/controllers/page_controller.rb b/app/controllers/page_controller.rb
index 1f37449..4ea4d25 100644
--- a/app/controllers/page_controller.rb
+++ b/app/controllers/page_controller.rb
@@ -7,6 +7,7 @@ class PageController < ApplicationController
def index;end
def conference;end
+ def beginners_intro;end
private
def if_fresh_system_then_go_to_wizard
diff --git a/app/controllers/tenants_controller.rb b/app/controllers/tenants_controller.rb
index 724d179..7bb8ecd 100644
--- a/app/controllers/tenants_controller.rb
+++ b/app/controllers/tenants_controller.rb
@@ -58,14 +58,27 @@ class TenantsController < ApplicationController
end
if Delayed::Job.count > 0
- redirect_to @tenant, :notice => t('tenants.controller.successfuly_created_plus_delayed_jobs',
+ if SipAccount.any? || Phone.any?
+ redirect_to @tenant, :notice => t('tenants.controller.successfuly_created_plus_delayed_jobs',
:resource => @tenant,
:amount_of_numbers => @tenant.array_of_internal_extension_numbers.count + @tenant.array_of_dids.count
)
- else
- redirect_to @tenant, :notice => t('tenants.controller.successfuly_created',
- :resource => @tenant
+ else
+ redirect_to page_beginners_intro_path, :notice => t('tenants.controller.successfuly_created_plus_delayed_jobs',
+ :resource => @tenant,
+ :amount_of_numbers => @tenant.array_of_internal_extension_numbers.count + @tenant.array_of_dids.count
)
+ end
+ else
+ if SipAccount.any? || Phone.any?
+ redirect_to @tenant, :notice => t('tenants.controller.successfuly_created',
+ :resource => @tenant
+ )
+ else
+ redirect_to page_beginners_intro_path, :notice => t('tenants.controller.successfuly_created',
+ :resource => @tenant
+ )
+ end
end
else
render :new