mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Show Settings button if plugin has settings (#9728)
It used to check if the plugin has an enabled_setting.
This commit is contained in:
parent
a29ae17d3a
commit
16137308b0
@ -47,7 +47,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="settings">
|
<td class="settings">
|
||||||
{{#if currentUser.admin}}
|
{{#if currentUser.admin}}
|
||||||
{{#if plugin.enabled_setting}}
|
{{#if plugin.has_settings}}
|
||||||
{{d-button class="btn-default" action=(route-action "showSettings") actionParam=plugin icon="cog" label="admin.plugins.change_settings_short"}}
|
{{d-button class="btn-default" action=(route-action "showSettings") actionParam=plugin icon="cog" label="admin.plugins.change_settings_short"}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
@ -8,6 +8,7 @@ class AdminPluginSerializer < ApplicationSerializer
|
|||||||
:admin_route,
|
:admin_route,
|
||||||
:enabled,
|
:enabled,
|
||||||
:enabled_setting,
|
:enabled_setting,
|
||||||
|
:has_settings,
|
||||||
:is_official
|
:is_official
|
||||||
|
|
||||||
def id
|
def id
|
||||||
@ -38,6 +39,10 @@ class AdminPluginSerializer < ApplicationSerializer
|
|||||||
object.enabled_site_setting
|
object.enabled_site_setting
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def has_settings
|
||||||
|
SiteSetting.plugins.values.include?(id)
|
||||||
|
end
|
||||||
|
|
||||||
def include_url?
|
def include_url?
|
||||||
url.present?
|
url.present?
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user