forge-cli 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +1 -3
- data/lib/forge-cli.rb +3 -0
- data/lib/forge-cli/application_creator.rb +33 -0
- data/lib/forge-cli/custom_file_copier.rb +27 -0
- data/lib/forge-cli/forge_addon_requirer.rb +14 -0
- data/lib/forge-cli/logo.txt +11 -0
- data/lib/forge-cli/module_installer.rb +31 -5
- data/lib/forge-cli/modules/banners/forge_routes.rb +3 -0
- data/lib/forge-cli/modules/banners/manifest.yml +8 -0
- data/lib/forge-cli/modules/banners/post_hooks.rb +12 -0
- data/lib/forge-cli/modules/banners/routes.rb +15 -0
- data/lib/forge-cli/modules/base/forge_routes.rb +5 -0
- data/lib/forge-cli/modules/base/manifest.yml +7 -12
- data/lib/forge-cli/modules/base/post_hooks.rb +10 -29
- data/lib/forge-cli/modules/dispatches/forge_routes.rb +6 -0
- data/lib/forge-cli/modules/dispatches/manifest.yml +25 -0
- data/lib/forge-cli/modules/dispatches/post_hooks.rb +13 -0
- data/lib/forge-cli/modules/dispatches/routes.rb +4 -0
- data/lib/forge-cli/modules/ecommerce/forge_routes.rb +33 -0
- data/lib/forge-cli/modules/ecommerce/manifest.yml +49 -1
- data/lib/forge-cli/modules/ecommerce/post_hooks.rb +33 -0
- data/lib/forge-cli/modules/ecommerce/routes.rb +43 -0
- data/lib/forge-cli/modules/events/forge_routes.rb +1 -0
- data/lib/forge-cli/modules/events/manifest.yml +12 -0
- data/lib/forge-cli/modules/events/post_hooks.rb +16 -0
- data/lib/forge-cli/modules/events/routes.rb +4 -0
- data/lib/forge-cli/modules/galleries/forge_routes.rb +3 -0
- data/lib/forge-cli/modules/galleries/manifest.yml +9 -0
- data/lib/forge-cli/modules/galleries/post_hooks.rb +11 -0
- data/lib/forge-cli/modules/posts/forge_routes.rb +6 -0
- data/lib/forge-cli/modules/posts/post_hooks.rb +30 -0
- data/lib/forge-cli/modules/posts/routes.rb +15 -0
- data/lib/forge-cli/modules/subscribers/forge_routes.rb +4 -0
- data/lib/forge-cli/modules/subscribers/manifest.yml +14 -0
- data/lib/forge-cli/modules/subscribers/post_hooks.rb +12 -0
- data/lib/forge-cli/modules/subscribers/routes.rb +1 -0
- data/lib/forge-cli/modules/videos/forge_routes.rb +4 -0
- data/lib/forge-cli/modules/videos/manifest.yml +9 -0
- data/lib/forge-cli/modules/videos/post_hooks.rb +14 -0
- data/lib/forge-cli/modules/videos/routes.rb +15 -0
- data/lib/forge-cli/output.rb +10 -0
- data/lib/forge-cli/post_hooks.rb +24 -11
- data/lib/forge-cli/version.rb +1 -1
- data/lib/forge/Gemfile +2 -2
- data/lib/forge/app/controllers/application_controller.rb +2 -2
- data/lib/forge/app/controllers/events_controller.rb +2 -2
- data/lib/forge/app/controllers/hosted_payment_controller.rb +1 -1
- data/lib/forge/app/controllers/integrated_payment_controller.rb +1 -1
- data/lib/forge/app/controllers/orders_controller.rb +1 -1
- data/lib/forge/app/form_builders/forge_form_builder.rb +2 -2
- data/lib/forge/app/helpers/form_helper.rb +2 -2
- data/lib/forge/app/models/event.rb +4 -0
- data/lib/forge/app/models/order.rb +3 -3
- data/lib/forge/app/models/order_transaction.rb +1 -1
- data/lib/forge/app/models/post.rb +5 -0
- data/lib/forge/app/models/video.rb +24 -19
- data/lib/forge/app/views/forge/dispatches/show.html.haml +2 -2
- data/lib/forge/app/views/forge/help_topics/show.html.haml +4 -4
- data/lib/forge/app/views/forge/settings/show.html.haml +2 -2
- data/lib/forge/app/views/forge/shared/_seo_fields.html.haml +1 -1
- data/lib/forge/app/views/forge/shared/menu_items/_subscribers.html.haml +8 -0
- data/lib/forge/app/views/hosted_payment/_paypal.html.haml +3 -3
- data/lib/forge/app/views/hosted_payment/billing.html.haml +2 -2
- data/lib/forge/app/views/integrated_payment/_credit_card_form.html.haml +3 -3
- data/lib/forge/app/views/integrated_payment/billing.html.haml +3 -3
- data/lib/forge/app/views/layouts/application.html.haml +1 -1
- data/lib/forge/app/views/layouts/forge.html.haml +1 -1
- data/lib/forge/app/views/orders/paid.html.haml +3 -3
- data/lib/forge/config/initializers/ecommerce.rb +2 -2
- data/lib/forge/config/initializers/forge.rb +33 -0
- data/lib/forge/config/routes.rb +2 -4
- data/lib/forge/db/migrate/20130404140735_create_base_forge.rb +187 -0
- data/lib/forge/db/migrate/20130405172025_create_post_categories.rb +1 -1
- data/lib/forge/db/migrate/20130405172026_create_addresses.rb +28 -0
- data/lib/forge/db/migrate/20130405172027_create_countries.rb +20 -0
- data/lib/forge/db/migrate/20130405172028_create_orders.rb +22 -0
- data/lib/forge/db/migrate/20130405172029_create_order_transactions.rb +22 -0
- data/lib/forge/db/migrate/20130405172030_create_products.rb +34 -0
- data/lib/forge/db/migrate/20130405172031_create_product_categories.rb +20 -0
- data/lib/forge/db/migrate/20130405172032_create_product_images.rb +20 -0
- data/lib/forge/db/migrate/20130405172033_create_provinces.rb +19 -0
- data/lib/forge/db/migrate/20130405172034_create_sales.rb +18 -0
- data/lib/forge/db/migrate/20130405172035_create_tax_rates.rb +19 -0
- data/lib/forge/db/migrate/20130405172036_create_banners.rb +20 -0
- data/lib/forge/db/migrate/20130405172037_create_videos.rb +33 -0
- data/lib/forge/db/migrate/20130405172038_create_events.rb +18 -0
- data/lib/forge/db/migrate/20130405172039_create_dispatches.rb +98 -0
- data/lib/forge/db/migrate/20130405172040_create_subscribers copy.rb +32 -0
- data/lib/forge/db/migrate/20130405172041_create_galleries.rb +29 -0
- data/lib/forge/lib/assets/stylesheets/forge/dispatches.css.scss +10 -1
- data/lib/forge/lib/forge.rb +12 -4
- data/lib/forge/{config/initializers → lib/forge}/can_be_foreign.rb +0 -0
- data/lib/forge/{config/initializers → lib/forge}/can_have_comments.rb +0 -0
- data/lib/forge/{config/initializers → lib/forge}/can_use_asset.rb +0 -0
- data/lib/forge/lib/forge/config/ecommerce.rb +55 -0
- data/lib/forge/lib/forge/config/events.rb +29 -0
- data/lib/forge/lib/forge/config/videos.rb +20 -0
- data/lib/forge/{config/initializers → lib/forge}/reorderable.rb +0 -0
- data/lib/forge/{config/initializers/forge/controllers → lib/forge/shared_controller_methods}/ecommerce.rb +1 -3
- data/lib/forge/{config/initializers/forge/controllers → lib/forge/shared_controller_methods}/posts.rb +0 -2
- data/lib/forge/lib/generators/forge/i18n_migrations/i18n_migrations_generator.rb +3 -3
- data/lib/forge/lib/tasks/forge.rake +1 -1
- data/lib/forge/spec/integration/shopping_spec.rb +9 -9
- data/lib/forge/spec/models/order_spec.rb +5 -5
- metadata +169 -120
- data/forge-cli.rdoc +0 -5
- data/lib/forge/app/controllers/product_images_controller.rb +0 -2
- data/lib/forge/config/ferret_server.yml +0 -24
- data/lib/forge/db/migrate/20130404140735_create_assets.rb +0 -24
- data/lib/forge/db/migrate/20130404141259_create_comments.rb +0 -40
- data/lib/forge/db/migrate/20130404142157_create_help_topics.rb +0 -18
- data/lib/forge/db/migrate/20130404143601_create_settings.rb +0 -18
- data/lib/forge/db/migrate/20130404145209_create_roles.rb +0 -22
- data/lib/forge/db/migrate/20130404145329_create_taggings.rb +0 -25
- data/lib/forge/db/migrate/20130404151730_create_users.rb +0 -30
- data/lib/forge/db/migrate/20130405172022_create_pages.rb +0 -35
- data/lib/forge/lib/active_form.rb +0 -12
- data/lib/forge/lib/forge/settings.rb +0 -4
@@ -17,7 +17,7 @@ class HostedPaymentController < ApplicationController
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def disallow_if_payment_is_integrated
|
20
|
-
if Forge
|
20
|
+
if Forge.config.ecommerce.payments == :integrated
|
21
21
|
redirect_to "/integrated_payment/billing" and return false
|
22
22
|
end
|
23
23
|
end
|
@@ -28,7 +28,7 @@ class IntegratedPaymentController < ApplicationController
|
|
28
28
|
private
|
29
29
|
|
30
30
|
def disallow_if_payment_is_hosted
|
31
|
-
if
|
31
|
+
if Forge.config.ecommerce.payments == :hosted
|
32
32
|
redirect_to "/hosted_payment/billing" and return false
|
33
33
|
end
|
34
34
|
end
|
@@ -82,9 +82,9 @@ class ForgeFormBuilder < ActionView::Helpers::FormBuilder
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def internationalize_content(generator, method_name, content, options = {})
|
85
|
-
if Forge
|
85
|
+
if Forge.config.languages
|
86
86
|
content = content_tag(:div, content, :class => "i18n en")
|
87
|
-
Forge
|
87
|
+
Forge.config.languages.each do |lang_title, lang|
|
88
88
|
content += content_tag(:div, self.send(generator, method_name, options, lang, lang_title), :class => "i18n #{lang}")
|
89
89
|
end
|
90
90
|
content = framed_content(content, options)
|
@@ -99,9 +99,9 @@ module FormHelper
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def language_switcher(table)
|
102
|
-
if Forge
|
102
|
+
if Forge.config.languages
|
103
103
|
if I18nLookup.fields[:tables][table]
|
104
|
-
select_tag "current_language", options_for_select([["English", "en"]] + Forge
|
104
|
+
select_tag "current_language", options_for_select([["English", "en"]] + Forge.config.languages.map {|k, v| [k.to_s.titleize, v]})
|
105
105
|
end
|
106
106
|
end
|
107
107
|
end
|
@@ -17,6 +17,10 @@ class Event < ActiveRecord::Base
|
|
17
17
|
validates_format_of :ends_at_time, :with => /\d{1,2}:\d{2}[AaPp][Mm]/i, :message => "must be a valid 12-hour time.", :allow_nil => true
|
18
18
|
validates_format_of :ends_at_date, :with => /\d{4}\-\d{1,2}\-\d{2}/, :message => "must match format of YYYY-MM-DD", :allow_nil => true
|
19
19
|
|
20
|
+
def to_param
|
21
|
+
"#{id}-#{title.parameterize}"
|
22
|
+
end
|
23
|
+
|
20
24
|
def self.on(year, month=nil, day=nil)
|
21
25
|
time = Time.mktime(year, month, day)
|
22
26
|
delta = day ? 1.day : month ? 1.month : year ? 1.year : fail
|
@@ -87,7 +87,7 @@ class Order < ActiveRecord::Base
|
|
87
87
|
def shipping
|
88
88
|
amount = 0.0
|
89
89
|
# raise "A valid shipping address must exist in order to calculate the shipping" if self.shipping_address.blank? || !self.shipping_address.valid?
|
90
|
-
if Forge
|
90
|
+
if Forge.config.ecommerce.flat_rate_shipping
|
91
91
|
amount = self.line_items.inject(0.0) { |sum, line_item| sum += (line_item.quantity * line_item.product.flat_rate_shipping) }
|
92
92
|
elsif self.shipping_cost
|
93
93
|
amount = self.shipping_cost
|
@@ -134,7 +134,7 @@ class Order < ActiveRecord::Base
|
|
134
134
|
)
|
135
135
|
|
136
136
|
# Run functions to get cost estimates
|
137
|
-
shipper = "ActiveMerchant::Shipping::#{MySettings.shipper.underscore.parameterize('_').camelize}".constantize.new(Forge
|
137
|
+
shipper = "ActiveMerchant::Shipping::#{MySettings.shipper.underscore.parameterize('_').camelize}".constantize.new(Forge.config.ecommers.shippers[MySettings.shipper.underscore.parameterize("_").to_sym])
|
138
138
|
begin
|
139
139
|
response = shipper.find_rates(origin, destination, packages)
|
140
140
|
# Store all rates, order by price. Return cheapest rate.
|
@@ -271,7 +271,7 @@ class Order < ActiveRecord::Base
|
|
271
271
|
end
|
272
272
|
|
273
273
|
def email_receipt
|
274
|
-
if Forge
|
274
|
+
if Forge.config.ecommerce.email_receipt
|
275
275
|
ReceiptMailer.receipt(self).deliver
|
276
276
|
end
|
277
277
|
end
|
@@ -25,7 +25,7 @@ class OrderTransaction < ActiveRecord::Base
|
|
25
25
|
begin
|
26
26
|
# TODO: is eval appropriate in this instance? I tried Object.const_get but had problems.
|
27
27
|
# OPTIMIZE: this is a bit crufty
|
28
|
-
am_setting = Forge
|
28
|
+
am_setting = Forge.config.ecommerce.active_merchant
|
29
29
|
gateway_class = eval("ActiveMerchant::Billing::" + am_setting[:gateway])
|
30
30
|
gateway = gateway_class.new(:login => am_setting[:login], :password => am_setting[:password])
|
31
31
|
response = yield gateway
|
@@ -12,26 +12,31 @@ class Video < ActiveRecord::Base
|
|
12
12
|
# Validations
|
13
13
|
validates_attachment_presence :video
|
14
14
|
validates_presence_of :title
|
15
|
-
|
15
|
+
|
16
16
|
before_update :revert_if_new_upload
|
17
17
|
|
18
|
-
|
18
|
+
|
19
19
|
def video=(filename)
|
20
20
|
self.video_file_name = filename.gsub('videos/', '')
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
def list_title
|
24
24
|
published ? title : title + " (Draft)"
|
25
25
|
end
|
26
|
-
|
27
|
-
def encoded_state
|
28
|
-
|
29
|
-
|
26
|
+
|
27
|
+
def encoded_state
|
28
|
+
read_attribute(:encoded_state) || "unencoded"
|
29
|
+
end
|
30
|
+
|
31
|
+
def mobile_encoded_state
|
32
|
+
read_attribute(:mobile_encoded_state) || "unencoded"
|
33
|
+
end
|
34
|
+
|
30
35
|
def encode(rails_env)
|
31
36
|
test = rails_env == "production" ? false : true
|
32
37
|
response = Zencoder::Job.create({
|
33
|
-
:api_key => Forge
|
34
|
-
:input => video.url,
|
38
|
+
:api_key => Forge.config.videos.zencoder_api_key,
|
39
|
+
:input => video.url,
|
35
40
|
:outputs => [web_encode_settings, mobile_encode_settings, thumbnail_settings],
|
36
41
|
:test => test,
|
37
42
|
:skip_ssl_verify => test
|
@@ -39,26 +44,26 @@ class Video < ActiveRecord::Base
|
|
39
44
|
self.update_attributes(:encoded_state => "queued", :mobile_encoded_state => "queued", :job_id => response.body["id"]) if response.success?
|
40
45
|
response
|
41
46
|
end
|
42
|
-
|
47
|
+
|
43
48
|
def encode_notify(output)
|
44
49
|
prefix = output[:label] == "web" ? "" : "#{output[:label]}_"
|
45
50
|
attrs = {"#{prefix}encoded_state" => output[:state]}
|
46
51
|
if output[:state] == "finished"
|
47
|
-
thumb = open(URI.parse("http://s3.amazonaws.com/" + Forge
|
52
|
+
thumb = open(URI.parse("http://s3.amazonaws.com/" + Forge.config.videos.zencoder_bucket + "/thumbnails_#{id}/frame_0000.png"))
|
48
53
|
attrs.merge!({"#{prefix}output_url" => output[:url]})
|
49
54
|
attrs.merge!({"thumbnail" => thumb}) if thumbnail.url.blank?
|
50
55
|
end
|
51
56
|
self.update_attributes(attrs)
|
52
57
|
end
|
53
|
-
|
54
|
-
|
58
|
+
|
59
|
+
|
55
60
|
private
|
56
61
|
def base_url
|
57
|
-
"http://s3.amazonaws.com
|
62
|
+
"http://s3.amazonaws.com/" + Forge.config.videos.zencoder_bucket
|
58
63
|
end
|
59
|
-
|
64
|
+
|
60
65
|
def web_encode_settings
|
61
|
-
{
|
66
|
+
{
|
62
67
|
:label => "web",
|
63
68
|
:base_url => base_url,
|
64
69
|
:size => "800x450",
|
@@ -66,7 +71,7 @@ class Video < ActiveRecord::Base
|
|
66
71
|
:notifications => [{:format => "json", :url => "#{MySettings.site_url}/forge/videos/encode_notify"}]
|
67
72
|
}
|
68
73
|
end
|
69
|
-
|
74
|
+
|
70
75
|
def mobile_encode_settings
|
71
76
|
{
|
72
77
|
:label => "mobile",
|
@@ -76,7 +81,7 @@ class Video < ActiveRecord::Base
|
|
76
81
|
:notifications => [{:format => "json", :url => "#{MySettings.site_url}/forge/videos/encode_notify"}]
|
77
82
|
}
|
78
83
|
end
|
79
|
-
|
84
|
+
|
80
85
|
def thumbnail_settings
|
81
86
|
{
|
82
87
|
:thumbnails => {
|
@@ -87,7 +92,7 @@ class Video < ActiveRecord::Base
|
|
87
92
|
}
|
88
93
|
}
|
89
94
|
end
|
90
|
-
|
95
|
+
|
91
96
|
def revert_if_new_upload
|
92
97
|
if video_file_name_changed?
|
93
98
|
self.output_url = self.mobile_output_url = ''
|
@@ -14,8 +14,8 @@
|
|
14
14
|
#overview
|
15
15
|
= render :partial => "header", :locals => {:dispatch => @dispatch}
|
16
16
|
.inner-form#dispatch-stats
|
17
|
-
.column
|
18
|
-
.
|
17
|
+
.column.full
|
18
|
+
.dispatch-animated-bar
|
19
19
|
.extendable-inset.deep{:style => "padding: 5px;"}
|
20
20
|
#dispatch-progress-sent
|
21
21
|
#dispatch-progress-read
|
@@ -8,10 +8,10 @@
|
|
8
8
|
%ul
|
9
9
|
%li= link_to "Embedding Images, Videos, or Documents into Your Content", "/forge/help/embedding"
|
10
10
|
%li= link_to "Uploading Assets From Your Computer", "/forge/help/uploading"
|
11
|
-
|
11
|
+
|
12
12
|
|
13
13
|
%h4 Still can't find what you're looking for?
|
14
14
|
%p
|
15
|
-
If none of the above was helpful to you, you can #{link_to "browse the help index", "/forge/help"}
|
16
|
-
= raw(Forge
|
17
|
-
|
15
|
+
If none of the above was helpful to you, you can #{link_to "browse the help index", "/forge/help"}
|
16
|
+
= raw(Forge.config.support_instructions_in_help)
|
17
|
+
|
@@ -22,7 +22,7 @@
|
|
22
22
|
#tabs
|
23
23
|
%ul.tabbed
|
24
24
|
%li= link_to "General Settings", '#general'
|
25
|
-
- if Forge
|
25
|
+
- if Forge.config.mobile_layout
|
26
26
|
%li= link_to "Mobile Settings", '#mobile'
|
27
27
|
- if @menu_items.include?("video_feeds")
|
28
28
|
%li= link_to "Video Feed Settings", '#video'
|
@@ -31,7 +31,7 @@
|
|
31
31
|
.spacer
|
32
32
|
|
33
33
|
#general= render :partial => "general"
|
34
|
-
- if Forge
|
34
|
+
- if Forge.config.mobile_layout
|
35
35
|
#mobile= render :partial => "mobile"
|
36
36
|
- if @menu_items.include?("video_feeds")
|
37
37
|
#video= render :partial => "video_feed"
|
@@ -11,7 +11,7 @@
|
|
11
11
|
%li Be wary of companies offering to get your site "to the top of Google." No legitimate business will make that claim, and their shady tactics could adversely affect your ranking.
|
12
12
|
%br/
|
13
13
|
|
14
|
-
= raw(Forge
|
14
|
+
= raw(Forge.config.seo_callout)
|
15
15
|
|
16
16
|
.column.main-small.last
|
17
17
|
= f.text_field :seo_title, :class => "title", :style => "width: 100%;", :label => "Title Tag", :explanation => "This is the title that will show on search engine results and in the title bar of a visitor's browser. By default, this will use the item's title."
|
@@ -0,0 +1,8 @@
|
|
1
|
+
- if can?(:index, Subscriber)
|
2
|
+
- item = "subscribers"
|
3
|
+
= forge_menu_item item, forge_subscribers_path, :active => is_active(['subscribers', 'subscriber_groups']), :submenu => true
|
4
|
+
%ul.forge_submenu{ :class => is_active(['subscribers', 'subscriber_groups']) ? "#{item} active" : item }
|
5
|
+
= link_to "Subscribers", forge_subscribers_path, :class => ('active' if is_active('subscribers')) if can?(:index, Subscriber)
|
6
|
+
= link_to "Groups", forge_subscriber_groups_path, :class => ('active' if is_active('subscriber_groups')) if can?(:index, SubscriberGroup)
|
7
|
+
|
8
|
+
.spacer
|
@@ -1,18 +1,18 @@
|
|
1
|
-
- paypal_account = MySettings.ecommerce_live ? Forge
|
1
|
+
- paypal_account = MySettings.ecommerce_live ? Forge.config.ecommerce.paypal_production[:account] : Forge.config.ecommerce.paypal_sandbox[:account]
|
2
2
|
= form_tag ActiveMerchant::Billing::Integrations::Paypal.service_url do
|
3
3
|
= hidden_field_tag "business", paypal_account
|
4
4
|
|
5
5
|
= hidden_field_tag "cancel_return", "http://" + request.host + "/orders/cancel"
|
6
6
|
= hidden_field_tag "notify_url", "http://" + request.host + "/hosted_payment/notify"
|
7
7
|
= hidden_field_tag "return", "http://" + request.host + paid_order_path(@cart_order, :key => @cart_order.key)
|
8
|
-
|
8
|
+
|
9
9
|
= hidden_field_tag "redirect_cmd", "_xclick"
|
10
10
|
= hidden_field_tag "cmd", "_cart"
|
11
11
|
= hidden_field_tag "upload", 1
|
12
12
|
|
13
13
|
= hidden_field_tag "charset", "utf-8"
|
14
14
|
|
15
|
-
= hidden_field_tag "currency_code", Forge
|
15
|
+
= hidden_field_tag "currency_code", Forge.config.ecommerce.currency
|
16
16
|
= hidden_field_tag "invoice", invoice_number_for_paypal(order)
|
17
17
|
= hidden_field_tag "tax_cart", order.tax
|
18
18
|
- if MySettings.use_coupons
|
@@ -1,7 +1,7 @@
|
|
1
1
|
%h2 Pay Securely Online With PayPal
|
2
2
|
|
3
|
-
%p
|
4
|
-
Your data are kept in strict confidence and security. All prices are in #{Forge
|
3
|
+
%p
|
4
|
+
Your data are kept in strict confidence and security. All prices are in #{Forge.config.ecommerce.currency}.
|
5
5
|
|
6
6
|
= render :partial => "orders/summary", :locals => { :order => @cart_order }
|
7
7
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
%table.form{:cellspacing => 0, :width => '100%'}
|
1
|
+
%table.form{:cellspacing => 0, :width => '100%'}
|
2
2
|
%tr
|
3
3
|
%td.label
|
4
4
|
Credit card number
|
@@ -22,14 +22,14 @@
|
|
22
22
|
%td
|
23
23
|
%input{:type => 'submit', :value => 'Pay Now'}
|
24
24
|
The charge to your credit card will be
|
25
|
-
= "#{number_to_currency(@cart_order.total_price)} #{Forge
|
25
|
+
= "#{number_to_currency(@cart_order.total_price)} #{Forge.config.ecommerce.currency}"
|
26
26
|
%tr
|
27
27
|
%td.label
|
28
28
|
%td{:style => "padding-top: 25px;"}
|
29
29
|
%p
|
30
30
|
%small
|
31
31
|
All prices are in
|
32
|
-
= Forge
|
32
|
+
= Forge.config.ecommerce.currency + "."
|
33
33
|
Use of your data is governed by our
|
34
34
|
%a{:href => "/security-policy", :target => "_blank" }
|
35
35
|
Security Policy
|
@@ -1,10 +1,10 @@
|
|
1
1
|
%h1 Pay Securely Online With Your Credit Card
|
2
2
|
|
3
|
-
%p
|
4
|
-
Your data are kept in strict confidence and security. All prices are in #{Forge
|
3
|
+
%p
|
4
|
+
Your data are kept in strict confidence and security. All prices are in #{Forge.config.ecommerce.currency}.
|
5
5
|
|
6
6
|
%div{:style => "float:left; width:40%;"}
|
7
|
-
%h2 Billing Address
|
7
|
+
%h2 Billing Address
|
8
8
|
= render :partial => "orders/display_address", :locals => { :address => @cart_order.billing_address, :address_type => 'billing_address' }
|
9
9
|
= link_to "Edit billing address", orders_checkout_path
|
10
10
|
|
@@ -13,7 +13,7 @@
|
|
13
13
|
= yield :scripts
|
14
14
|
|
15
15
|
%body{ :id => params[:controller], :class => params[:action] }
|
16
|
-
= link_to("View Mobile Version", :mobile => 1) if Forge
|
16
|
+
= link_to("View Mobile Version", :mobile => 1) if Forge.config.mobile_layout #&& using_mobile_device?
|
17
17
|
|
18
18
|
- if current_user
|
19
19
|
.float-right
|
@@ -58,7 +58,7 @@
|
|
58
58
|
#footer
|
59
59
|
© Copyright factor[e] design initiative inc. #{Time.now.year}
|
60
60
|
%br/
|
61
|
-
= raw(Forge
|
61
|
+
= raw(Forge.config.support_instructions_in_layout)
|
62
62
|
|
63
63
|
= link_to '?', '/forge/help', :id => 'help_toggle', :class => 'help-button'
|
64
64
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
%h1 Thank you!
|
2
2
|
|
3
3
|
%p
|
4
|
-
Thank you for your payment. Your transaction has been completed, and a receipt for your purchase has been emailed to you.
|
4
|
+
Thank you for your payment. Your transaction has been completed, and a receipt for your purchase has been emailed to you.
|
5
5
|
|
6
|
-
- unless Forge
|
6
|
+
- unless Forge.config.ecommerce.payments == :integrated
|
7
7
|
%p
|
8
|
-
You may log into your account at
|
8
|
+
You may log into your account at
|
9
9
|
%a{:href => "http://www.paypal.com/ca", :target => "_blank"} www.paypal.com/ca
|
10
10
|
to view details of this transaction.
|
11
11
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# tell Active Shipping to use metric units by default
|
2
2
|
ActiveMerchant::Shipping::Package.default_options = { :units => :metric }
|
3
|
-
if Forge
|
4
|
-
ActiveMerchant::Billing::Base.mode = Forge
|
3
|
+
if Forge.config.ecommerce.active_merchant
|
4
|
+
ActiveMerchant::Billing::Base.mode = Forge.config.ecommerce.active_merchant[:base_mode].to_sym
|
5
5
|
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require 'forge.rb'
|
2
|
+
require 'forge/can_be_foreign.rb'
|
3
|
+
require 'forge/can_have_comments.rb'
|
4
|
+
require 'forge/can_use_asset.rb'
|
5
|
+
|
6
|
+
# This configuration block is for config that should bes pecified
|
7
|
+
# by the site developer. There is a Settings module built into Forge
|
8
|
+
# where you can expose other settings to your client.
|
9
|
+
Forge.configure do |config|
|
10
|
+
# Enable a mobile layout for this website
|
11
|
+
config.mobile_layout = false
|
12
|
+
|
13
|
+
# Set up languages for front-end internationalization
|
14
|
+
# Currently Forge is anglo-centric so you don't need to
|
15
|
+
# specify English.
|
16
|
+
#
|
17
|
+
# config.languages = {
|
18
|
+
# "French" => :fr,
|
19
|
+
# "German" => :de
|
20
|
+
# # etc.
|
21
|
+
# }
|
22
|
+
|
23
|
+
# Print out support instructions for your client
|
24
|
+
# in the bottom right-hand corner of Forge
|
25
|
+
# config.support_instructions_in_layout = File.read("support.html")
|
26
|
+
|
27
|
+
# Print out any additional SEO information you'd like
|
28
|
+
# to display on the SEO tabs of supported modules
|
29
|
+
# config.seo_callout = File.read("seo.html")
|
30
|
+
|
31
|
+
# If you need to add further config options you can add them
|
32
|
+
# in lib/forge.rb as attr_accessors to Forge::Configuration
|
33
|
+
end
|
data/lib/forge/config/routes.rb
CHANGED
@@ -67,10 +67,8 @@ Forge3::Application.routes.draw do
|
|
67
67
|
|
68
68
|
resources :events, :only => [:index, :show]
|
69
69
|
|
70
|
-
if Forge
|
71
|
-
|
72
|
-
match 'events/:year/:month' => 'events#index', :via => :get
|
73
|
-
end
|
70
|
+
if Forge.config.events.try(:display) == :calendar
|
71
|
+
match 'events/:year/:month' => 'events#index', :via => :get
|
74
72
|
end
|
75
73
|
|
76
74
|
resources :dispatches, :only => [] do
|