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 @@ ...@@ -794,11 +794,6 @@
} }
.project-buttons { .project-buttons {
.stat-text {
@extend .btn;
@extend .btn-default;
}
.nav > li:not(:last-child) { .nav > li:not(:last-child) {
margin-right: $gl-padding-8; margin-right: $gl-padding-8;
} }
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
- if is_project_overview - if is_project_overview
.project-buttons.gl-mb-3.js-show-on-project-root .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) } #js-tree-list{ data: vue_file_list_data(project, ref) }
- if can_edit_tree? - if can_edit_tree?
......
- anchors = local_assigns.fetch(:anchors, []) - anchors = local_assigns.fetch(:anchors, [])
- project_buttons = local_assigns.fetch(:project_buttons, false)
- return unless anchors.any? - return unless anchors.any?
%ul.nav %ul.nav
- anchors.each do |anchor| - anchors.each do |anchor|
%li.nav-item %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 = 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 @@ ...@@ -20,7 +20,7 @@
.project-clone-holder.d-none.d-md-inline-block.mt-2.mr-2.float-left .project-clone-holder.d-none.d-md-inline-block.mt-2.mr-2.float-left
= render "projects/buttons/clone" = 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) - if can?(current_user, :push_code, @project)
.empty-wrapper.gl-mt-7 .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