Commit 339dfa32 authored by Robert Speicher's avatar Robert Speicher

Fix ref_switcher path

parent 79a02df9
= form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do = form_tag switch_project_refs_path(@project), method: :get, class: "project-refs-form" do
= select_tag "ref", grouped_options_refs, class: "project-refs-select chosen" = select_tag "ref", grouped_options_refs, class: "project-refs-select chosen"
= hidden_field_tag :destination, destination = hidden_field_tag :destination, destination
- if respond_to?(:path) - if defined?(path)
= hidden_field_tag :path, path = hidden_field_tag :path, path
%ul.nav.nav-tabs %ul.nav.nav-tabs
%li %li
= render partial: 'shared/ref_switcher', locals: {destination: 'tree', path: params[:path]} = render partial: 'shared/ref_switcher', locals: {destination: 'tree', path: @path}
%li{class: "#{'active' if (controller.controller_name == "tree") }"} %li{class: "#{'active' if (controller.controller_name == "tree") }"}
= link_to project_tree_path(@project, @ref) do = link_to project_tree_path(@project, @ref) do
Source Source
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Load Files list // Load Files list
$("#tree-holder").html("#{escape_javascript(render(partial: "tree", locals: {repo: @repo, commit: @commit, tree: @tree}))}"); $("#tree-holder").html("#{escape_javascript(render(partial: "tree", locals: {repo: @repo, commit: @commit, tree: @tree}))}");
$("#tree-content-holder").show("slide", { direction: "right" }, 150); $("#tree-content-holder").show("slide", { direction: "right" }, 150);
$('.project-refs-form #path').val("#{params[:path]}"); $('.project-refs-form #path').val("#{@path}");
// Load last commit log for each file in tree // Load last commit log for each file in tree
$('#tree-slider').waitForImages(function() { $('#tree-slider').waitForImages(function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment