debian-mirror-gitlab/app/views/shared/milestones/_milestone.html.haml

66 lines
3.4 KiB
Text
Raw Normal View History

2016-06-02 11:05:42 +05:30
- dashboard = local_assigns[:dashboard]
2019-02-15 15:39:39 +05:30
- custom_dom_id = dom_id(milestone.try(:milestone) ? milestone.milestone : milestone)
2020-05-24 23:13:21 +05:30
- milestone_type = milestone.group_milestone? ? s_('Milestones|Group Milestone') : s_('Milestones|Project Milestone')
2016-06-02 11:05:42 +05:30
2017-08-17 22:00:37 +05:30
%li{ class: "milestone milestone-#{milestone.closed? ? 'closed' : 'open'}", id: custom_dom_id }
2016-06-02 11:05:42 +05:30
.row
.col-sm-6
2020-07-28 23:09:34 +05:30
.gl-mb-2
%strong{ data: { qa_selector: "milestone_link", qa_milestone_title: milestone.title } }
= link_to truncate(milestone.title, length: 100), milestone_path(milestone)
2020-11-24 15:15:51 +05:30
- if @group || dashboard
2018-11-08 19:23:39 +05:30
= " - #{milestone_type}"
2017-09-10 17:25:29 +05:30
2020-06-23 00:09:42 +05:30
- if milestone.due_date || milestone.start_date
2020-07-28 23:09:34 +05:30
.text-tertiary.gl-mb-2
2020-06-23 00:09:42 +05:30
= milestone_date_range(milestone)
- recent_releases, total_count, more_count = recent_releases_with_counts(milestone)
2020-10-24 23:57:45 +05:30
- unless total_count == 0
2020-07-28 23:09:34 +05:30
.text-tertiary.gl-mb-2.milestone-release-links
2020-06-23 00:09:42 +05:30
= sprite_icon("rocket", size: 12)
= n_('Release', 'Releases', total_count)
- recent_releases.each do |release|
= link_to release.name, project_releases_path(release.project, anchor: release.tag)
- unless release == recent_releases.last
2019-12-26 22:10:19 +05:30
•
2020-06-23 00:09:42 +05:30
- if total_count > recent_releases.count
•
2021-04-17 20:07:23 +05:30
- more_text = n_('%{count} more release', '%{count} more releases', more_count) % { count: more_count }
- if milestone.project_milestone?
= link_to more_text, project_releases_path(milestone.project)
- else
= more_text
2020-06-23 00:09:42 +05:30
%div
= render('shared/milestone_expired', milestone: milestone)
- if milestone.group_milestone?
2021-03-11 19:13:27 +05:30
.gl-badge.badge-info.badge-pill
2020-06-23 00:09:42 +05:30
= milestone.group.full_name
- if milestone.project_milestone?
2021-03-11 19:13:27 +05:30
.gl-badge.badge-muted.badge-pill
2020-06-23 00:09:42 +05:30
= milestone.project.full_name
2018-11-08 19:23:39 +05:30
.col-sm-4.milestone-progress
= milestone_progress_bar(milestone)
2020-05-24 23:13:21 +05:30
= link_to pluralize(milestone.total_issues_count, _('Issue')), issues_path
2020-01-01 13:55:28 +05:30
- if milestone.merge_requests_enabled?
·
2020-05-24 23:13:21 +05:30
= link_to pluralize(milestone.merge_requests_visible_to_user(current_user).size, _('Merge Request')), merge_requests_path
2020-04-08 14:13:33 +05:30
.float-lg-right.light #{milestone.percent_complete}% complete
2018-11-08 19:23:39 +05:30
.col-sm-2
.milestone-actions.d-flex.justify-content-sm-start.justify-content-md-end
2020-06-23 00:09:42 +05:30
- if @project # if in milestones list on project level
- if can_admin_group_milestones?
2021-01-29 00:20:46 +05:30
%button.js-promote-project-milestone-button.btn.gl-button.btn-default-tertiary.btn-sm.btn-grouped.has-tooltip{ title: s_('Milestones|Promote to Group Milestone'),
2020-06-23 00:09:42 +05:30
disabled: true,
type: 'button',
data: { url: promote_project_milestone_path(milestone.project, milestone),
milestone_title: milestone.title,
2021-03-08 18:12:59 +05:30
group_name: @project.group.name } }
2020-06-23 00:09:42 +05:30
= sprite_icon('level-up', size: 14)
- if can?(current_user, :admin_milestone, milestone)
- if milestone.closed?
2021-02-22 17:27:13 +05:30
= link_to s_('Milestones|Reopen Milestone'), milestone_path(milestone, milestone: { state_event: :activate }), method: :put, class: "btn gl-button btn-sm btn-grouped"
2020-06-23 00:09:42 +05:30
- else
2021-01-29 00:20:46 +05:30
= link_to s_('Milestones|Close Milestone'), milestone_path(milestone, milestone: { state_event: :close }), method: :put, class: "btn gl-button btn-warning-secondary btn-sm btn-grouped btn-close"