Make it possible to switch ref in badges view

This commit is contained in:
Grzegorz Bizon 2016-04-04 10:40:40 +02:00
parent a2bbd2501a
commit 97a2de9e03
2 changed files with 4 additions and 0 deletions

View File

@ -24,6 +24,8 @@ class Projects::RefsController < Projects::ApplicationController
namespace_project_find_file_path(@project.namespace, @project, @id)
when "graphs_commits"
commits_namespace_project_graph_path(@project.namespace, @project, @id)
when "badges"
namespace_project_badges_path(@project.namespace, @project, ref: @id)
else
namespace_project_commits_path(@project.namespace, @project, @id)
end

View File

@ -7,6 +7,8 @@
.panel-heading
%b Builds badge &middot;
= @badge.to_html
.pull-right
= render 'shared/ref_switcher', destination: 'badges'
.panel-body
.row
.col-md-2.text-center