Skip to content

Commit

Permalink
Add admin_dialogs_path and use that in wym setup.
Browse files Browse the repository at this point in the history
Conflicts:

	core/app/assets/javascripts/refinery/boot_wym.js.erb
  • Loading branch information
ugisozols committed May 2, 2012
1 parent 6f5ca0e commit 21ab29b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/app/assets/javascripts/refinery/boot_wym.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ var wymeditor_boot_options = $.extend({
+ "</form>"
+ "</div>"

, dialogPath: "/refinery/dialogs/"
, dialogPath: "<%= Refinery::Core::Engine.routes.url_helpers.admin_dialogs_path %>/"
, dialogFeatures: {
width: 866
, height: 455
Expand Down
4 changes: 4 additions & 0 deletions core/app/controllers/refinery/admin/dialogs_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
module ::Refinery
module Admin
class DialogsController < ::Refinery::AdminController
def index
redirect_to refinery.admin_root_path
end

def show
@dialog_type = params[:id].downcase

Expand Down
2 changes: 1 addition & 1 deletion core/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace :admin, :path => 'refinery' do
root :to => 'dashboard#index'
resources :dialogs, :only => :show
resources :dialogs, :only => [:index, :show]
end

match '/refinery/update_menu_positions', :to => 'admin/core#update_plugin_positions'
Expand Down

0 comments on commit 21ab29b

Please sign in to comment.