only show the link when the plugin is enabled
This commit is contained in:
parent
b6c213321b
commit
5328dd7a9a
|
@ -1,4 +1,5 @@
|
|||
|
||||
<div class="discourse-donations">
|
||||
<a href="/users/{{model.username}}/payments">Donate</a>
|
||||
</div>
|
||||
{{#if siteSettings.discourse_donations_enabled}}
|
||||
<div class="discourse-donations">
|
||||
<a href="/users/{{model.username}}/payments">Donate</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
en:
|
||||
site_settings:
|
||||
discourse_donations_enabled: "Enable the discourse donations plugin."
|
|
@ -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('../config/stripe.rb', __FILE__)
|
||||
|
||||
enabled_site_setting :discourse_donations_enabled
|
||||
|
||||
after_initialize do
|
||||
header_script = '<script src="https://js.stripe.com/v3/"></script>'
|
||||
|
||||
|
|
Loading…
Reference in New Issue