Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
add guest login
Dieser Commit ist enthalten in:
Ursprung
514a03c3af
Commit
82cb2668bc
3 geänderte Dateien mit 15 neuen und 2 gelöschten Zeilen
3
assets/javascripts/wizard-custom-guest.js
Normale Datei
3
assets/javascripts/wizard-custom-guest.js
Normale Datei
|
@ -0,0 +1,3 @@
|
||||||
|
(function() {
|
||||||
|
window.location.href = "/login";
|
||||||
|
})();
|
|
@ -4,6 +4,12 @@ class CustomWizard::WizardController < ::ApplicationController
|
||||||
|
|
||||||
helper_method :wizard_page_title
|
helper_method :wizard_page_title
|
||||||
helper_method :theme_ids
|
helper_method :theme_ids
|
||||||
|
|
||||||
|
before_action :handle_login_redirect, unless: :current_user
|
||||||
|
|
||||||
|
def handle_login_redirect
|
||||||
|
cookies[:destination_url] = "/w/#{params[:wizard_id]}"
|
||||||
|
end
|
||||||
|
|
||||||
def wizard
|
def wizard
|
||||||
CustomWizard::Template.new(PluginStore.get('custom_wizard', params[:wizard_id].underscore))
|
CustomWizard::Template.new(PluginStore.get('custom_wizard', params[:wizard_id].underscore))
|
||||||
|
|
|
@ -40,8 +40,12 @@
|
||||||
<%= raw theme_lookup("body_tag") %>
|
<%= raw theme_lookup("body_tag") %>
|
||||||
<%- end %>
|
<%- end %>
|
||||||
|
|
||||||
<%= preload_script 'wizard-custom-start' %>
|
<%- if current_user %>
|
||||||
<%= preload_script 'wizard-raw-templates' %>
|
<%= preload_script 'wizard-custom-start' %>
|
||||||
|
<%= preload_script 'wizard-raw-templates' %>
|
||||||
|
<%- else %>
|
||||||
|
<%= preload_script 'wizard-custom-guest' %>
|
||||||
|
<%- end %>
|
||||||
|
|
||||||
<div id="svg-sprites" style="display:none;">
|
<div id="svg-sprites" style="display:none;">
|
||||||
<div class="fontawesome">
|
<div class="fontawesome">
|
||||||
|
|
Laden …
In neuem Issue referenzieren