diff --git a/app/helpers/pull_request_helper.rb b/app/helpers/pull_request_helper.rb index 2c5967122..333778287 100644 --- a/app/helpers/pull_request_helper.rb +++ b/app/helpers/pull_request_helper.rb @@ -1,15 +1,8 @@ # -*- encoding : utf-8 -*- module PullRequestHelper def pull_status_label pull - label = case pull.status - when 'ready' - 'success' - when 'closed', 'merged' - 'important' - when 'blocked' - 'warning' - end - "#{t "projects.pull_requests.statuses.#{pull.status}"}".html_safe + statuses = {'ready' => 'success', 'closed' => 'important', 'merged' => 'important', 'blocked' => 'warning'} + content_tag :span, t("projects.pull_requests.statuses.#{pull.status}"), :class => "label-bootstrap label-#{statuses[pull.status]}" end def pull_status pull