Commit 1c75a0e2 authored by Clement Ho's avatar Clement Ho

Add badge-pill to .badge in haml

parent 88cb02ba
...@@ -168,7 +168,7 @@ module IssuablesHelper ...@@ -168,7 +168,7 @@ module IssuablesHelper
count = issuables_count_for_state(issuable_type, state) count = issuables_count_for_state(issuable_type, state)
html = content_tag(:span, state_title) 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 html.html_safe
end end
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
= link_to 'Edit', admin_group_edit_path(group), id: "edit_#{dom_id(group)}", class: 'btn' = 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' = link_to 'Delete', [:admin, group], data: { confirm: "Are you sure you want to remove #{group.name}?" }, method: :delete, class: 'btn btn-remove'
.stats .stats
%span.badge %span.badge.badge-pill
= storage_counter(group.storage_size) = storage_counter(group.storage_size)
%span %span
......
...@@ -62,14 +62,14 @@ ...@@ -62,14 +62,14 @@
.panel-heading .panel-heading
%h3.panel-title %h3.panel-title
Projects Projects
%span.badge %span.badge.badge-pill
#{@group.projects.count} #{@group.projects.count}
%ul.well-list %ul.well-list
- @projects.each do |project| - @projects.each do |project|
%li %li
%strong %strong
= link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project] = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project]
%span.badge %span.badge.badge-pill
= storage_counter(project.statistics.storage_size) = storage_counter(project.statistics.storage_size)
%span.pull-right.light %span.pull-right.light
%span.monospace= project.full_path + '.git' %span.monospace= project.full_path + '.git'
...@@ -80,14 +80,14 @@ ...@@ -80,14 +80,14 @@
.panel.panel-default .panel.panel-default
.panel-heading .panel-heading
Projects shared with #{@group.name} Projects shared with #{@group.name}
%span.badge %span.badge.badge-pill
#{@group.shared_projects.count} #{@group.shared_projects.count}
%ul.well-list %ul.well-list
- @group.shared_projects.sort_by(&:name).each do |project| - @group.shared_projects.sort_by(&:name).each do |project|
%li %li
%strong %strong
= link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project] = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project]
%span.badge %span.badge.badge-pill
= storage_counter(project.statistics.storage_size) = storage_counter(project.statistics.storage_size)
%span.pull-right.light %span.pull-right.light
%span.monospace= project.full_path + '.git' %span.monospace= project.full_path + '.git'
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
.panel-heading .panel-heading
%strong= @group.name %strong= @group.name
group members group members
%span.badge= @group.members.size %span.badge.badge-pill= @group.members.size
.pull-right .pull-right
= link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@group, :members]), class: "btn btn-xs" = 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 %ul.well-list.group-users-list.content-list.members-list
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
= s_('AdminProjects|Delete') = s_('AdminProjects|Delete')
.stats .stats
%span.badge %span.badge.badge-pill
= storage_counter(project.statistics.storage_size) = storage_counter(project.statistics.storage_size)
- if project.archived - if project.archived
%span.label.label-warning archived %span.label.label-warning archived
......
...@@ -162,7 +162,7 @@ ...@@ -162,7 +162,7 @@
.panel-heading .panel-heading
%strong= @group.name %strong= @group.name
group members group members
%span.badge= @group_members.size %span.badge.badge-pill= @group_members.size
.pull-right .pull-right
= link_to admin_group_path(@group), class: 'btn btn-xs' do = link_to admin_group_path(@group), class: 'btn btn-xs' do
= icon('pencil-square-o', text: 'Manage access') = icon('pencil-square-o', text: 'Manage access')
...@@ -177,7 +177,7 @@ ...@@ -177,7 +177,7 @@
.panel-heading .panel-heading
%strong= @project.name %strong= @project.name
project members project members
%span.badge= @project.users.size %span.badge.badge-pill= @project.users.size
.pull-right .pull-right
= link_to icon('pencil-square-o', text: 'Manage access'), polymorphic_url([@project, :members]), class: "btn btn-xs" = 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 %ul.well-list.project_members.content-list.members-list
......
...@@ -42,31 +42,31 @@ ...@@ -42,31 +42,31 @@
= nav_link(html_options: { class: active_when(params[:filter].nil?) }) do = nav_link(html_options: { class: active_when(params[:filter].nil?) }) do
= link_to admin_users_path do = link_to admin_users_path do
Active 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 = nav_link(html_options: { class: active_when(params[:filter] == 'admins') }) do
= link_to admin_users_path(filter: "admins") do = link_to admin_users_path(filter: "admins") do
Admins 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 = 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 = link_to admin_users_path(filter: 'two_factor_enabled') do
2FA Enabled 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 = 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 = link_to admin_users_path(filter: 'two_factor_disabled') do
2FA Disabled 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 = nav_link(html_options: { class: active_when(params[:filter] == 'external') }) do
= link_to admin_users_path(filter: 'external') do = link_to admin_users_path(filter: 'external') do
External 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 = nav_link(html_options: { class: active_when(params[:filter] == 'blocked') }) do
= link_to admin_users_path(filter: "blocked") do = link_to admin_users_path(filter: "blocked") do
Blocked 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 = nav_link(html_options: { class: active_when(params[:filter] == 'wop') }) do
= link_to admin_users_path(filter: "wop") do = link_to admin_users_path(filter: "wop") do
Without projects 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 %ul.flex-list.content-list
- if @users.empty? - if @users.empty?
......
...@@ -9,13 +9,13 @@ ...@@ -9,13 +9,13 @@
= link_to todos_filter_path(state: 'pending') do = link_to todos_filter_path(state: 'pending') do
%span %span
Todos Todos
%span.badge %span.badge.badge-pill
= number_with_delimiter(todos_pending_count) = number_with_delimiter(todos_pending_count)
%li.todos-done{ class: active_when(params[:state] == 'done') }> %li.todos-done{ class: active_when(params[:state] == 'done') }>
= link_to todos_filter_path(state: 'done') do = link_to todos_filter_path(state: 'done') do
%span %span
Done Done
%span.badge %span.badge.badge-pill
= number_with_delimiter(todos_done_count) = number_with_delimiter(todos_done_count)
.nav-controls .nav-controls
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
- if discussion.try(:on_image?) && show_toggle - if discussion.try(:on_image?) && show_toggle
%button.diff-notes-collapse.js-diff-notes-toggle{ type: 'button' } %button.diff-notes-collapse.js-diff-notes-toggle{ type: 'button' }
= sprite_icon('collapse', css_class: 'collapse-icon') = 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 = 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 } = render partial: "shared/notes/note", collection: discussion.notes, as: :note, locals: { badge_counter: badge_counter, show_image_comment_badge: show_image_comment_badge }
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
.panel-heading .panel-heading
Members with access to Members with access to
%strong= @group.name %strong= @group.name
%span.badge= @members.total_count %span.badge.badge-pill= @members.total_count
%ul.content-list.members-list %ul.content-list.members-list
= render partial: 'shared/members/member', collection: @members, as: :member = render partial: 'shared/members/member', collection: @members, as: :member
= paginate @members, theme: 'gitlab' = paginate @members, theme: 'gitlab'
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
.pull-right .pull-right
- if project.archived - if project.archived
%span.label.label-warning archived %span.label.label-warning archived
%span.badge %span.badge.badge-pill
= storage_counter(project.statistics.storage_size) = 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 '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" = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-sm"
......
...@@ -32,20 +32,20 @@ ...@@ -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 = 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) = sprite_icon('issues', size: 16)
- issues_count = assigned_issuables_count(:issues) - 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) = number_with_delimiter(issues_count)
- if header_link?(:merge_requests) - if header_link?(:merge_requests)
= nav_link(path: 'dashboard#merge_requests', html_options: { class: "user-counter" }) do = 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 = 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) = sprite_icon('git-merge', size: 16)
- merge_requests_count = assigned_issuables_count(:merge_requests) - 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) = number_with_delimiter(merge_requests_count)
- if header_link?(:todos) - if header_link?(:todos)
= nav_link(controller: 'dashboard/todos', html_options: { class: "user-counter" }) do = 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 = 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) = 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) = todos_count_format(todos_pending_count)
- if header_link?(:user_dropdown) - if header_link?(:user_dropdown)
%li.header-user.dropdown %li.header-user.dropdown
......
...@@ -127,13 +127,13 @@ ...@@ -127,13 +127,13 @@
= sprite_icon('slight-frown') = sprite_icon('slight-frown')
%span.nav-item-name %span.nav-item-name
Abuse Reports 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 %ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :abuse_reports, html_options: { class: "fly-out-top-item" } ) do = nav_link(controller: :abuse_reports, html_options: { class: "fly-out-top-item" } ) do
= link_to admin_abuse_reports_path do = link_to admin_abuse_reports_path do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
#{ _('Abuse Reports') } #{ _('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? - if akismet_enabled?
= nav_link(controller: :spam_logs) do = nav_link(controller: :spam_logs) do
......
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
= sprite_icon('issues') = sprite_icon('issues')
%span.nav-item-name %span.nav-item-name
Issues Issues
%span.badge.count= number_with_delimiter(issues_count) %span.badge.badge-pill.count= number_with_delimiter(issues_count)
%ul.sidebar-sub-level-items %ul.sidebar-sub-level-items
= nav_link(path: ['groups#issues', 'labels#index', 'milestones#index'], html_options: { class: "fly-out-top-item" } ) do = nav_link(path: ['groups#issues', 'labels#index', 'milestones#index'], html_options: { class: "fly-out-top-item" } ) do
= link_to issues_group_path(@group) do = link_to issues_group_path(@group) do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
#{ _('Issues') } #{ _('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 %li.divider.fly-out-top-item
= nav_link(path: 'groups#issues', html_options: { class: 'home' }) do = nav_link(path: 'groups#issues', html_options: { class: 'home' }) do
...@@ -83,13 +83,13 @@ ...@@ -83,13 +83,13 @@
= sprite_icon('git-merge') = sprite_icon('git-merge')
%span.nav-item-name %span.nav-item-name
Merge Requests 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 %ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(path: 'groups#merge_requests', html_options: { class: "fly-out-top-item" } ) do = nav_link(path: 'groups#merge_requests', html_options: { class: "fly-out-top-item" } ) do
= link_to merge_requests_group_path(@group) do = link_to merge_requests_group_path(@group) do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
#{ _('Merge Requests') } #{ _('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) - if group_sidebar_link?(:group_members)
= nav_link(path: 'group_members#index') do = nav_link(path: 'group_members#index') do
......
...@@ -88,7 +88,7 @@ ...@@ -88,7 +88,7 @@
%span.nav-item-name %span.nav-item-name
Issues Issues
- if @project.issues_enabled? - if @project.issues_enabled?
%span.badge.count.issue_counter %span.badge.badge-pill.count.issue_counter
= number_with_delimiter(@project.open_issues_count) = number_with_delimiter(@project.open_issues_count)
%ul.sidebar-sub-level-items %ul.sidebar-sub-level-items
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
#{ _('Issues') } #{ _('Issues') }
- if @project.issues_enabled? - 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) = number_with_delimiter(@project.open_issues_count)
%li.divider.fly-out-top-item %li.divider.fly-out-top-item
= nav_link(controller: :issues, action: :index) do = nav_link(controller: :issues, action: :index) do
...@@ -140,14 +140,14 @@ ...@@ -140,14 +140,14 @@
= sprite_icon('git-merge') = sprite_icon('git-merge')
%span.nav-item-name %span.nav-item-name
Merge Requests 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) = number_with_delimiter(@project.open_merge_requests_count)
%ul.sidebar-sub-level-items.is-fly-out-only %ul.sidebar-sub-level-items.is-fly-out-only
= nav_link(controller: :merge_requests, html_options: { class: "fly-out-top-item" } ) do = nav_link(controller: :merge_requests, html_options: { class: "fly-out-top-item" } ) do
= link_to project_merge_requests_path(@project) do = link_to project_merge_requests_path(@project) do
%strong.fly-out-top-item-name %strong.fly-out-top-item-name
#{ _('Merge Requests') } #{ _('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) = number_with_delimiter(@project.open_merge_requests_count)
- if project_nav_tab? :pipelines - if project_nav_tab? :pipelines
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
= deleted_message % { project_name: fork_source_name(@project) } = deleted_message % { project_name: fork_source_name(@project) }
.project-badges .project-badges
- @project.badges.each do |badge| - @project.badge.badge-pills.each do |badge|
- badge_link_url = badge.rendered_link_url(@project) - badge_link_url = badge.rendered_link_url(@project)
%a{ href: badge_link_url, target: '_blank', rel: 'noopener noreferrer' } %a{ href: badge_link_url, target: '_blank', rel: 'noopener noreferrer' }
%img{ src: badge.rendered_image_url(@project), alt: badge_link_url } %img{ src: badge.rendered_image_url(@project), alt: badge_link_url }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
= nav_link(path: 'commit#show') do = nav_link(path: 'commit#show') do
= link_to project_commit_path(@project, @commit.id) do = link_to project_commit_path(@project, @commit.id) do
Changes Changes
%span.badge= @diffs.size %span.badge.badge-pill= @diffs.size
- if can?(current_user, :read_pipeline, @project) - if can?(current_user, :read_pipeline, @project)
= nav_link(path: 'commit#pipelines') do = nav_link(path: 'commit#pipelines') do
= link_to pipelines_project_commit_path(@project, @commit.id) do = link_to pipelines_project_commit_path(@project, @commit.id) do
Pipelines Pipelines
%span.badge.js-pipelines-mr-count= @commit.pipelines.size %span.badge.badge-pill.js-pipelines-mr-count= @commit.pipelines.size
...@@ -28,16 +28,16 @@ ...@@ -28,16 +28,16 @@
%li.commits-tab.active %li.commits-tab.active
= link_to url_for(params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do = link_to url_for(params), data: {target: 'div#commits', action: 'new', toggle: 'tab'} do
Commits Commits
%span.badge= @commits.size %span.badge.badge-pill= @commits.size
- if @pipelines.any? - if @pipelines.any?
%li.builds-tab %li.builds-tab
= link_to url_for(params.merge(action: 'pipelines')), data: {target: 'div#pipelines', action: 'pipelines', toggle: 'tab'} do = link_to url_for(params.merge(action: 'pipelines')), data: {target: 'div#pipelines', action: 'pipelines', toggle: 'tab'} do
Pipelines Pipelines
%span.badge= @pipelines.size %span.badge.badge-pill= @pipelines.size
%li.diffs-tab %li.diffs-tab
= link_to url_for(params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do = link_to url_for(params.merge(action: 'diffs')), data: {target: 'div#diffs', action: 'diffs', toggle: 'tab'} do
Changes Changes
%span.badge= @merge_request.diff_size %span.badge.badge-pill= @merge_request.diff_size
.tab-content .tab-content
#commits.commits.tab-pane.active #commits.commits.tab-pane.active
......
...@@ -35,21 +35,21 @@ ...@@ -35,21 +35,21 @@
%li.notes-tab %li.notes-tab
= tab_link_for @merge_request, :show, force_link: @commit.present? do = tab_link_for @merge_request, :show, force_link: @commit.present? do
Discussion Discussion
%span.badge= @merge_request.related_notes.user.count %span.badge.badge-pill= @merge_request.related_notes.user.count
- if @merge_request.source_project - if @merge_request.source_project
%li.commits-tab %li.commits-tab
= tab_link_for @merge_request, :commits do = tab_link_for @merge_request, :commits do
Commits Commits
%span.badge= @commits_count %span.badge.badge-pill= @commits_count
- if @pipelines.any? - if @pipelines.any?
%li.pipelines-tab %li.pipelines-tab
= tab_link_for @merge_request, :pipelines do = tab_link_for @merge_request, :pipelines do
Pipelines Pipelines
%span.badge.js-pipelines-mr-count= @pipelines.size %span.badge.badge-pill.js-pipelines-mr-count= @pipelines.size
%li.diffs-tab %li.diffs-tab
= tab_link_for @merge_request, :diffs do = tab_link_for @merge_request, :diffs do
Changes Changes
%span.badge= @merge_request.diff_size %span.badge.badge-pill= @merge_request.diff_size
- if has_vue_discussions_cookie? - if has_vue_discussions_cookie?
#js-vue-discussion-counter #js-vue-discussion-counter
......
...@@ -2,17 +2,17 @@ ...@@ -2,17 +2,17 @@
%li{ class: active_when(scope.nil?) }> %li{ class: active_when(scope.nil?) }>
= link_to schedule_path_proc.call(nil) do = link_to schedule_path_proc.call(nil) do
= s_("PipelineSchedules|All") = s_("PipelineSchedules|All")
%span.badge.js-totalbuilds-count %span.badge.badge-pill.js-totalbuilds-count
= number_with_delimiter(all_schedules.count(:id)) = number_with_delimiter(all_schedules.count(:id))
%li{ class: active_when(scope == 'active') }> %li{ class: active_when(scope == 'active') }>
= link_to schedule_path_proc.call('active') do = link_to schedule_path_proc.call('active') do
= s_("PipelineSchedules|Active") = s_("PipelineSchedules|Active")
%span.badge %span.badge.badge-pill
= number_with_delimiter(all_schedules.active.count(:id)) = number_with_delimiter(all_schedules.active.count(:id))
%li{ class: active_when(scope == 'inactive') }> %li{ class: active_when(scope == 'inactive') }>
= link_to schedule_path_proc.call('inactive') do = link_to schedule_path_proc.call('inactive') do
= s_("PipelineSchedules|Inactive") = s_("PipelineSchedules|Inactive")
%span.badge %span.badge.badge-pill
= number_with_delimiter(all_schedules.inactive.count(:id)) = number_with_delimiter(all_schedules.inactive.count(:id))
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
%li.js-builds-tab-link %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 = link_to builds_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-builds', action: 'builds', toggle: 'tab' }, class: 'builds-tab' do
= _("Jobs") = _("Jobs")
%span.badge.js-builds-counter= pipeline.total_size %span.badge.badge-pill.js-builds-counter= pipeline.total_size
- if failed_builds.present? - if failed_builds.present?
%li.js-failures-tab-link %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 = link_to failures_project_pipeline_path(@project, @pipeline), data: { target: '#js-tab-failures', action: 'failures', toggle: 'tab' }, class: 'failures-tab' do
= _("Failed Jobs") = _("Failed Jobs")
%span.badge.js-failures-counter= failed_builds.count %span.badge.badge-pill.js-failures-counter= failed_builds.count
.tab-content .tab-content
#js-tab-pipeline.tab-pane #js-tab-pipeline.tab-pane
......
...@@ -2,6 +2,6 @@ ...@@ -2,6 +2,6 @@
.panel-heading .panel-heading
Groups with access to Groups with access to
%strong= @project.name %strong= @project.name
%span.badge= group_links.size %span.badge.badge-pill= group_links.size
%ul.content-list %ul.content-list
= render partial: 'shared/members/group', collection: group_links, as: :group_link = render partial: 'shared/members/group', collection: group_links, as: :group_link
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
%span.flex-project-title %span.flex-project-title
Members of Members of
%strong= project.name %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_tag project_project_members_path(project), method: :get, class: 'form-inline member-search-form flex-project-members-form' do
.form-group .form-group
= search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false } = search_field_tag :search, params[:search], { placeholder: 'Find existing members by name', class: 'form-control', spellcheck: false }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
.panel-heading .panel-heading
%h3.panel-title %h3.panel-title
= s_('PrometheusService|Common metrics') = s_('PrometheusService|Common metrics')
%span.badge.js-monitored-count 0 %span.badge.badge-pill.js-monitored-count 0
.panel-body .panel-body
.loading-metrics.js-loading-metrics .loading-metrics.js-loading-metrics
%p.prepend-top-10.prepend-left-10 %p.prepend-top-10.prepend-left-10
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
%h3.panel-title %h3.panel-title
= icon('caret-right lg fw', class: 'panel-toggle js-panel-toggle', 'aria-label' => 'Toggle panel') = icon('caret-right lg fw', class: 'panel-toggle js-panel-toggle', 'aria-label' => 'Toggle panel')
= s_('PrometheusService|Missing environment variable') = s_('PrometheusService|Missing environment variable')
%span.badge.js-env-var-count 0 %span.badge.badge-pill.js-env-var-count 0
.panel-body.hidden .panel-body.hidden
.flash-container .flash-container
.flash-notice .flash-notice
......
...@@ -7,74 +7,74 @@ ...@@ -7,74 +7,74 @@
%li{ class: active_when(@scope == 'blobs') } %li{ class: active_when(@scope == 'blobs') }
= link_to search_filter_path(scope: 'blobs') do = link_to search_filter_path(scope: 'blobs') do
Code Code
%span.badge %span.badge.badge-pill
= @search_results.blobs_count = @search_results.blobs_count
- if project_search_tabs?(:issues) - if project_search_tabs?(:issues)
%li{ class: active_when(@scope == 'issues') } %li{ class: active_when(@scope == 'issues') }
= link_to search_filter_path(scope: 'issues') do = link_to search_filter_path(scope: 'issues') do
Issues Issues
%span.badge %span.badge.badge-pill
= limited_count(@search_results.limited_issues_count) = limited_count(@search_results.limited_issues_count)
- if project_search_tabs?(:merge_requests) - if project_search_tabs?(:merge_requests)
%li{ class: active_when(@scope == 'merge_requests') } %li{ class: active_when(@scope == 'merge_requests') }
= link_to search_filter_path(scope: 'merge_requests') do = link_to search_filter_path(scope: 'merge_requests') do
Merge requests Merge requests
%span.badge %span.badge.badge-pill
= limited_count(@search_results.limited_merge_requests_count) = limited_count(@search_results.limited_merge_requests_count)
- if project_search_tabs?(:milestones) - if project_search_tabs?(:milestones)
%li{ class: active_when(@scope == 'milestones') } %li{ class: active_when(@scope == 'milestones') }
= link_to search_filter_path(scope: 'milestones') do = link_to search_filter_path(scope: 'milestones') do
Milestones Milestones
%span.badge %span.badge.badge-pill
= limited_count(@search_results.limited_milestones_count) = limited_count(@search_results.limited_milestones_count)
- if project_search_tabs?(:notes) - if project_search_tabs?(:notes)
%li{ class: active_when(@scope == 'notes') } %li{ class: active_when(@scope == 'notes') }
= link_to search_filter_path(scope: 'notes') do = link_to search_filter_path(scope: 'notes') do
Comments Comments
%span.badge %span.badge.badge-pill
= limited_count(@search_results.limited_notes_count) = limited_count(@search_results.limited_notes_count)
- if project_search_tabs?(:wiki) - if project_search_tabs?(:wiki)
%li{ class: active_when(@scope == 'wiki_blobs') } %li{ class: active_when(@scope == 'wiki_blobs') }
= link_to search_filter_path(scope: 'wiki_blobs') do = link_to search_filter_path(scope: 'wiki_blobs') do
Wiki Wiki
%span.badge %span.badge.badge-pill
= @search_results.wiki_blobs_count = @search_results.wiki_blobs_count
- if project_search_tabs?(:commits) - if project_search_tabs?(:commits)
%li{ class: active_when(@scope == 'commits') } %li{ class: active_when(@scope == 'commits') }
= link_to search_filter_path(scope: 'commits') do = link_to search_filter_path(scope: 'commits') do
Commits Commits
%span.badge %span.badge.badge-pill
= @search_results.commits_count = @search_results.commits_count
- elsif @show_snippets - elsif @show_snippets
%li{ class: active_when(@scope == 'snippet_blobs') } %li{ class: active_when(@scope == 'snippet_blobs') }
= link_to search_filter_path(scope: 'snippet_blobs', snippets: true, group_id: nil, project_id: nil) do = link_to search_filter_path(scope: 'snippet_blobs', snippets: true, group_id: nil, project_id: nil) do
Snippet Contents Snippet Contents
%span.badge %span.badge.badge-pill
= @search_results.snippet_blobs_count = @search_results.snippet_blobs_count
%li{ class: active_when(@scope == 'snippet_titles') } %li{ class: active_when(@scope == 'snippet_titles') }
= link_to search_filter_path(scope: 'snippet_titles', snippets: true, group_id: nil, project_id: nil) do = link_to search_filter_path(scope: 'snippet_titles', snippets: true, group_id: nil, project_id: nil) do
Titles and Filenames Titles and Filenames
%span.badge %span.badge.badge-pill
= @search_results.snippet_titles_count = @search_results.snippet_titles_count
- else - else
%li{ class: active_when(@scope == 'projects') } %li{ class: active_when(@scope == 'projects') }
= link_to search_filter_path(scope: 'projects') do = link_to search_filter_path(scope: 'projects') do
Projects Projects
%span.badge %span.badge.badge-pill
= limited_count(@search_results.limited_projects_count) = limited_count(@search_results.limited_projects_count)
%li{ class: active_when(@scope == 'issues') } %li{ class: active_when(@scope == 'issues') }
= link_to search_filter_path(scope: 'issues') do = link_to search_filter_path(scope: 'issues') do
Issues Issues
%span.badge %span.badge.badge-pill
= limited_count(@search_results.limited_issues_count) = limited_count(@search_results.limited_issues_count)
%li{ class: active_when(@scope == 'merge_requests') } %li{ class: active_when(@scope == 'merge_requests') }
= link_to search_filter_path(scope: 'merge_requests') do = link_to search_filter_path(scope: 'merge_requests') do
Merge requests Merge requests
%span.badge %span.badge.badge-pill
= limited_count(@search_results.limited_merge_requests_count) = limited_count(@search_results.limited_merge_requests_count)
%li{ class: active_when(@scope == 'milestones') } %li{ class: active_when(@scope == 'milestones') }
= link_to search_filter_path(scope: 'milestones') do = link_to search_filter_path(scope: 'milestones') do
Milestones Milestones
%span.badge %span.badge.badge-pill
= limited_count(@search_results.limited_milestones_count) = limited_count(@search_results.limited_milestones_count)
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
%li{ class: milestone_class_for_state(params[:state], 'opened', true) }> %li{ class: milestone_class_for_state(params[:state], 'opened', true) }>
= link_to milestones_filter_path(state: 'opened') do = link_to milestones_filter_path(state: 'opened') do
Open Open
%span.badge= counts[:opened] %span.badge.badge-pill= counts[:opened]
%li{ class: milestone_class_for_state(params[:state], 'closed') }> %li{ class: milestone_class_for_state(params[:state], 'closed') }>
= link_to milestones_filter_path(state: 'closed', sort: 'due_date_desc') do = link_to milestones_filter_path(state: 'closed', sort: 'due_date_desc') do
Closed Closed
%span.badge= counts[:closed] %span.badge.badge-pill= counts[:closed]
%li{ class: milestone_class_for_state(params[:state], 'all') }> %li{ class: milestone_class_for_state(params[:state], 'all') }>
= link_to milestones_filter_path(state: 'all', sort: 'due_date_desc') do = link_to milestones_filter_path(state: 'all', sort: 'due_date_desc') do
All All
%span.badge= counts[:all] %span.badge.badge-pill= counts[:all]
...@@ -2,23 +2,23 @@ ...@@ -2,23 +2,23 @@
%li{ class: active_when(scope.nil?) }> %li{ class: active_when(scope.nil?) }>
= link_to build_path_proc.call(nil) do = link_to build_path_proc.call(nil) do
All All
%span.badge.js-totalbuilds-count %span.badge.badge-pill.js-totalbuilds-count
= limited_counter_with_delimiter(all_builds) = limited_counter_with_delimiter(all_builds)
%li{ class: active_when(scope == 'pending') }> %li{ class: active_when(scope == 'pending') }>
= link_to build_path_proc.call('pending') do = link_to build_path_proc.call('pending') do
Pending Pending
%span.badge %span.badge.badge-pill
= limited_counter_with_delimiter(all_builds.pending) = limited_counter_with_delimiter(all_builds.pending)
%li{ class: active_when(scope == 'running') }> %li{ class: active_when(scope == 'running') }>
= link_to build_path_proc.call('running') do = link_to build_path_proc.call('running') do
Running Running
%span.badge %span.badge.badge-pill
= limited_counter_with_delimiter(all_builds.running) = limited_counter_with_delimiter(all_builds.running)
%li{ class: active_when(scope == 'finished') }> %li{ class: active_when(scope == 'finished') }>
= link_to build_path_proc.call('finished') do = link_to build_path_proc.call('finished') do
Finished Finished
%span.badge %span.badge.badge-pill
= limited_counter_with_delimiter(all_builds.finished) = limited_counter_with_delimiter(all_builds.finished)
...@@ -8,6 +8,6 @@ ...@@ -8,6 +8,6 @@
.panel-heading .panel-heading
Users requesting access to Users requesting access to
%strong= membership_source.name %strong= membership_source.name
%span.badge= requesters.size %span.badge.badge-pill= requesters.size
%ul.content-list.members-list %ul.content-list.members-list
= render partial: 'shared/members/member', collection: requesters, as: :member, locals: { force_mobile_view: force_mobile_view } = render partial: 'shared/members/member', collection: requesters, as: :member, locals: { force_mobile_view: force_mobile_view }
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
%span= milestone.issues_visible_to_user(current_user).count %span= milestone.issues_visible_to_user(current_user).count
.title.hide-collapsed .title.hide-collapsed
Issues 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) - 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 = link_to new_project_issue_path(project, issue: { milestone_id: milestone.id }), class: "pull-right", title: "New Issue" do
New issue New issue
...@@ -99,7 +99,7 @@ ...@@ -99,7 +99,7 @@
%span= milestone.merge_requests.count %span= milestone.merge_requests.count
.title.hide-collapsed .title.hide-collapsed
Merge requests Merge requests
%span.badge= milestone.merge_requests.count %span.badge.badge-pill= milestone.merge_requests.count
.value.hide-collapsed.bold .value.hide-collapsed.bold
- if !project || can?(current_user, :read_merge_request, project) - if !project || can?(current_user, :read_merge_request, project)
%span.milestone-stat %span.milestone-stat
......
...@@ -8,24 +8,24 @@ ...@@ -8,24 +8,24 @@
%li.active %li.active
= link_to '#tab-issues', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do = link_to '#tab-issues', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do
Issues Issues
%span.badge= milestone.issues_visible_to_user(current_user).size %span.badge.badge-pill= milestone.issues_visible_to_user(current_user).size
%li %li
= link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do = link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do
Merge Requests Merge Requests
%span.badge= milestone.merge_requests.size %span.badge.badge-pill= milestone.merge_requests.size
- else - else
%li.active %li.active
= link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do = link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-endpoint': milestone_merge_request_tab_path(milestone) do
Merge Requests Merge Requests
%span.badge= milestone.merge_requests.size %span.badge.badge-pill= milestone.merge_requests.size
%li %li
= link_to '#tab-participants', 'data-toggle' => 'tab', 'data-endpoint': milestone_participants_tab_path(milestone) do = link_to '#tab-participants', 'data-toggle' => 'tab', 'data-endpoint': milestone_participants_tab_path(milestone) do
Participants Participants
%span.badge= milestone.participants.count %span.badge.badge-pill= milestone.participants.count
%li %li
= link_to '#tab-labels', 'data-toggle' => 'tab', 'data-endpoint': milestone_labels_tab_path(milestone) do = link_to '#tab-labels', 'data-toggle' => 'tab', 'data-endpoint': milestone_labels_tab_path(milestone) do
Labels Labels
%span.badge= milestone.labels.count %span.badge.badge-pill= milestone.labels.count
- issues = milestone.sorted_issues(current_user) - issues = milestone.sorted_issues(current_user)
- show_project_name = local_assigns.fetch(:show_project_name, false) - show_project_name = local_assigns.fetch(:show_project_name, false)
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
- elsif note_counter == 0 - elsif note_counter == 0
- counter = badge_counter if local_assigns[:badge_counter] - counter = badge_counter if local_assigns[:badge_counter]
- badge_class = "hidden" if @fresh_discussion || counter.nil? - badge_class = "hidden" if @fresh_discussion || counter.nil?
%span.badge{ class: badge_class } %span.badge.badge-pill{ class: badge_class }
= counter = counter
.timeline-content .timeline-content
.note-header .note-header
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
%li %li
%a{ href: "#tab-queries", data: { toggle: "tab" } } %a{ href: "#tab-queries", data: { toggle: "tab" } }
= t('sherlock.queries') = t('sherlock.queries')
%span.badge %span.badge.badge-pill
#{@transaction.queries.length} #{@transaction.queries.length}
%li %li
%a{ href: "#tab-file-samples", data: { toggle: "tab" } } %a{ href: "#tab-file-samples", data: { toggle: "tab" } }
= t('sherlock.file_samples') = t('sherlock.file_samples')
%span.badge %span.badge.badge-pill
#{@transaction.file_samples.length} #{@transaction.file_samples.length}
.row-content-block .row-content-block
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
%li{ class: active_when(params[:scope].nil?) } %li{ class: active_when(params[:scope].nil?) }
= link_to subject_snippets_path(subject) do = link_to subject_snippets_path(subject) do
All All
%span.badge %span.badge.badge-pill
- if include_private - if include_private
= subject.snippets.count = subject.snippets.count
- else - else
...@@ -15,17 +15,17 @@ ...@@ -15,17 +15,17 @@
%li{ class: active_when(params[:scope] == "are_private") } %li{ class: active_when(params[:scope] == "are_private") }
= link_to subject_snippets_path(subject, scope: 'are_private') do = link_to subject_snippets_path(subject, scope: 'are_private') do
Private Private
%span.badge %span.badge.badge-pill
= subject.snippets.are_private.count = subject.snippets.are_private.count
%li{ class: active_when(params[:scope] == "are_internal") } %li{ class: active_when(params[:scope] == "are_internal") }
= link_to subject_snippets_path(subject, scope: 'are_internal') do = link_to subject_snippets_path(subject, scope: 'are_internal') do
Internal Internal
%span.badge %span.badge.badge-pill
= subject.snippets.are_internal.count = subject.snippets.are_internal.count
%li{ class: active_when(params[:scope] == "are_public") } %li{ class: active_when(params[:scope] == "are_public") }
= link_to subject_snippets_path(subject, scope: 'are_public') do = link_to subject_snippets_path(subject, scope: 'are_public') do
Public Public
%span.badge %span.badge.badge-pill
= subject.snippets.are_public.count = subject.snippets.are_public.count
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment