Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge remote-tracking branch 'origin/41-fixes'

  • Loading branch information...
commit 9e1bcf31ae1b4083a3b71ec21d92eadd11175e1b 2 parents 050d7b1 + b8e07f9
@dcu dcu authored
View
1  app/controllers/doc_controller.rb
@@ -25,6 +25,7 @@ def chat
protected
def check_ssl
+ return unless AppConfig.force_ssl_on_plans
if request.protocol == 'http://'
if current_group.has_custom_domain? && !current_group.is_stripe_customer?
redirect_to "https://#{AppConfig.domain}/plans?group_id=#{current_group.id}"
View
2  app/controllers/groups_controller.rb
@@ -297,7 +297,7 @@ def downgrade
end
return unless @group && current_user.owner_of?(@group)
@group.downgrade!
- if @group.has_custom_domain?
+ if @group.has_custom_domain? && AppConfig.force_ssl_on_plans
redirect_to "http://#{@group.domain}#{invoices_path}", :notice =>
I18n.t('groups.downgrade.notice')
View
18 app/views/invoices/index.html.haml
@@ -10,12 +10,20 @@
= raw t('invoices.index.upgrade', :current_plan => current_group.shapado_version.name)
- if current_group.is_stripe_customer?
%p.update_card
- - if current_group.has_late_payment
- %h2
- %u= link_to t('invoices.index.late_update_cc_link'), "https://#{@domain}#{manage_edit_card_path(:group_id => @group_id)}"
+ - if AppConfig.force_ssl_on_plans
+ - if current_group.has_late_payment
+ %h2
+ %u= link_to t('invoices.index.late_update_cc_link'), "https://#{@domain}#{manage_edit_card_path(:group_id => @group_id)}"
+ - else
+ %u
+ = link_to t('invoices.index.update_cc_link'), "https://#{@domain}#{manage_edit_card_path(:group_id => @group_id)}"
- else
- %u
- = link_to t('invoices.index.update_cc_link'), "https://#{@domain}#{manage_edit_card_path(:group_id => @group_id)}"
+ - if current_group.has_late_payment
+ %h2
+ %u= link_to t('invoices.index.late_update_cc_link'), "http://#{@domain}#{manage_edit_card_path(:group_id => @group_id)}"
+ - else
+ %u
+ = link_to t('invoices.index.update_cc_link'), "http://#{@domain}#{manage_edit_card_path(:group_id => @group_id)}"
- if current_group.upcoming_invoice
%p
= link_to t('invoices.index.upcoming_invoice'), upcoming_invoices_path
View
1  app/views/layouts/shapadocom.html.haml
@@ -48,6 +48,7 @@
%strong#pitchy Thanks to a powerful search engine, the ability to answer by email and edit each other answers to improve them as wiki, Shapado will make information available accross the company with no fuss.
%p
= link_to "See plans and pricing!", '/plans', :class => 'btn btn-success btn-large'
+ = link_to "or give it a try.", '/questions'
.span8
= image_tag('/images/landing/shapafrontall.png')
View
3  config/shapado.yml.sample
@@ -68,12 +68,15 @@ base: &common
development:
<<: *common
+ force_ssl_on_plans: false
domain: localhost.lan
production:
<<: *common
domain: example.com
+ force_ssl_on_plans: true
googlean_domain: .shapado.com
test:
<<: *common
domain: test.loc
+ force_ssl_on_plans: false
Please sign in to comment.
Something went wrong with that request. Please try again.