Merge pull request #16 from paviliondev/add_guest_login
add guest login
Dieser Commit ist enthalten in:
Commit
6d63a7927b
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 :theme_ids
|
||||
|
||||
before_action :handle_login_redirect, unless: :current_user
|
||||
|
||||
def handle_login_redirect
|
||||
cookies[:destination_url] = "/w/#{params[:wizard_id]}"
|
||||
end
|
||||
|
||||
def wizard
|
||||
CustomWizard::Template.new(PluginStore.get('custom_wizard', params[:wizard_id].underscore))
|
||||
|
|
|
@ -40,8 +40,12 @@
|
|||
<%= raw theme_lookup("body_tag") %>
|
||||
<%- end %>
|
||||
|
||||
<%= preload_script 'wizard-custom-start' %>
|
||||
<%= preload_script 'wizard-raw-templates' %>
|
||||
<%- if current_user %>
|
||||
<%= 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 class="fontawesome">
|
||||
|
|
Laden …
In neuem Issue referenzieren