diff --git a/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs b/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs index ae6979ea..a02c5324 100644 --- a/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs +++ b/assets/javascripts/discourse/templates/admin-wizards-wizard.hbs @@ -26,9 +26,9 @@ {{i18n 'admin.wizard.message.documentation'}} - + {{!-- {{i18n 'admin.wizard.message.contact'}} - + --}} diff --git a/assets/stylesheets/common/wizard-admin.scss b/assets/stylesheets/common/wizard-admin.scss index 7b934359..41804f50 100644 --- a/assets/stylesheets/common/wizard-admin.scss +++ b/assets/stylesheets/common/wizard-admin.scss @@ -20,13 +20,10 @@ margin-right: 4px; } - a { - padding-left: 10px; - - + a { - border-left: 1px solid $primary-medium; - margin-left: 10px; - } + a + a { + border-left: 1px solid $primary-medium; + padding-left: 5px; + margin-left: 5px; } } } diff --git a/lib/custom_wizard/wizard.rb b/lib/custom_wizard/wizard.rb index 71371554..2fd521ab 100644 --- a/lib/custom_wizard/wizard.rb +++ b/lib/custom_wizard/wizard.rb @@ -281,7 +281,19 @@ class CustomWizard::Wizard def self.list(user=nil) PluginStoreRow.where(plugin_name: 'custom_wizard').order(:id) - .map { |record| self.new(JSON.parse(record.value), user) } + .reduce([]) do |result, record| + attrs = JSON.parse(record.value) + + if attrs.present? && + attrs.is_a?(Hash) && + attrs['id'].present? && + attrs['name'].present? + + result.push(self.new(attrs, user)) + end + + result + end end def self.save(wizard)