Commit 21785171 authored by Clement Ho's avatar Clement Ho

[skip ci] Convert .label. to .badge.

parent b1c4fdec
......@@ -19,7 +19,7 @@
%td
= render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log }
%td.d-none.d-sm-block
%span.label.label-gray.deploy-project-label
%span.badge.label-gray.deploy-project-label
= hook_log.trigger.singularize.titleize
%td
= truncate(hook_log.url, length: 50)
......
......@@ -29,7 +29,7 @@
%div
- SystemHook.triggers.each_value do |event|
- if hook.public_send(event)
%span.label.label-gray= event.to_s.titleize
%span.label.label-gray SSL Verification: #{hook.enable_ssl_verification ? 'enabled' : 'disabled'}
%span.badge.label-gray= event.to_s.titleize
%span.badge.label-gray SSL Verification: #{hook.enable_ssl_verification ? 'enabled' : 'disabled'}
= render 'shared/plugins/index'
......@@ -15,7 +15,7 @@
%span.badge.badge-pill
= storage_counter(project.statistics.storage_size)
- if project.archived
%span.label.label-warning archived
%span.badge.label-warning archived
.title
= link_to [:admin, project.namespace.becomes(Namespace), project] do
.dash-project-avatar
......
%tr{ id: dom_id(runner) }
%td
- if runner.shared?
%span.label.label-success shared
%span.badge.label-success shared
- else
%span.label.label-info specific
%span.badge.label-info specific
- if runner.locked?
%span.label.label-warning locked
%span.badge.label-warning locked
- unless runner.active?
%span.label.label-danger paused
%span.badge.label-danger paused
%td
= link_to admin_runner_path(runner) do
......@@ -27,7 +27,7 @@
#{runner.builds.count(:all)}
%td
- runner.tag_list.sort.each do |tag|
%span.label.label-primary
%span.badge.label-primary
= tag
%td
- if runner.contacted_at
......
......@@ -14,16 +14,16 @@
%span Each Runner can be in one of the following states:
%ul
%li
%span.label.label-success shared
%span.badge.label-success shared
\- Runner runs jobs from all unassigned projects
%li
%span.label.label-info specific
%span.badge.label-info specific
\- Runner runs jobs from assigned projects
%li
%span.label.label-warning locked
%span.badge.label-warning locked
\- Runner cannot be assigned to other projects
%li
%span.label.label-danger paused
%span.badge.label-danger paused
\- Runner will not receive any new jobs
.bs-callout.clearfix
......
......@@ -5,11 +5,11 @@
.user-name.row-title.str-truncated-100
= link_to user.name, [:admin, user]
- if user.blocked?
%span.label.label-danger blocked
%span.badge.label-danger blocked
- if user.admin?
%span.label.label-success Admin
%span.badge.label-success Admin
- if user.external?
%span.label.label-default External
%span.badge.label-default External
- if user == current_user
%span It's you!
.row-second-line.str-truncated-100
......
......@@ -17,7 +17,7 @@
%strong= link_to project.full_name, project
.float-right
- if project.archived
%span.label.label-warning archived
%span.badge.label-warning archived
%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"
......
......@@ -33,19 +33,19 @@
%li
= render partial: 'shared/email_with_badge', locals: { email: @primary_email, verified: current_user.confirmed? }
%span.float-right
%span.label.label-success Primary email
%span.badge.label-success Primary email
- if @primary_email === current_user.public_email
%span.label.label-info Public email
%span.badge.label-info Public email
- if @primary_email === current_user.notification_email
%span.label.label-info Notification email
%span.badge.label-info Notification email
- @emails.each do |email|
%li
= render partial: 'shared/email_with_badge', locals: { email: email.email, verified: email.confirmed? }
%span.float-right
- if email.email === current_user.public_email
%span.label.label-info Public email
%span.badge.label-info Public email
- if email.email === current_user.notification_email
%span.label.label-info Notification email
%span.badge.label-info Notification email
- unless email.confirmed?
- confirm_title = "#{email.confirmation_sent_at ? 'Resend' : 'Send'} confirmation email"
= link_to confirm_title, resend_confirmation_instructions_profile_email_path(email), method: :put, class: 'btn btn-sm btn-warning prepend-left-10'
......
......@@ -10,4 +10,4 @@
= number_to_human_size(blob.raw_size)
- if blob.stored_externally? && blob.external_storage == :lfs
%span.label.label-lfs.append-right-5 LFS
%span.badge.label-lfs.append-right-5 LFS
......@@ -13,13 +13,13 @@
= branch.name
 
