debian-mirror-gitlab/app/views/projects/milestones/show.html.haml

81 lines
3.3 KiB
Text
Raw Normal View History

2016-11-03 12:29:30 +05:30
- @no_container = true
2018-03-17 18:26:18 +05:30
- add_to_breadcrumbs "Milestones", project_milestones_path(@project)
- breadcrumb_title @milestone.title
- page_title @milestone.title, "Milestones"
- page_description @milestone.description
2016-11-03 12:29:30 +05:30
%div{ class: container_class }
2017-08-17 22:00:37 +05:30
.detail-page-header.milestone-page-header
2016-11-03 12:29:30 +05:30
.status-box{ class: status_box_class(@milestone) }
- if @milestone.closed?
Closed
- elsif @milestone.expired?
Past due
2017-08-17 22:00:37 +05:30
- elsif @milestone.upcoming?
Upcoming
2014-09-02 18:07:02 +05:30
- else
2016-11-03 12:29:30 +05:30
Open
2017-08-17 22:00:37 +05:30
.header-text-content
%span.identifier
%strong
Milestone
- if @milestone.due_date || @milestone.start_date
= milestone_date_range(@milestone)
.milestone-buttons
2016-11-03 12:29:30 +05:30
- if can?(current_user, :admin_milestone, @project)
2018-03-17 18:26:18 +05:30
= link_to edit_project_milestone_path(@project, @milestone), class: "btn btn-grouped btn-nr" do
Edit
- if @project.group
2018-03-27 19:54:05 +05:30
%button.js-promote-project-milestone-button.btn.btn-grouped{ data: { toggle: 'modal',
target: '#promote-milestone-modal',
milestone_title: @milestone.title,
2018-05-01 15:08:00 +05:30
group_name: @project.group.name,
2018-03-27 19:54:05 +05:30
url: promote_project_milestone_path(@milestone.project, @milestone),
container: 'body' },
disabled: true,
type: 'button' }
= _('Promote')
#promote-milestone-modal
2018-03-17 18:26:18 +05:30
2016-11-03 12:29:30 +05:30
- if @milestone.active?
2017-09-10 17:25:29 +05:30
= link_to 'Close milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped"
2016-11-03 12:29:30 +05:30
- else
2017-09-10 17:25:29 +05:30
= link_to 'Reopen milestone', project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped"
2015-12-23 02:04:40 +05:30
2018-03-17 18:26:18 +05:30
%button.js-delete-milestone-button.btn.btn-grouped.btn-danger{ data: { toggle: 'modal',
target: '#delete-milestone-modal',
milestone_id: @milestone.id,
milestone_title: markdown_field(@milestone, :title),
milestone_url: project_milestone_path(@project, @milestone),
milestone_issue_count: @milestone.issues.count,
milestone_merge_request_count: @milestone.merge_requests.count },
disabled: true }
= _('Delete')
= icon('spin spinner', class: 'js-loading-icon hidden' )
2015-12-23 02:04:40 +05:30
2018-03-17 18:26:18 +05:30
#delete-milestone-modal
2016-06-02 11:05:42 +05:30
2017-08-17 22:00:37 +05:30
%a.btn.btn-default.btn-grouped.pull-right.visible-xs-block.js-sidebar-toggle{ href: "#" }
= icon('angle-double-left')
.detail-page-description.milestone-detail
2016-11-03 12:29:30 +05:30
%h2.title
= markdown_field(@milestone, :title)
2018-03-17 18:26:18 +05:30
2016-11-03 12:29:30 +05:30
%div
- if @milestone.description.present?
.description
.wiki
2017-08-17 22:00:37 +05:30
= markdown_field(@milestone, :description)
2014-09-02 18:07:02 +05:30
2017-08-17 22:00:37 +05:30
- if can?(current_user, :read_issue, @project) && @milestone.total_items_count(current_user).zero?
2016-11-03 12:29:30 +05:30
.alert.alert-success.prepend-top-default
%span Assign some issues to this milestone.
- elsif @milestone.complete?(current_user) && @milestone.active?
.alert.alert-success.prepend-top-default
%span All issues for this milestone are closed. You may close this milestone now.
2016-04-02 18:10:28 +05:30
2016-11-03 12:29:30 +05:30
= render 'shared/milestones/tabs', milestone: @milestone
2017-08-17 22:00:37 +05:30
= render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153