mirror of
https://github.com/discourse/discourse.git
synced 2026-08-13 06:25:11 -05:00
FEATURE: Per-plugin settings buttons, "Enabled" column
Also, added enabled_site_setting to the Poll plugin so it shows up properly.
This commit is contained in:
@@ -4,8 +4,21 @@ export default Ember.Route.extend({
|
||||
},
|
||||
|
||||
actions: {
|
||||
showSettings() {
|
||||
this.transitionTo('adminSiteSettingsCategory', 'plugins');
|
||||
showSettings(plugin) {
|
||||
const controller = this.controllerFor('adminSiteSettings');
|
||||
this.transitionTo('adminSiteSettingsCategory', 'plugins').then(function() {
|
||||
if (plugin) {
|
||||
const match = /^(.*)_enabled/.exec(plugin.get('enabled_setting'));
|
||||
if (match[1]) {
|
||||
// filterContent() is normally on a debounce from typing.
|
||||
// Because we don't want the default of "All Results", we tell it
|
||||
// to skip the next debounce.
|
||||
controller.set('filter', match[1]);
|
||||
controller.set('_skipBounce', true);
|
||||
controller.filterContentNow('plugins');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user