mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-07-08 15:22:46 +00:00
only show the link when the plugin is enabled
This commit is contained in:
parent
a77cf00504
commit
65317324f2
@ -1,4 +1,5 @@
|
|||||||
|
{{#if siteSettings.discourse_donations_enabled}}
|
||||||
<div class="discourse-donations">
|
<div class="discourse-donations">
|
||||||
<a href="/users/{{model.username}}/payments">Donate</a>
|
<a href="/users/{{model.username}}/payments">Donate</a>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
3
config/locales/server.en.yml
Normal file
3
config/locales/server.en.yml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
en:
|
||||||
|
site_settings:
|
||||||
|
discourse_donations_enabled: "Enable the discourse donations plugin."
|
4
config/settings.yml
Normal file
4
config/settings.yml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
plugins:
|
||||||
|
discourse_donations_enabled:
|
||||||
|
default: true
|
||||||
|
client: true
|
@ -9,6 +9,8 @@ gem 'stripe', '2.0.1'
|
|||||||
load File.expand_path('../lib/discourse_donations/engine.rb', __FILE__)
|
load File.expand_path('../lib/discourse_donations/engine.rb', __FILE__)
|
||||||
load File.expand_path('../config/stripe.rb', __FILE__)
|
load File.expand_path('../config/stripe.rb', __FILE__)
|
||||||
|
|
||||||
|
enabled_site_setting :discourse_donations_enabled
|
||||||
|
|
||||||
after_initialize do
|
after_initialize do
|
||||||
header_script = '<script src="https://js.stripe.com/v3/"></script>'
|
header_script = '<script src="https://js.stripe.com/v3/"></script>'
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user