Kaynağa Gözat

theme_id has been pluralized

Angus McLeod 6 yıl önce
ebeveyn
işleme
7303a9314d
2 değiştirilmiş dosya ile 5 ekleme ve 5 silme
  1. 3 3
      controllers/wizard.rb
  2. 2 2
      views/layouts/wizard.html.erb

+ 3 - 3
controllers/wizard.rb

@@ -4,7 +4,7 @@ class CustomWizard::WizardController < ::ApplicationController
 
   requires_login
   helper_method :wizard_page_title
-  helper_method :theme_id
+  helper_method :theme_ids
 
   def wizard
     CustomWizard::Template.new(PluginStore.get('custom_wizard', params[:wizard_id].underscore))
@@ -14,8 +14,8 @@ class CustomWizard::WizardController < ::ApplicationController
     wizard ? (wizard.name || wizard.id) : I18n.t('wizard.custom_title')
   end
 
-  def theme_id
-    wizard ? wizard.theme_id : nil
+  def theme_ids
+    wizard ? [wizard.theme_id] : nil
   end
 
   def index

+ 2 - 2
views/layouts/wizard.html.erb

@@ -5,7 +5,7 @@
     <%= stylesheet_link_tag "wizard_composer", media: "all", "data-turbolinks-track" => "reload" %>
     <%= stylesheet_link_tag "wizard_variables", media: "all", "data-turbolinks-track" => "reload" %>
     <%= stylesheet_link_tag "wizard_custom_mobile", media: "all", "data-turbolinks-track" => "reload" if mobile_view?%>
-    <%- if theme_id %>
+    <%- if theme_ids %>
       <%= discourse_stylesheet_link_tag (mobile_view? ? :mobile_theme : :desktop_theme) %>
     <%- end %>
     <%= preload_script "ember_jquery" %>
@@ -26,7 +26,7 @@
 
     <%= server_plugin_outlet "custom_wizard" %>
 
-    <meta name="discourse_theme_id" content="<%= theme_id %>">
+    <meta name="discourse_theme_ids" content="<%= theme_ids&.join(",") %>">
     <meta name="discourse-base-uri" content="<%= Discourse.base_uri %>">
 
     <%= render partial: "layouts/head" %>