Commit 97a2de9e authored by Grzegorz Bizon's avatar Grzegorz Bizon

Make it possible to switch ref in badges view

parent a2bbd250
...@@ -24,6 +24,8 @@ class Projects::RefsController < Projects::ApplicationController ...@@ -24,6 +24,8 @@ class Projects::RefsController < Projects::ApplicationController
namespace_project_find_file_path(@project.namespace, @project, @id) namespace_project_find_file_path(@project.namespace, @project, @id)
when "graphs_commits" when "graphs_commits"
commits_namespace_project_graph_path(@project.namespace, @project, @id) commits_namespace_project_graph_path(@project.namespace, @project, @id)
when "badges"
namespace_project_badges_path(@project.namespace, @project, ref: @id)
else else
namespace_project_commits_path(@project.namespace, @project, @id) namespace_project_commits_path(@project.namespace, @project, @id)
end end
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
.panel-heading .panel-heading
%b Builds badge &middot; %b Builds badge &middot;
= @badge.to_html = @badge.to_html
.pull-right
= render 'shared/ref_switcher', destination: 'badges'
.panel-body .panel-body
.row .row
.col-md-2.text-center .col-md-2.text-center
......
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