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

84 lines
2.9 KiB
Text
Raw Normal View History

2018-10-15 14:42:47 +05:30
- page_title milestone.title
2018-05-09 12:01:36 +05:30
- @breadcrumb_link = dashboard_milestone_path(milestone.safe_title, title: milestone.title)
2016-06-02 11:05:42 +05:30
- group = local_assigns[:group]
2018-10-15 14:42:47 +05:30
- is_dynamic_milestone = milestone.legacy_group_milestone? || milestone.dashboard_milestone?
2016-06-02 11:05:42 +05:30
.detail-page-header
2018-11-08 19:23:39 +05:30
%a.btn.btn-default.btn-grouped.float-right.d-block.d-sm-none.js-sidebar-toggle{ href: "#" }
2017-08-17 22:00:37 +05:30
= icon('angle-double-left')
2016-06-02 11:05:42 +05:30
.status-box{ class: "status-box-#{milestone.closed? ? 'closed' : 'open'}" }
- if milestone.closed?
Closed
- elsif milestone.expired?
Expired
- else
Open
%span.identifier
Milestone #{milestone.title}
2017-08-17 22:00:37 +05:30
- if milestone.due_date || milestone.start_date
2016-06-02 11:05:42 +05:30
%span.creator
2018-05-09 12:01:36 +05:30
 ·
2017-08-17 22:00:37 +05:30
= milestone_date_range(milestone)
2016-06-02 11:05:42 +05:30
- if group
2018-11-08 19:23:39 +05:30
.float-right
2018-11-20 20:47:30 +05:30
- if can?(current_user, :admin_milestone, group)
2018-03-17 18:26:18 +05:30
- if milestone.group_milestone?
2017-09-10 17:25:29 +05:30
= link_to edit_group_milestone_path(group, milestone), class: "btn btn btn-grouped" do
Edit
2016-06-02 11:05:42 +05:30
- if milestone.active?
2017-09-10 17:25:29 +05:30
= link_to 'Close Milestone', group_milestone_route(milestone, {state_event: :close }), method: :put, class: "btn btn-grouped btn-close"
2016-06-02 11:05:42 +05:30
- else
2017-09-10 17:25:29 +05:30
= link_to 'Reopen Milestone', group_milestone_route(milestone, {state_event: :activate }), method: :put, class: "btn btn-grouped btn-reopen"
2016-06-02 11:05:42 +05:30
2018-11-20 20:47:30 +05:30
- unless is_dynamic_milestone
= render 'shared/milestones/delete_button'
2018-10-15 14:42:47 +05:30
= render 'shared/milestones/deprecation_message' if is_dynamic_milestone
2016-06-02 11:05:42 +05:30
.detail-page-description.milestone-detail
%h2.title
2016-11-03 12:29:30 +05:30
= markdown_field(milestone, :title)
2018-10-15 14:42:47 +05:30
- if milestone.group_milestone? && milestone.description.present?
2017-09-10 17:25:29 +05:30
%div
2019-07-07 11:18:12 +05:30
.description.md
= markdown_field(milestone, :description)
2016-06-02 11:05:42 +05:30
- if milestone.complete?(current_user) && milestone.active?
.alert.alert-success.prepend-top-default
- close_msg = group ? 'You may close the milestone now.' : 'Navigate to the project to close the milestone.'
%span All issues for this milestone are closed. #{close_msg}
2018-11-08 19:23:39 +05:30
= render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project
2018-10-15 14:42:47 +05:30
- if is_dynamic_milestone
2017-09-10 17:25:29 +05:30
.table-holder
%table.table
%thead
%tr
%th Project
%th Open issues
%th State
%th Due date
%tr
%td
2019-02-15 15:39:39 +05:30
- project_name = group ? milestone.project.name : milestone.project.full_name
= link_to project_name, milestone_path(milestone.milestone)
2017-09-10 17:25:29 +05:30
%td
2019-02-15 15:39:39 +05:30
= milestone.milestone.issues_visible_to_user(current_user).opened.count
2017-09-10 17:25:29 +05:30
%td
2019-02-15 15:39:39 +05:30
- if milestone.closed?
2017-09-10 17:25:29 +05:30
Closed
- else
Open
%td
2019-02-15 15:39:39 +05:30
= milestone.expires_at
2018-10-15 14:42:47 +05:30
- elsif milestone.group_milestone?
2017-09-10 17:25:29 +05:30
%br
View
= link_to 'Issues', issues_group_path(@group, milestone_title: milestone.title)
or
= link_to 'Merge Requests', merge_requests_group_path(@group, milestone_title: milestone.title)
in this milestone