Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/milestones')
-rw-r--r--app/views/projects/milestones/index.html.haml46
-rw-r--r--app/views/projects/milestones/show.html.haml6
2 files changed, 31 insertions, 21 deletions
diff --git a/app/views/projects/milestones/index.html.haml b/app/views/projects/milestones/index.html.haml
index 059ef53c42b..154a92e6ec8 100644
--- a/app/views/projects/milestones/index.html.haml
+++ b/app/views/projects/milestones/index.html.haml
@@ -1,24 +1,36 @@
- page_title _('Milestones')
- add_page_specific_style 'page_bundles/milestone'
-.top-area
- = render 'shared/milestones_filter', counts: milestone_counts(@project.milestones)
+- if @milestone_states.any? { |name, count| count > 0 }
+ .top-area
+ = render 'shared/milestones_filter', counts: @milestone_states
- .nav-controls
- = render 'shared/milestones/search_form'
- = render 'shared/milestones_sort_dropdown'
- - if can?(current_user, :admin_milestone, @project)
- = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
- = _('New milestone')
+ .nav-controls
+ = render 'shared/milestones/search_form'
+ = render 'shared/milestones_sort_dropdown'
+ - if can?(current_user, :admin_milestone, @project)
+ = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
+ = _('New milestone')
-- if @milestones.blank?
- = render 'shared/empty_states/milestones'
-- else
- .milestones
- #js-delete-milestone-modal
- #promote-milestone-modal
+ - if @milestones.blank?
+ = render 'shared/empty_states/milestones_tab' do
+ - if can?(current_user, :admin_milestone, @project)
+ .text-center
+ = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
+ = _('New milestone')
+
+ - else
+ .milestones
+ #js-delete-milestone-modal
+ #promote-milestone-modal
- %ul.content-list
- = render @milestones
+ %ul.content-list
+ = render @milestones
- = paginate @milestones, theme: 'gitlab'
+ = paginate @milestones, theme: 'gitlab'
+- else
+ = render 'shared/empty_states/milestones' do
+ - if can?(current_user, :admin_milestone, @project)
+ .text-center
+ = link_to new_project_milestone_path(@project), class: 'gl-button btn btn-confirm', data: { qa_selector: "new_project_milestone_link" }, title: _('New milestone') do
+ = _('New milestone')
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 225f8c7dd66..13aa8f56d20 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -12,11 +12,9 @@
= render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project
- if can?(current_user, :read_issue, @project) && @milestone.total_issues_count == 0
- = render 'shared/global_alert',
- variant: :info,
- dismissible: false,
+ = render Pajamas::AlertComponent.new(dismissible: false,
alert_data: { testid: 'no-issues-alert' },
- alert_class: 'gl-mt-3 gl-mb-5' do
+ alert_class: 'gl-mt-3 gl-mb-5') do
.gl-alert-body
= _('Assign some issues to this milestone.')
- else