Permalink
Browse files

Use params[:visual_editor] to render insert action

  • Loading branch information...
bricesanchez committed Sep 4, 2018
1 parent 0d7bdd8 commit 0dec51a953cd74f0879aa5fc605077d41e694521
@@ -88,10 +88,7 @@
</div>
<% if ::Refinery::Plugins.registered.names.include?("refinery_files") && (@resources.any? || searching?) %>
<div id="resource_file_area"<%= ' style="display:none"'.html_safe unless @resource_area_selected %> class="dialog_area">
<%=
@callback = '/refinery/admin/pages_dialogs/link_to'
render '/refinery/admin/search', url: refinery.insert_admin_resources_path(params.to_unsafe_h.dup.except('resource'))
%>
<%= render '/refinery/admin/search', url: refinery.insert_admin_resources_path(params.to_unsafe_h.dup.except('resource')) %>
<div id="resources_list" class="pages_list">
<% if @resources.any? %>
@@ -61,7 +61,11 @@ def insert
@resource_area_selected = from_dialog?
render @callback.presence || 'insert'
if params[:visual_editor]
render '/refinery/admin/pages_dialogs/link_to'
else
render 'insert'
end
end
protected

0 comments on commit 0dec51a

Please sign in to comment.