diff --git a/app/controllers/chargeback_rate_controller.rb b/app/controllers/chargeback_rate_controller.rb index 9c2ae9e56de..e1b3358080d 100644 --- a/app/controllers/chargeback_rate_controller.rb +++ b/app/controllers/chargeback_rate_controller.rb @@ -25,13 +25,14 @@ def x_show params[:id] = "xx-#{@record.rate_type}_#{nodeid}" params[:tree] = x_active_tree.to_s tree_select + redirect_to :action => 'explorer' unless request.xml_http_request? # Ajax request means in explorer end def tree_select - self.x_active_tree = params[:tree] if params[:tree] + self.x_active_tree = :cb_rates_tree self.x_node = params[:id] get_node_info(x_node) - replace_right_cell + replace_right_cell if request.xml_http_request? # Ajax request means in explorer end def explorer @@ -39,7 +40,7 @@ def explorer @explorer = true build_accordions_and_trees - @right_cell_text = _("All Chargeback Rates") + @right_cell_text ||= _("All Chargeback Rates") set_form_locals if @in_a_form session[:changed] = false diff --git a/app/views/chargeback_rate/x_show.html.haml b/app/views/chargeback_rate/x_show.html.haml new file mode 100644 index 00000000000..a14c20f0fab --- /dev/null +++ b/app/views/chargeback_rate/x_show.html.haml @@ -0,0 +1 @@ += render :partial => 'cb_rate_show' diff --git a/config/routes.rb b/config/routes.rb index f9022a22a98..e2cf09cb488 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -369,6 +369,7 @@ :chargeback_rate => { :get => %w( explorer + x_show ), :post => %w( explorer