summaryrefslogtreecommitdiff
path: root/app/views/shared/milestones/_top.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/shared/milestones/_top.html.haml')
-rw-r--r--app/views/shared/milestones/_top.html.haml56
1 files changed, 5 insertions, 51 deletions
diff --git a/app/views/shared/milestones/_top.html.haml b/app/views/shared/milestones/_top.html.haml
index fd3317341f6..12575b30a6c 100644
--- a/app/views/shared/milestones/_top.html.haml
+++ b/app/views/shared/milestones/_top.html.haml
@@ -4,54 +4,15 @@
- group = local_assigns[:group]
- is_dynamic_milestone = milestone.legacy_group_milestone? || milestone.dashboard_milestone?
-.detail-page-header.milestone-page-header
- .status-box{ class: "status-box-#{milestone.closed? ? 'closed' : 'open'}" }
- - if milestone.closed?
- Closed
- - elsif milestone.expired?
- Expired
- - else
- Open
-
- .header-text-content
- %span.identifier
- Milestone #{milestone.title}
- - if milestone.due_date || milestone.start_date
- %span.creator
-  ·
- = milestone_date_range(milestone)
-
- .milestone-buttons
- - if group
- - if can?(current_user, :admin_milestone, group)
- - if milestone.group_milestone?
- = link_to edit_group_milestone_path(group, milestone), class: "btn btn btn-grouped" do
- Edit
- - if milestone.active?
- = link_to 'Close Milestone', group_milestone_route(milestone, {state_event: :close }), method: :put, class: "btn btn-grouped btn-close"
- - else
- = link_to 'Reopen Milestone', group_milestone_route(milestone, {state_event: :activate }), method: :put, class: "btn btn-grouped btn-reopen"
-
- - unless is_dynamic_milestone
- = render 'shared/milestones/delete_button'
-
- %a.btn.btn-default.btn-grouped.float-right.d-block.d-sm-none.js-sidebar-toggle{ href: "#" }
- = icon('angle-double-left')
-
+= render 'shared/milestones/header', milestone: milestone
= render 'shared/milestones/deprecation_message' if is_dynamic_milestone
-
-.detail-page-description.milestone-detail
- %h2.title
- = markdown_field(milestone, :title)
- - if milestone.group_milestone? && milestone.description.present?
- %div
- .description.md
- = markdown_field(milestone, :description)
+= render 'shared/milestones/description', milestone: milestone
- 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}
+ %span
+ = _('All issues for this milestone are closed.')
+ = group ? _('You may close the milestone now.') : _('Navigate to the project to close the milestone.')
= render_if_exists 'shared/milestones/burndown', milestone: milestone, project: @project
@@ -77,10 +38,3 @@
Open
%td
= milestone.expires_at
-- elsif milestone.group_milestone?
- %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