diff --git a/app/controllers/projects/badges_controller.rb b/app/controllers/projects/badges_controller.rb index 824aa41db51..a9f482c8787 100644 --- a/app/controllers/projects/badges_controller.rb +++ b/app/controllers/projects/badges_controller.rb @@ -3,11 +3,6 @@ class Projects::BadgesController < Projects::ApplicationController before_action :authorize_admin_project!, only: [:index] before_action :no_cache_headers, except: [:index] - def index - @ref = params[:ref] || @project.default_branch || 'master' - @build_badge = Gitlab::Badge::Build.new(@project, @ref) - end - def build badge = Gitlab::Badge::Build.new(project, params[:ref]) diff --git a/app/views/projects/badges/index.html.haml b/app/views/projects/badges/index.html.haml deleted file mode 100644 index ac80951dd4f..00000000000 --- a/app/views/projects/badges/index.html.haml +++ /dev/null @@ -1,23 +0,0 @@ -- page_title 'Badges' -- badges_path = namespace_project_badges_path(@project.namespace, @project) - -.prepend-top-10 - .panel.panel-default - .panel-heading - %b Builds badge · - = @build_badge.to_html - .pull-right - = render 'shared/ref_switcher', destination: 'badges', align_right: true - .panel-body - .row - .col-md-2.text-center - Markdown - .col-md-10.code.js-syntax-highlight - = highlight('.md', @build_badge.to_markdown) - .row - %hr - .row - .col-md-2.text-center - HTML - .col-md-10.code.js-syntax-highlight - = highlight('.html', @build_badge.to_html)