Commit d0f026c4 authored by Martin Wortschack's avatar Martin Wortschack

Merge branch...

Merge branch '344389-make-badges-in-app-views-projects-commit-branches-html-haml-pajamas-compliant' into 'master'

Make badges in project's commits Pajamas-compliant

See merge request gitlab-org/gitlab!77851
parents cb9d0562 6a13a3ae
...@@ -65,33 +65,6 @@ ...@@ -65,33 +65,6 @@
display: inline; display: inline;
} }
.branch-link {
margin-bottom: 2px;
}
.limit-box {
cursor: pointer;
display: inline-flex;
align-items: center;
background-color: $red-100;
border-radius: $border-radius-default;
text-align: center;
&:hover {
background-color: $red-200;
}
.limit-icon {
margin: 0 4px;
}
.limit-message {
line-height: 16px;
margin-right: 8px;
font-size: 12px;
}
}
svg { svg {
vertical-align: text-top; vertical-align: text-top;
} }
......
...@@ -73,9 +73,7 @@ module CommitsHelper ...@@ -73,9 +73,7 @@ module CommitsHelper
# Returns a link formatted as a commit branch link # Returns a link formatted as a commit branch link
def commit_branch_link(url, text) def commit_branch_link(url, text)
link_to(url, class: 'badge badge-gray ref-name branch-link') do gl_badge_tag(text, { variant: :info, icon: 'branch' }, { href: url, class: 'gl-font-monospace gl-mb-1' })
sprite_icon('branch', size: 12, css_class: 'fork-svg') + "#{text}"
end
end end
# Returns the sorted alphabetically links to branches, separated by a comma # Returns the sorted alphabetically links to branches, separated by a comma
...@@ -87,9 +85,7 @@ module CommitsHelper ...@@ -87,9 +85,7 @@ module CommitsHelper
# Returns a link formatted as a commit tag link # Returns a link formatted as a commit tag link
def commit_tag_link(url, text) def commit_tag_link(url, text)
link_to(url, class: 'badge badge-gray ref-name') do gl_badge_tag(text, { variant: :info, icon: 'tag' }, { href: url, class: 'gl-font-monospace' })
sprite_icon('tag', size: 12, css_class: 'gl-mr-2 vertical-align-middle') + "#{text}"
end
end end
# Returns the sorted links to tags, separated by a comma # Returns the sorted links to tags, separated by a comma
......
.has-tooltip{ class: "limit-box limit-box-#{objects} gl-ml-2", data: { title: _('Project has too many %{label_for_message} to search') % { label_for_message: label_for_message } } } - icon = objects == :branch ? 'fork' : 'tag'
.limit-icon - text = _('%{label_for_message} unavailable') % { label_for_message: label_for_message.capitalize }
- if objects == :branch - tooltip_title = _('Project has too many %{label_for_message} to search') % { label_for_message: label_for_message }
= sprite_icon('fork', size: 12)
- else = gl_badge_tag(text, { variant: :danger, icon: icon }, { class: 'has-tooltip gl-ml-2', data: { title: tooltip_title } })
= sprite_icon('tag')
.limit-message
%span= _('%{label_for_message} unavailable') % { label_for_message: label_for_message.capitalize }
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
- if @branches.any? || @tags.any? || @tags_limit_exceeded - if @branches.any? || @tags.any? || @tags_limit_exceeded
%span %span
= link_to "#", class: "js-details-expand badge badge-gray ref-name" do = gl_badge_tag(_("Expand"),
= sprite_icon('ellipsis_h', size: 12, css_class: 'vertical-align-middle') { variant: :info, icon: 'ellipsis_h', icon_only: true },
{ href: '#', class: 'js-details-expand gl-font-monospace' })
%span.js-details-content.hide %span.js-details-content.hide
= commit_branches_links(@project, @branches) = commit_branches_links(@project, @branches)
- if @tags_limit_exceeded - if @tags_limit_exceeded
......
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