- if branch.name == @repository.root_ref
%span.label.label-primary default
%span.badge.label-primary default
- elsif merged
%span.label.label-info.has-tooltip{ title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref } }
%span.badge.label-info.has-tooltip{ title: s_('Branches|Merged into %{default_branch}') % { default_branch: @repository.root_ref } }
= s_('Branches|merged')
- if protected_branch?(@project, branch)
%span.label.label-success
%span.badge.label-success
= s_('Branches|protected')
.block-truncated
......
......@@ -41,14 +41,14 @@
.label-container
- if job.tags.any?
- job.tags.each do |tag|
%span.label.label-primary
%span.badge.label-primary
= tag
- if job.try(:trigger_request)
%span.label.label-info triggered
%span.badge.label-info triggered
- if job.try(:allow_failure)
%span.label.label-danger allowed to fail
%span.badge.label-danger allowed to fail
- if job.action?
%span.label.label-info manual
%span.badge.label-info manual
- if pipeline_link
%td
......
......@@ -58,7 +58,7 @@
.js-commit-pipeline-status{ data: { endpoint: pipelines_project_commit_path(project, commit.id, ref: ref) } }
.commit-sha-group
.label.label-monospace
.badge.label-monospace
= commit.short_id
= clipboard_button(text: commit.id, title: _("Copy commit SHA to clipboard"), class: "btn btn-secondary", container: "body")
= link_to_browse_code(project, commit)
......@@ -37,4 +37,4 @@
#{diff_file.a_mode}#{diff_file.b_mode}
- if diff_file.stored_externally? && diff_file.external_storage == :lfs
%span.label.label-lfs.append-right-5 LFS
%span.badge.label-lfs.append-right-5 LFS
......@@ -35,10 +35,10 @@
.label-container
- if generic_commit_status.tags.any?
- generic_commit_status.tags.each do |tag|
%span.label.label-primary
%span.badge.label-primary
= tag
- if retried
%span.label.label-warning retried
%span.badge.label-warning retried
- if pipeline_link
%td
......
......@@ -19,7 +19,7 @@
%td
= render partial: 'shared/hook_logs/status_label', locals: { hook_log: hook_log }
%td.d-none.d-sm-block
%span.label.label-gray.deploy-project-label
%span.badge.label-gray.deploy-project-label
= hook_log.trigger.singularize.titleize
%td
= truncate(hook_log.url, length: 50)
......
......@@ -15,7 +15,7 @@
- elsif @build.tags.any?
This job is stuck, because you don't have any active runners online with any of these tags assigned to them:
- @build.tags.each do |tag|
%span.label.label-primary
%span.badge.label-primary
= tag
- else
This job is stuck, because you don't have any active runners that can run this job.
......
......@@ -10,13 +10,13 @@
- if @merge_request.for_fork? && !@merge_request.source_project
fork project was removed
- elsif !@merge_request.source_branch_exists?
%span.label.label-inverse= @merge_request.source_branch
%span.badge.label-inverse= @merge_request.source_branch
does not exist in
%span.label.label-info= @merge_request.source_project_path
%span.badge.label-info= @merge_request.source_project_path
- elsif !@merge_request.target_branch_exists?
%span.label.label-inverse= @merge_request.target_branch
%span.badge.label-inverse= @merge_request.target_branch
does not exist in
%span.label.label-info= @merge_request.target_project_path
%span.badge.label-info= @merge_request.target_project_path
- else
of internal error
......
......@@ -17,9 +17,9 @@
= icon('external-link')
- if domain.subject
%p
%span.label.label-gray Certificate: #{domain.subject}
%span.badge.label-gray Certificate: #{domain.subject}
- if domain.expired?
%span.label.label-danger Expired
%span.badge.label-danger Expired
%div
= link_to 'Details', project_pages_domain_path(@project, domain), class: "btn btn-sm btn-grouped"
= link_to 'Remove', project_pages_domain_path(@project, domain), data: { confirm: 'Are you sure?'}, method: :delete, class: "btn btn-remove btn-sm btn-grouped"
......
......@@ -3,7 +3,7 @@
= link_to matching_branch.name, project_ref_path(@project, matching_branch.name), class: 'ref-name'
- if @project.root_ref?(matching_branch.name)
%span.label.label-info.prepend-left-5 default
%span.badge.label-info.prepend-left-5 default
%td
- commit = @project.commit(matching_branch.name)
= link_to(commit.short_id, project_commit_path(@project, commit.id), class: 'commit-sha')
......
......@@ -5,7 +5,7 @@
%span.ref-name= protected_branch.name
- if @project.root_ref?(protected_branch.name)
%span.label.label-info.prepend-left-5 default
%span.badge.label-info.prepend-left-5 default
%td
- if protected_branch.wildcard?
- matching_branches = protected_branch.matching(repository.branches)
......
......@@ -3,7 +3,7 @@
= link_to matching_tag.name, project_ref_path(@project, matching_tag.name), class: 'ref-name'
- if @project.root_ref?(matching_tag.name)
%span.label.label-info.prepend-left-5 default
%span.badge.label-info.prepend-left-5 default
%td
- commit = @project.commit(matching_tag.name)
= link_to(commit.short_id, project_commit_path(@project, commit.id), class: 'commit-sha')
......
......@@ -3,7 +3,7 @@
%span.ref-name= protected_tag.name
- if @project.root_ref?(protected_tag.name)
%span.label.label-info.prepend-left-5 default
%span.badge.label-info.prepend-left-5 default
%td
- if protected_tag.wildcard?
- matching_tags = protected_tag.matching(repository.tags)
......
......@@ -9,10 +9,10 @@
%div
%ul
%li
%span.label.label-success active
%span.badge.label-success active
\- Runner is active and can process any new jobs
%li
%span.label.label-danger paused
%span.badge.label-danger paused
\- Runner is paused and will not receive any new jobs
%hr
......
......@@ -39,5 +39,5 @@
- if runner.tag_list.present?
%p
- runner.tag_list.sort.each do |tag|
%span.label.label-primary
%span.badge.label-primary
= tag
......@@ -32,7 +32,7 @@
%td Tags
%td
- @runner.tag_list.sort.each do |tag|
%span.label.label-primary
%span.badge.label-primary
= tag
%tr
%td Name
......
......@@ -5,7 +5,7 @@
%div
- ProjectHook.triggers.each_value do |event|
- if hook.public_send(event)
%span.label.label-gray.deploy-project-label= event.to_s.titleize
%span.badge.label-gray.deploy-project-label= event.to_s.titleize
.col-md-4.col-lg-5.text-right-lg.prepend-top-5
%span.append-right-10.inline
SSL Verification: #{hook.enable_ssl_verification ? 'enabled' : 'disabled'}
......
......@@ -6,7 +6,7 @@
= link_to tag.name, project_tag_path(@project, tag.name), class: 'item-title ref-name prepend-left-4'
- if protected_tag?(@project, tag)
%span.label.label-success.prepend-left-4
%span.badge.label-success.prepend-left-4
= s_('TagsPage|protected')
- if tag.message.present?
......
......@@ -11,7 +11,7 @@
= icon('tag')
= @tag.name
- if protected_tag?(@project, @tag)
%span.label.label-success
%span.badge.label-success
= s_('TagsPage|protected')
- if @commit
= render 'projects/branches/commit', commit: @commit, project: @project
......
......@@ -6,7 +6,7 @@
= link_to project_blob_path(@project, tree_join(@id || @commit.id, blob_item.name)), class: 'str-truncated', title: file_name do
%span= file_name
- if is_lfs_blob
%span.label.label-lfs.prepend-left-5 LFS
%span.badge.label-lfs.prepend-left-5 LFS
%td.d-none.d-sm-table-cell.tree-commit
%td.tree-time-ago.cgray.text-right
= render 'projects/tree/spinner'
%p.append-bottom-default
Triggers with the
%span.label.label-primary legacy
%span.badge.label-primary legacy
label do not have an associated user and only have access to the current project.
%br
= succeed '.' do
......
......@@ -8,9 +8,9 @@
.label-container
- if trigger.legacy?
%span.label.label-primary.has-tooltip{ title: "Trigger makes use of deprecated functionality" } legacy
%span.badge.label-primary.has-tooltip{ title: "Trigger makes use of deprecated functionality" } legacy
- if !trigger.can_access_project?
%span.label.label-danger.has-tooltip{ title: "Trigger user has insufficient permissions to project" } invalid
%span.badge.label-danger.has-tooltip{ title: "Trigger user has insufficient permissions to project" } invalid
%td
- if trigger.description? && trigger.description.length > 15
......
......@@ -4,7 +4,7 @@
= link_to [issue.project.namespace.becomes(Namespace), issue.project, issue] do
%span.term.str-truncated= issue.title
- if issue.closed?
%span.label.label-danger.prepend-left-5 Closed
%span.badge.label-danger.prepend-left-5 Closed
.float-right ##{issue.iid}
- if issue.description.present?
.description.term
......
......@@ -3,9 +3,9 @@
= link_to [merge_request.target_project.namespace.becomes(Namespace), merge_request.target_project, merge_request] do
%span.term.str-truncated= merge_request.title
- if merge_request.merged?
%span.label.label-primary.prepend-left-5 Merged
%span.badge.label-primary.prepend-left-5 Merged
- elsif merge_request.closed?
%span.label.label-danger.prepend-left-5 Closed
%span.badge.label-danger.prepend-left-5 Closed
.float-right= merge_request.to_reference
- if merge_request.description.present?
.description.term
......
......@@ -3,7 +3,7 @@
= link_to reliable_snippet_path(snippet_title) do
= truncate(snippet_title.title, length: 60)
- if snippet_title.private?
%span.label.label-gray
%span.badge.label-gray
%i.fa.fa-lock
private
%span.cgray.monospace.tiny.float-right.term
......
......@@ -9,7 +9,7 @@
None
%a{ href: "#",
"v-for" => "label in issue.labels" }
%span.label.color-label.has-tooltip{ ":style" => "{ backgroundColor: label.color, color: label.textColor }" }
%span.badge.color-label.has-tooltip{ ":style" => "{ backgroundColor: label.color, color: label.textColor }" }
{{ label.title }}
- if can_admin_issue?
.selectbox
......
......@@ -7,7 +7,7 @@
%p
%strong Trigger:
%td.d-none.d-sm-block
%span.label.label-gray.deploy-project-label
%span.badge.label-gray.deploy-project-label
= hook_log.trigger.singularize.titleize
%p
%strong Elapsed time:
......
......@@ -14,10 +14,10 @@
%span.cgray= user.to_reference
- if user == current_user
%span.label.label-success.prepend-left-5 It's you
%span.badge.label-success.prepend-left-5 It's you
- if user.blocked?
%label.label.label-danger
%label.badge.label-danger
%strong Blocked
- if source.instance_of?(Group) && source != @group
......
......@@ -26,7 +26,7 @@
.projects
- milestone.milestones.each do |milestone|
= link_to milestone_path(milestone) do
%span.label.label-gray
%span.badge.label-gray
= dashboard ? milestone.project.full_name : milestone.project.name
- if @group
.col-sm-6.milestone-actions
......
......@@ -46,7 +46,7 @@
.controls
.prepend-top-0
- if project.archived
%span.prepend-left-10.label.label-warning archived
%span.prepend-left-10.badge.label-warning archived
- if can?(current_user, :read_cross_project) && project.pipeline_status.has_status?
%span.prepend-left-10
= render_project_pipeline_status(project.pipeline_status)
......
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