From 97a2de9e03f9ad947642ded3b4f4e7761fcaa9c3 Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Mon, 4 Apr 2016 10:40:40 +0200 Subject: [PATCH] Make it possible to switch ref in badges view --- app/controllers/projects/refs_controller.rb | 2 ++ app/views/projects/badges/index.html.haml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/controllers/projects/refs_controller.rb b/app/controllers/projects/refs_controller.rb index 00df1c9c965..d79f16e6a5a 100644 --- a/app/controllers/projects/refs_controller.rb +++ b/app/controllers/projects/refs_controller.rb @@ -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 diff --git a/app/views/projects/badges/index.html.haml b/app/views/projects/badges/index.html.haml index 5cd2ebce099..fb57bf411dc 100644 --- a/app/views/projects/badges/index.html.haml +++ b/app/views/projects/badges/index.html.haml @@ -7,6 +7,8 @@ .panel-heading %b Builds badge · = @badge.to_html + .pull-right + = render 'shared/ref_switcher', destination: 'badges' .panel-body .row .col-md-2.text-center