Commit 35e12dce authored by Paul Slaughter's avatar Paul Slaughter

Merge branch 'psi-do-not-extend-1' into 'master'

Add some classes conditionally rather than using extend

See merge request gitlab-org/gitlab!43095
parents 598b531c c0eeefc7
......@@ -794,11 +794,6 @@
}
.project-buttons {
.stat-text {
@extend .btn;
@extend .btn-default;
}
.nav > li:not(:last-child) {
margin-right: $gl-padding-8;
}
......
......@@ -14,7 +14,7 @@
- if is_project_overview
.project-buttons.gl-mb-3.js-show-on-project-root
= render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout)
= render 'stat_anchor_list', anchors: @project.statistics_buttons(show_auto_devops_callout: show_auto_devops_callout), project_buttons: true
#js-tree-list{ data: vue_file_list_data(project, ref) }
- if can_edit_tree?
......
- anchors = local_assigns.fetch(:anchors, [])
- project_buttons = local_assigns.fetch(:project_buttons, false)
- return unless anchors.any?
%ul.nav
- anchors.each do |anchor|
%li.nav-item
= link_to_if anchor.link, anchor.label, anchor.link, class: anchor.is_link ? 'nav-link stat-link d-flex align-items-center' : "nav-link btn btn-#{anchor.class_modifier || 'missing'} d-flex align-items-center" do
.stat-text.d-flex.align-items-center= anchor.label
.stat-text.d-flex.align-items-center{ class: ('btn btn-default disabled' if project_buttons) }= anchor.label
......@@ -20,7 +20,7 @@
.project-clone-holder.d-none.d-md-inline-block.mt-2.mr-2.float-left
= render "projects/buttons/clone"
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons
= render 'stat_anchor_list', anchors: @project.empty_repo_statistics_buttons, project_buttons: true
- if can?(current_user, :push_code, @project)
.empty-wrapper.gl-mt-7
......
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