Commit aac00cca authored by Yogi's avatar Yogi Committed by Kushal Pandya

Add empty state placeholder for milestones

parent f99c0556
...@@ -17,12 +17,11 @@ ...@@ -17,12 +17,11 @@
.nav-controls .nav-controls
= render 'shared/milestones/search_form' = render 'shared/milestones/search_form'
.milestones - if @milestones.blank?
%ul.content-list = render 'shared/empty_states/milestones'
- if @milestones.blank? - else
%li .milestones
.nothing-here-block No milestones to show %ul.content-list
- else
- @milestones.each do |milestone| - @milestones.each do |milestone|
= render 'milestone', milestone: milestone = render 'milestone', milestone: milestone
= paginate @milestones, theme: 'gitlab' = paginate @milestones, theme: 'gitlab'
...@@ -8,17 +8,16 @@ ...@@ -8,17 +8,16 @@
= render 'shared/milestones/search_form' = render 'shared/milestones/search_form'
= render 'shared/milestones_sort_dropdown' = render 'shared/milestones_sort_dropdown'
- if can?(current_user, :admin_milestone, @group) - if can?(current_user, :admin_milestone, @group)
= link_to "New milestone", new_group_milestone_path(@group), class: "btn gl-button btn-success", data: { qa_selector: "new_group_milestone_link" } = link_to _('New milestone'), new_group_milestone_path(@group), class: "btn gl-button btn-success", data: { qa_selector: "new_group_milestone_link" }
.milestones - if @milestones.blank?
%ul.content-list = render 'shared/empty_states/milestones'
- if @milestones.blank? - else
%li .milestones
.nothing-here-block No milestones to show %ul.content-list
- else
- @milestones.each do |milestone| - @milestones.each do |milestone|
- if milestone.project_milestone? - if milestone.project_milestone?
= render 'projects/milestones/milestone', milestone: milestone = render 'projects/milestones/milestone', milestone: milestone
- else - else
= render 'milestone', milestone: milestone = render 'milestone', milestone: milestone
= paginate @milestones, theme: "gitlab" = paginate @milestones, theme: "gitlab"
...@@ -11,15 +11,14 @@ ...@@ -11,15 +11,14 @@
= link_to new_project_milestone_path(@project), class: 'gl-button btn btn-success', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-success', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
= _('New milestone') = _('New milestone')
.milestones - if @milestones.blank?
#js-delete-milestone-modal = render 'shared/empty_states/milestones'
#promote-milestone-modal - else
.milestones
#js-delete-milestone-modal
#promote-milestone-modal
%ul.content-list %ul.content-list
= render @milestones = render @milestones
- if @milestones.blank? = paginate @milestones, theme: 'gitlab'
%li
.nothing-here-block= _('No milestones to show')
= paginate @milestones, theme: 'gitlab'
.row.empty-state
.col-12
.svg-content
= image_tag 'illustrations/milestone_burndown_chart.svg'
.col-12
.text-content
%h4.text-center= _('No milestones to show')
---
title: Add empty state placeholder for milestones
merge_request: 51887
author: Yogi (@yo)
type: other
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