From 1c75a0e27c31b64b6426e0a4315e9ce7363d3b13 Mon Sep 17 00:00:00 2001 From: Clement Ho Date: Mon, 9 Apr 2018 11:33:41 -0500 Subject: Add badge-pill to .badge in haml --- app/helpers/issuables_helper.rb | 2 +- app/views/admin/groups/_group.html.haml | 2 +- app/views/admin/groups/show.html.haml | 10 ++++----- app/views/admin/projects/_projects.html.haml | 2 +- app/views/admin/projects/show.html.haml | 4 ++-- app/views/admin/users/index.html.haml | 14 ++++++------ app/views/dashboard/todos/index.html.haml | 4 ++-- app/views/discussions/_notes.html.haml | 2 +- app/views/groups/group_members/index.html.haml | 2 +- app/views/groups/projects.html.haml | 2 +- app/views/layouts/header/_default.html.haml | 6 ++--- app/views/layouts/nav/sidebar/_admin.html.haml | 4 ++-- app/views/layouts/nav/sidebar/_group.html.haml | 8 +++---- app/views/layouts/nav/sidebar/_project.html.haml | 8 +++---- app/views/projects/_home_panel.html.haml | 2 +- app/views/projects/commit/_ci_menu.html.haml | 4 ++-- .../merge_requests/creations/_new_submit.html.haml | 6 ++--- app/views/projects/merge_requests/show.html.haml | 8 +++---- .../projects/pipeline_schedules/_tabs.html.haml | 6 ++--- app/views/projects/pipelines/_with_tabs.html.haml | 4 ++-- .../projects/project_members/_groups.html.haml | 2 +- app/views/projects/project_members/_team.html.haml | 2 +- .../projects/services/prometheus/_show.html.haml | 4 ++-- app/views/search/_category.html.haml | 26 +++++++++++----------- app/views/shared/_milestones_filter.html.haml | 6 ++--- app/views/shared/builds/_tabs.html.haml | 8 +++---- app/views/shared/members/_requests.html.haml | 2 +- app/views/shared/milestones/_sidebar.html.haml | 4 ++-- app/views/shared/milestones/_tabs.html.haml | 10 ++++----- app/views/shared/notes/_note.html.haml | 2 +- app/views/sherlock/transactions/show.html.haml | 4 ++-- app/views/snippets/_snippets_scope_menu.html.haml | 8 +++---- 32 files changed, 89 insertions(+), 89 deletions(-) diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 6d6b840f485..0164ac8f80f 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -168,7 +168,7 @@ module IssuablesHelper count = issuables_count_for_state(issuable_type, state) html = content_tag(:span, state_title) - html << " " << content_tag(:span, number_with_delimiter(count), class: 'badge') + html << " " << content_tag(:span, number_with_delimiter(count), class: 'badge badge-pill') html.html_safe end diff --git a/app/views/admin/groups/_group.html.haml b/app/views/admin/groups/_group.html.haml index 47cc2d4d27e..e08510829e4 100644 --- a/app/views/admin/groups/_group.html.haml +++ b/app/views/admin/groups/_group.html.haml @@ -5,7 +5,7 @@ = link_to 'Edit', admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn' = link_to 'Delete', [:admin, group], data: { confirm: "Are you sure you want to remove #{group.name}?" }, method: :delete, class: 'btn btn-remove' .stats - %span.badge + %span.badge.badge-pill = storage_counter(group.storage_size) %span diff --git a/app/views/admin/groups/show.html.haml b/app/views/admin/groups/show.html.haml index 324f3c0a22f..f2a62ee0aa0 100644 --- a/app/views/admin/groups/show.html.haml +++ b/app/views/admin/groups/show.html.haml @@ -62,14 +62,14 @@ .panel-heading %h3.panel-title Projects - %span.badge + %span.badge.badge-pill #{@group.projects.count} %ul.well-list - @projects.each do |project| %li %strong = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project] - %span.badge + %span.badge.badge-pill = storage_counter(project.statistics.storage_size) %span.pull-right.light %span.monospace= project.full_path + '.git' @@ -80,14 +80,14 @@ .panel.panel-default .panel-heading Projects shared with #{@group.name} - %span.badge + %span.badge.badge-pill #{@group.shared_projects.count} %ul.well-list - @group.shared_projects.sort_by(&:name).each do |project| %li %strong = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project] - %span.badge + %span.badge.badge-pill = storage_counter(project.statistics.storage_size) %span.pull-right.light %span.monospace= project.full_path + '.git' @@ -115,7 +115,7 @@ .panel-heading %strong= @group.name group members - %span.badge= @group.members.size + %span.badge.badge-pill= @group.members.size .pull-right = link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@group, :members]), class: "btn btn-xs" %ul.well-list.group-users-list.content-list.members-list diff --git a/app/views/admin/projects/_projects.html.haml b/app/views/admin/projects/_projects.html.haml index b5d7b889504..45e550c3645 100644 --- a/app/views/admin/projects/_projects.html.haml +++ b/app/views/admin/projects/_projects.html.haml @@ -12,7 +12,7 @@ = s_('AdminProjects|Delete') .stats - %span.badge + %span.badge.badge-pill = storage_counter(project.statistics.storage_size) - if project.archived %span.label.label-warning archived diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index c47b8a88f56..c55a788a786 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -162,7 +162,7 @@ .panel-heading %strong= @group.name group members - %span.badge= @group_members.size + %span.badge.badge-pill= @group_members.size .pull-right = link_to admin_group_path(@group), class: 'btn btn-xs' do = icon('pencil-square-o', text: 'Manage access') @@ -177,7 +177,7 @@ .panel-heading %strong= @project.name project members - %span.badge= @project.users.size + %span.badge.badge-pill= @project.users.size .pull-right = link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@project, :members]), class: "btn btn-xs" %ul.well-list.project_members.content-list.members-list diff --git a/app/views/admin/users/index.html.haml b/app/views/admin/users/index.html.haml index 0ef4b71f4fe..70703d40362 100644 --- a/app/views/admin/users/index.html.haml +++ b/app/views/admin/users/index.html.haml @@ -42,31 +42,31 @@ = nav_link(html_options: { class: active_when(params[:filter].nil?) }) do = link_to admin_users_path do Active - %small.badge= number_with_delimiter(User.active.count) + %small.badge.badge-pill= number_with_delimiter(User.active.count) = nav_link(html_options: { class: active_when(params[:filter] == 'admins') }) do = link_to admin_users_path(filter: "admins") do Admins - %small.badge= number_with_delimiter(User.admins.count) + %small.badge.badge-pill= number_with_delimiter(User.admins.count) = nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_enabled')} filter-two-factor-enabled" }) do = link_to admin_users_path(filter: 'two_factor_enabled') do 2FA Enabled - %small.badge= number_with_delimiter(User.with_two_factor.count) + %small.badge.badge-pill= number_with_delimiter(User.with_two_factor.count) = nav_link(html_options: { class: "#{active_when(params[:filter] == 'two_factor_disabled')} filter-two-factor-disabled" }) do = link_to admin_users_path(filter: 'two_factor_disabled') do 2FA Disabled - %small.badge= number_with_delimiter(User.without_two_factor.count) + %small.badge.badge-pill= number_with_delimiter(User.without_two_factor.count) = nav_link(html_options: { class: active_when(params[:filter] == 'external') }) do = link_to admin_users_path(filter: 'external') do External - %small.badge= number_with_delimiter(User.external.count) + %small.badge.badge-pill= number_with_delimiter(User.external.count) = nav_link(html_options: { class: active_when(params[:filter] == 'blocked') }) do = link_to admin_users_path(filter: "blocked") do Blocked - %small.badge= number_with_delimiter(User.blocked.count) + %small.badge.badge-pill= number_with_delimiter(User.blocked.count) = nav_link(html_options: { class: active_when(params[:filter] == 'wop') }) do = link_to admin_users_path(filter: "wop") do Without projects - %small.badge= number_with_delimiter(User.without_projects.count) + %small.badge.badge-pill= number_with_delimiter(User.without_projects.count) %ul.flex-list.content-list - if @users.empty? diff --git a/app/views/dashboard/todos/index.html.haml b/app/views/dashboard/todos/index.html.haml index 664966989db..42afd9c2fe3 100644 --- a/app/views/dashboard/todos/index.html.haml +++ b/app/views/dashboard/todos/index.html.haml @@ -9,13 +9,13 @@ = link_to todos_filter_path(state: 'pending') do %span Todos - %span.badge + %span.badge.badge-pill = number_with_delimiter(todos_pending_count) %li.todos-done{ class: active_when(params[:state] == 'done') }> = link_to todos_filter_path(state: 'done') do %span Done - %span.badge + %span.badge.badge-pill = number_with_delimiter(todos_done_count) .nav-controls diff --git a/app/views/discussions/_notes.html.haml b/app/views/discussions/_notes.html.haml index 1cc227428e9..88126bce155 100644 --- a/app/views/discussions/_notes.html.haml +++ b/app/views/discussions/_notes.html.haml @@ -11,7 +11,7 @@ - if discussion.try(:on_image?) && show_toggle %button.diff-notes-collapse.js-diff-notes-toggle{ type: 'button' } = sprite_icon('collapse', css_class: 'collapse-icon') - %button.btn-transparent.badge.js-diff-notes-toggle{ type: 'button' } + %button.btn-transparent.badge.badge-pill.js-diff-notes-toggle{ type: 'button' } = badge_counter = render partial: "shared/notes/note", collection: discussion.notes, as: :note, locals: { badge_counter: badge_counter, show_image_comment_badge: show_image_comment_badge } diff --git a/app/views/groups/group_members/index.html.haml b/app/views/groups/group_members/index.html.haml index ad9d5562ded..a266700edea 100644 --- a/app/views/groups/group_members/index.html.haml +++ b/app/views/groups/group_members/index.html.haml @@ -26,7 +26,7 @@ .panel-heading Members with access to %strong= @group.name - %span.badge= @members.total_count + %span.badge.badge-pill= @members.total_count %ul.content-list.members-list = render partial: 'shared/members/member', collection: @members, as: :member = paginate @members, theme: 'gitlab' diff --git a/app/views/groups/projects.html.haml b/app/views/groups/projects.html.haml index ef181b425bc..d4d82d8f8f9 100644 --- a/app/views/groups/projects.html.haml +++ b/app/views/groups/projects.html.haml @@ -18,7 +18,7 @@ .pull-right - if project.archived %span.label.label-warning archived - %span.badge + %span.badge.badge-pill = storage_counter(project.statistics.storage_size) = link_to 'Members', project_project_members_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm" = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm" diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index e6238c0dddb..83401ac1ef2 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -32,20 +32,20 @@ = link_to assigned_issues_dashboard_path, title: 'Issues', class: 'dashboard-shortcuts-issues', aria: { label: "Issues" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('issues', size: 16) - issues_count = assigned_issuables_count(:issues) - %span.badge.issues-count{ class: ('hidden' if issues_count.zero?) } + %span.badge.badge-pill.issues-count{ class: ('hidden' if issues_count.zero?) } = number_with_delimiter(issues_count) - if header_link?(:merge_requests) = nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter" }) do = link_to assigned_mrs_dashboard_path, title: 'Merge requests', class: 'dashboard-shortcuts-merge_requests', aria: { label: "Merge requests" }, data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('git-merge', size: 16) - merge_requests_count = assigned_issuables_count(:merge_requests) - %span.badge.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) } + %span.badge.badge-pill.merge-requests-count{ class: ('hidden' if merge_requests_count.zero?) } = number_with_delimiter(merge_requests_count) - if header_link?(:todos) = nav_link(controller: 'dashboard/todos', html_options: { class: "user-counter" }) do = link_to dashboard_todos_path, title: 'Todos', aria: { label: "Todos" }, class: 'shortcuts-todos', data: {toggle: 'tooltip', placement: 'bottom', container: 'body'} do = sprite_icon('todo-done', size: 16) - %span.badge.todos-count{ class: ('hidden' if todos_pending_count.zero?) } + %span.badge.badge-pill.todos-count{ class: ('hidden' if todos_pending_count.zero?) } = todos_count_format(todos_pending_count) - if header_link?(:user_dropdown) %li.header-user.dropdown diff --git a/app/views/layouts/nav/sidebar/_admin.html.haml b/app/views/layouts/nav/sidebar/_admin.html.haml index dd086f70641..62402c32e08 100644 --- a/app/views/layouts/nav/sidebar/_admin.html.haml +++ b/app/views/layouts/nav/sidebar/_admin.html.haml @@ -127,13 +127,13 @@ = sprite_icon('slight-frown') %span.nav-item-name Abuse Reports - %span.badge.count= number_with_delimiter(AbuseReport.count(:all)) + %span.badge.badge-pill.count= number_with_delimiter(AbuseReport.count(:all)) %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :abuse_reports, html_options: { class: "fly-out-top-item" } ) do = link_to admin_abuse_reports_path do %strong.fly-out-top-item-name #{ _('Abuse Reports') } - %span.badge.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(AbuseReport.count(:all)) + %span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(AbuseReport.count(:all)) - if akismet_enabled? = nav_link(controller: :spam_logs) do diff --git a/app/views/layouts/nav/sidebar/_group.html.haml b/app/views/layouts/nav/sidebar/_group.html.haml index 5ea19c9882d..64647b55a9e 100644 --- a/app/views/layouts/nav/sidebar/_group.html.haml +++ b/app/views/layouts/nav/sidebar/_group.html.haml @@ -43,14 +43,14 @@ = sprite_icon('issues') %span.nav-item-name Issues - %span.badge.count= number_with_delimiter(issues_count) + %span.badge.badge-pill.count= number_with_delimiter(issues_count) %ul.sidebar-sub-level-items = nav_link(path: ['groups#issues', 'labels#index', 'milestones#index'], html_options: { class: "fly-out-top-item" } ) do = link_to issues_group_path(@group) do %strong.fly-out-top-item-name #{ _('Issues') } - %span.badge.count.issue_counter.fly-out-badge= number_with_delimiter(issues_count) + %span.badge.badge-pill.count.issue_counter.fly-out-badge= number_with_delimiter(issues_count) %li.divider.fly-out-top-item = nav_link(path: 'groups#issues', html_options: { class: 'home' }) do @@ -83,13 +83,13 @@ = sprite_icon('git-merge') %span.nav-item-name Merge Requests - %span.badge.count= number_with_delimiter(merge_requests_count) + %span.badge.badge-pill.count= number_with_delimiter(merge_requests_count) %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(path: 'groups#merge_requests', html_options: { class: "fly-out-top-item" } ) do = link_to merge_requests_group_path(@group) do %strong.fly-out-top-item-name #{ _('Merge Requests') } - %span.badge.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(merge_requests_count) + %span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge= number_with_delimiter(merge_requests_count) - if group_sidebar_link?(:group_members) = nav_link(path: 'group_members#index') do diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index 5c90d13420f..ada1f62b927 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -88,7 +88,7 @@ %span.nav-item-name Issues - if @project.issues_enabled? - %span.badge.count.issue_counter + %span.badge.badge-pill.count.issue_counter = number_with_delimiter(@project.open_issues_count) %ul.sidebar-sub-level-items @@ -97,7 +97,7 @@ %strong.fly-out-top-item-name #{ _('Issues') } - if @project.issues_enabled? - %span.badge.count.issue_counter.fly-out-badge + %span.badge.badge-pill.count.issue_counter.fly-out-badge = number_with_delimiter(@project.open_issues_count) %li.divider.fly-out-top-item = nav_link(controller: :issues, action: :index) do @@ -140,14 +140,14 @@ = sprite_icon('git-merge') %span.nav-item-name Merge Requests - %span.badge.count.merge_counter.js-merge-counter + %span.badge.badge-pill.count.merge_counter.js-merge-counter = number_with_delimiter(@project.open_merge_requests_count) %ul.sidebar-sub-level-items.is-fly-out-only = nav_link(controller: :merge_requests, html_options: { class: "fly-out-top-item" } ) do = link_to project_merge_requests_path(@project) do %strong.fly-out-top-item-name #{ _('Merge Requests') } - %span.badge.count.merge_counter.js-merge-counter.fly-out-badge + %span.badge.badge-pill.count.merge_counter.js-merge-counter.fly-out-badge = number_with_delimiter(@project.open_merge_requests_count) - if project_nav_tab? :pipelines diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index a2ecfddb163..90ade34bde0 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -24,7 +24,7 @@ = deleted_message % { project_name: fork_source_name(@project) } .project-badges - - @project.badges.each do |badge| + - @project.badge.badge-pills.each do |badge| - badge_link_url = badge.rendered_link_url(@project) %a{ href: badge_link_url, target: '_blank', rel: 'noopener noreferrer' } %img{ src: badge.rendered_image_url(@project), alt: badge_link_url } diff --git a/app/views/projects/commit/_ci_menu.html.haml b/app/views/projects/commit/_ci_menu.html.haml index 7338468967f..3648b63dd3e 100644 --- a/app/views/projects/commit/_ci_menu.html.haml +++ b/app/views/projects/commit/_ci_menu.html.haml @@ -2,9 +2,9 @@ = nav_link(path: 'commit#show') do = link_to project_commit_path(@project, @commit.id) do Changes - %span.badge= @diffs.size + %span.badge.badge-pill= @diffs.size - if can?(current_user, :read_pipeline, @project) = nav_link(path: 'commit#pipelines') do = link_to pipelines_project_commit_path(@project, @commit.id) do Pipelines - %span.badge.js-pipelines-mr-count= @commit.pipelines.size + %span.badge.badge-pill.js-pipelines-mr-count= @commit.pipelines.size diff --git a/app/views/projects/merge_requests/creations/_new_submit.html.haml b/app/views/projects/merge_requests/creations/_new_submit.html.haml index 376ac377562..37331fb4694 100644 --- a/app/views/projects/merge_requests/creations/_new_submit.html.haml +++ b/app/views/projects/merge_requests/creations/_new_submit.html.haml @@ -28,16 +28,16 @@ %li.commits-tab.active = link_to url_for(params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do Commits - %span.badge= @commits.size + %span.badge.badge-pill= @commits.size - if @pipelines.any? %li.builds-tab = link_to url_for(params.merge(action: 'pipelines')), data: {target: 'div#pipelines', action: 'pipelines', toggle: 'tab'} do Pipelines - %span.badge= @pipelines.size + %span.badge.badge-pill= @pipelines.size %li.diffs-tab = link_to url_for(params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do Changes - %span.badge= @merge_request.diff_size + %span.badge.badge-pill= @merge_request.diff_size .tab-content #commits.commits.tab-pane.active diff --git a/app/views/projects/merge_requests/show.html.haml b/app/views/projects/merge_requests/show.html.haml index 9866cc716ee..3158904d055 100644 --- a/app/views/projects/merge_requests/show.html.haml +++ b/app/views/projects/merge_requests/show.html.haml @@ -35,21 +35,21 @@ %li.notes-tab = tab_link_for @merge_request, :show, force_link: @commit.present? do Discussion - %span.badge= @merge_request.related_notes.user.count + %span.badge.badge-pill= @merge_request.related_notes.user.count - if @merge_request.source_project %li.commits-tab = tab_link_for @merge_request, :commits do Commits - %span.badge= @commits_count + %span.badge.badge-pill= @commits_count - if @pipelines.any? %li.pipelines-tab = tab_link_for @merge_request, :pipelines do Pipelines - %span.badge.js-pipelines-mr-count= @pipelines.size + %span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size %li.diffs-tab = tab_link_for @merge_request, :diffs do Changes - %span.badge= @merge_request.diff_size + %span.badge.badge-pill= @merge_request.diff_size - if has_vue_discussions_cookie? #js-vue-discussion-counter diff --git a/app/views/projects/pipeline_schedules/_tabs.html.haml b/app/views/projects/pipeline_schedules/_tabs.html.haml index 8996c1b3e38..e158ddcb338 100644 --- a/app/views/projects/pipeline_schedules/_tabs.html.haml +++ b/app/views/projects/pipeline_schedules/_tabs.html.haml @@ -2,17 +2,17 @@ %li{ class: active_when(scope.nil?) }> = link_to schedule_path_proc.call(nil) do = s_("PipelineSchedules|All") - %span.badge.js-totalbuilds-count + %span.badge.badge-pill.js-totalbuilds-count = number_with_delimiter(all_schedules.count(:id)) %li{ class: active_when(scope == 'active') }> = link_to schedule_path_proc.call('active') do = s_("PipelineSchedules|Active") - %span.badge + %span.badge.badge-pill = number_with_delimiter(all_schedules.active.count(:id)) %li{ class: active_when(scope == 'inactive') }> = link_to schedule_path_proc.call('inactive') do = s_("PipelineSchedules|Inactive") - %span.badge + %span.badge.badge-pill = number_with_delimiter(all_schedules.inactive.count(:id)) diff --git a/app/views/projects/pipelines/_with_tabs.html.haml b/app/views/projects/pipelines/_with_tabs.html.haml index 852143ecb2a..74a361fac61 100644 --- a/app/views/projects/pipelines/_with_tabs.html.haml +++ b/app/views/projects/pipelines/_with_tabs.html.haml @@ -8,12 +8,12 @@ %li.js-builds-tab-link = link_to builds_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do = _("Jobs") - %span.badge.js-builds-counter= pipeline.total_size + %span.badge.badge-pill.js-builds-counter= pipeline.total_size - if failed_builds.present? %li.js-failures-tab-link = link_to failures_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do = _("Failed Jobs") - %span.badge.js-failures-counter= failed_builds.count + %span.badge.badge-pill.js-failures-counter= failed_builds.count .tab-content #js-tab-pipeline.tab-pane diff --git a/app/views/projects/project_members/_groups.html.haml b/app/views/projects/project_members/_groups.html.haml index fdeb5f21fbe..e5a689f9625 100644 --- a/app/views/projects/project_members/_groups.html.haml +++ b/app/views/projects/project_members/_groups.html.haml @@ -2,6 +2,6 @@ .panel-heading Groups with access to %strong= @project.name - %span.badge= group_links.size + %span.badge.badge-pill= group_links.size %ul.content-list = render partial: 'shared/members/group', collection: group_links, as: :group_link diff --git a/app/views/projects/project_members/_team.html.haml b/app/views/projects/project_members/_team.html.haml index 16bcf671c25..930ff85a20c 100644 --- a/app/views/projects/project_members/_team.html.haml +++ b/app/views/projects/project_members/_team.html.haml @@ -6,7 +6,7 @@ %span.flex-project-title Members of %strong= project.name - %span.badge= members.total_count + %span.badge.badge-pill= members.total_count = form_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do .form-group = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } diff --git a/app/views/projects/services/prometheus/_show.html.haml b/app/views/projects/services/prometheus/_show.html.haml index 43e6a173108..ef5319b6d31 100644 --- a/app/views/projects/services/prometheus/_show.html.haml +++ b/app/views/projects/services/prometheus/_show.html.haml @@ -11,7 +11,7 @@ .panel-heading %h3.panel-title = s_('PrometheusService|Common metrics') - %span.badge.js-monitored-count 0 + %span.badge.badge-pill.js-monitored-count 0 .panel-body .loading-metrics.js-loading-metrics %p.prepend-top-10.prepend-left-10 @@ -27,7 +27,7 @@ %h3.panel-title = icon('caret-right lg fw', class: 'panel-toggle js-panel-toggle', 'aria-label' => 'Toggle panel') = s_('PrometheusService|Missing environment variable') - %span.badge.js-env-var-count 0 + %span.badge.badge-pill.js-env-var-count 0 .panel-body.hidden .flash-container .flash-notice diff --git a/app/views/search/_category.html.haml b/app/views/search/_category.html.haml index 7d43fd61081..27a115d9877 100644 --- a/app/views/search/_category.html.haml +++ b/app/views/search/_category.html.haml @@ -7,74 +7,74 @@ %li{ class: active_when(@scope == 'blobs') } = link_to search_filter_path(scope: 'blobs') do Code - %span.badge + %span.badge.badge-pill = @search_results.blobs_count - if project_search_tabs?(:issues) %li{ class: active_when(@scope == 'issues') } = link_to search_filter_path(scope: 'issues') do Issues - %span.badge + %span.badge.badge-pill = limited_count(@search_results.limited_issues_count) - if project_search_tabs?(:merge_requests) %li{ class: active_when(@scope == 'merge_requests') } = link_to search_filter_path(scope: 'merge_requests') do Merge requests - %span.badge + %span.badge.badge-pill = limited_count(@search_results.limited_merge_requests_count) - if project_search_tabs?(:milestones) %li{ class: active_when(@scope == 'milestones') } = link_to search_filter_path(scope: 'milestones') do Milestones - %span.badge + %span.badge.badge-pill = limited_count(@search_results.limited_milestones_count) - if project_search_tabs?(:notes) %li{ class: active_when(@scope == 'notes') } = link_to search_filter_path(scope: 'notes') do Comments - %span.badge + %span.badge.badge-pill = limited_count(@search_results.limited_notes_count) - if project_search_tabs?(:wiki) %li{ class: active_when(@scope == 'wiki_blobs') } = link_to search_filter_path(scope: 'wiki_blobs') do Wiki - %span.badge + %span.badge.badge-pill = @search_results.wiki_blobs_count - if project_search_tabs?(:commits) %li{ class: active_when(@scope == 'commits') } = link_to search_filter_path(scope: 'commits') do Commits - %span.badge + %span.badge.badge-pill = @search_results.commits_count - elsif @show_snippets %li{ class: active_when(@scope == 'snippet_blobs') } = link_to search_filter_path(scope: 'snippet_blobs', snippets: true, group_id: nil, project_id: nil) do Snippet Contents - %span.badge + %span.badge.badge-pill = @search_results.snippet_blobs_count %li{ class: active_when(@scope == 'snippet_titles') } = link_to search_filter_path(scope: 'snippet_titles', snippets: true, group_id: nil, project_id: nil) do Titles and Filenames - %span.badge + %span.badge.badge-pill = @search_results.snippet_titles_count - else %li{ class: active_when(@scope == 'projects') } = link_to search_filter_path(scope: 'projects') do Projects - %span.badge + %span.badge.badge-pill = limited_count(@search_results.limited_projects_count) %li{ class: active_when(@scope == 'issues') } = link_to search_filter_path(scope: 'issues') do Issues - %span.badge + %span.badge.badge-pill = limited_count(@search_results.limited_issues_count) %li{ class: active_when(@scope == 'merge_requests') } = link_to search_filter_path(scope: 'merge_requests') do Merge requests - %span.badge + %span.badge.badge-pill = limited_count(@search_results.limited_merge_requests_count) %li{ class: active_when(@scope == 'milestones') } = link_to search_filter_path(scope: 'milestones') do Milestones - %span.badge + %span.badge.badge-pill = limited_count(@search_results.limited_milestones_count) diff --git a/app/views/shared/_milestones_filter.html.haml b/app/views/shared/_milestones_filter.html.haml index 034b76b978f..69b8478ff75 100644 --- a/app/views/shared/_milestones_filter.html.haml +++ b/app/views/shared/_milestones_filter.html.haml @@ -2,12 +2,12 @@ %li{ class: milestone_class_for_state(params[:state], 'opened', true) }> = link_to milestones_filter_path(state: 'opened') do Open - %span.badge= counts[:opened] + %span.badge.badge-pill= counts[:opened] %li{ class: milestone_class_for_state(params[:state], 'closed') }> = link_to milestones_filter_path(state: 'closed', sort: 'due_date_desc') do Closed - %span.badge= counts[:closed] + %span.badge.badge-pill= counts[:closed] %li{ class: milestone_class_for_state(params[:state], 'all') }> = link_to milestones_filter_path(state: 'all', sort: 'due_date_desc') do All - %span.badge= counts[:all] + %span.badge.badge-pill= counts[:all] diff --git a/app/views/shared/builds/_tabs.html.haml b/app/views/shared/builds/_tabs.html.haml index 0b003125912..b3f63165cc2 100644 --- a/app/views/shared/builds/_tabs.html.haml +++ b/app/views/shared/builds/_tabs.html.haml @@ -2,23 +2,23 @@ %li{ class: active_when(scope.nil?) }> = link_to build_path_proc.call(nil) do All - %span.badge.js-totalbuilds-count + %span.badge.badge-pill.js-totalbuilds-count = limited_counter_with_delimiter(all_builds) %li{ class: active_when(scope == 'pending') }> = link_to build_path_proc.call('pending') do Pending - %span.badge + %span.badge.badge-pill = limited_counter_with_delimiter(all_builds.pending) %li{ class: active_when(scope == 'running') }> = link_to build_path_proc.call('running') do Running - %span.badge + %span.badge.badge-pill = limited_counter_with_delimiter(all_builds.running) %li{ class: active_when(scope == 'finished') }> = link_to build_path_proc.call('finished') do Finished - %span.badge + %span.badge.badge-pill = limited_counter_with_delimiter(all_builds.finished) diff --git a/app/views/shared/members/_requests.html.haml b/app/views/shared/members/_requests.html.haml index 1fbd6bcc4cb..f288cf9ec33 100644 --- a/app/views/shared/members/_requests.html.haml +++ b/app/views/shared/members/_requests.html.haml @@ -8,6 +8,6 @@ .panel-heading Users requesting access to %strong= membership_source.name - %span.badge= requesters.size + %span.badge.badge-pill= requesters.size %ul.content-list.members-list = render partial: 'shared/members/member', collection: requesters, as: :member, locals: { force_mobile_view: force_mobile_view } diff --git a/app/views/shared/milestones/_sidebar.html.haml b/app/views/shared/milestones/_sidebar.html.haml index a942ebc328b..baad06e99e9 100644 --- a/app/views/shared/milestones/_sidebar.html.haml +++ b/app/views/shared/milestones/_sidebar.html.haml @@ -71,7 +71,7 @@ %span= milestone.issues_visible_to_user(current_user).count .title.hide-collapsed Issues - %span.badge= milestone.issues_visible_to_user(current_user).count + %span.badge.badge-pill= milestone.issues_visible_to_user(current_user).count - if project && can?(current_user, :create_issue, project) = link_to new_project_issue_path(project, issue: { milestone_id: milestone.id }), class: "pull-right", title: "New Issue" do New issue @@ -99,7 +99,7 @@ %span= milestone.merge_requests.count .title.hide-collapsed Merge requests - %span.badge= milestone.merge_requests.count + %span.badge.badge-pill= milestone.merge_requests.count .value.hide-collapsed.bold - if !project || can?(current_user, :read_merge_request, project) %span.milestone-stat diff --git a/app/views/shared/milestones/_tabs.html.haml b/app/views/shared/milestones/_tabs.html.haml index b95a4ea674d..cd3c9436574 100644 --- a/app/views/shared/milestones/_tabs.html.haml +++ b/app/views/shared/milestones/_tabs.html.haml @@ -8,24 +8,24 @@ %li.active = link_to '#tab-issues', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do Issues - %span.badge= milestone.issues_visible_to_user(current_user).size + %span.badge.badge-pill= milestone.issues_visible_to_user(current_user).size %li = link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do Merge Requests - %span.badge= milestone.merge_requests.size + %span.badge.badge-pill= milestone.merge_requests.size - else %li.active = link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do Merge Requests - %span.badge= milestone.merge_requests.size + %span.badge.badge-pill= milestone.merge_requests.size %li = link_to '#tab-participants', 'data-toggle' => 'tab', 'data-endpoint': milestone_participants_tab_path(milestone) do Participants - %span.badge= milestone.participants.count + %span.badge.badge-pill= milestone.participants.count %li = link_to '#tab-labels', 'data-toggle' => 'tab', 'data-endpoint': milestone_labels_tab_path(milestone) do Labels - %span.badge= milestone.labels.count + %span.badge.badge-pill= milestone.labels.count - issues = milestone.sorted_issues(current_user) - show_project_name = local_assigns.fetch(:show_project_name, false) diff --git a/app/views/shared/notes/_note.html.haml b/app/views/shared/notes/_note.html.haml index bf359774ead..4c282759493 100644 --- a/app/views/shared/notes/_note.html.haml +++ b/app/views/shared/notes/_note.html.haml @@ -25,7 +25,7 @@ - elsif note_counter == 0 - counter = badge_counter if local_assigns[:badge_counter] - badge_class = "hidden" if @fresh_discussion || counter.nil? - %span.badge{ class: badge_class } + %span.badge.badge-pill{ class: badge_class } = counter .timeline-content .note-header diff --git a/app/views/sherlock/transactions/show.html.haml b/app/views/sherlock/transactions/show.html.haml index eab91e8fbe4..3db19400ec8 100644 --- a/app/views/sherlock/transactions/show.html.haml +++ b/app/views/sherlock/transactions/show.html.haml @@ -8,12 +8,12 @@ %li %a{ href: "#tab-queries", data: { toggle: "tab" } } = t('sherlock.queries') - %span.badge + %span.badge.badge-pill #{@transaction.queries.length} %li %a{ href: "#tab-file-samples", data: { toggle: "tab" } } = t('sherlock.file_samples') - %span.badge + %span.badge.badge-pill #{@transaction.file_samples.length} .row-content-block diff --git a/app/views/snippets/_snippets_scope_menu.html.haml b/app/views/snippets/_snippets_scope_menu.html.haml index 65aa4fbc757..3b6c8201a7f 100644 --- a/app/views/snippets/_snippets_scope_menu.html.haml +++ b/app/views/snippets/_snippets_scope_menu.html.haml @@ -5,7 +5,7 @@ %li{ class: active_when(params[:scope].nil?) } = link_to subject_snippets_path(subject) do All - %span.badge + %span.badge.badge-pill - if include_private = subject.snippets.count - else @@ -15,17 +15,17 @@ %li{ class: active_when(params[:scope] == "are_private") } = link_to subject_snippets_path(subject, scope: 'are_private') do Private - %span.badge + %span.badge.badge-pill = subject.snippets.are_private.count %li{ class: active_when(params[:scope] == "are_internal") } = link_to subject_snippets_path(subject, scope: 'are_internal') do Internal - %span.badge + %span.badge.badge-pill = subject.snippets.are_internal.count %li{ class: active_when(params[:scope] == "are_public") } = link_to subject_snippets_path(subject, scope: 'are_public') do Public - %span.badge + %span.badge.badge-pill = subject.snippets.are_public.count -- cgit v1.2.3