diff options
Diffstat (limited to 'app/views/projects/milestones/show.html.haml')
-rw-r--r-- | app/views/projects/milestones/show.html.haml | 110 |
1 files changed, 54 insertions, 56 deletions
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 9130dea2715..49d3039d0c9 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -1,70 +1,68 @@ -- @no_container = true - add_to_breadcrumbs _('Milestones'), project_milestones_path(@project) - breadcrumb_title @milestone.title - page_title @milestone.title, _('Milestones') - page_description @milestone.description -%div{ class: container_class } - .detail-page-header.milestone-page-header - .status-box{ class: status_box_class(@milestone) } - - if @milestone.closed? - = _('Closed') - - elsif @milestone.expired? - = _('Past due') - - elsif @milestone.upcoming? - = _('Upcoming') - - else - = _('Open') - .header-text-content - %span.identifier - %strong - = _('Milestone') - - if @milestone.due_date || @milestone.start_date - = milestone_date_range(@milestone) - .milestone-buttons - - if can?(current_user, :admin_milestone, @project) - = link_to edit_project_milestone_path(@project, @milestone), class: 'btn btn-grouped btn-nr' do - = _('Edit') +.detail-page-header.milestone-page-header + .status-box{ class: status_box_class(@milestone) } + - if @milestone.closed? + = _('Closed') + - elsif @milestone.expired? + = _('Past due') + - elsif @milestone.upcoming? + = _('Upcoming') + - else + = _('Open') + .header-text-content + %span.identifier + %strong + = _('Milestone') + - if @milestone.due_date || @milestone.start_date + = milestone_date_range(@milestone) + .milestone-buttons + - if can?(current_user, :admin_milestone, @project) + = link_to edit_project_milestone_path(@project, @milestone), class: 'btn btn-grouped btn-nr' do + = _('Edit') - - if @project.group - %button.js-promote-project-milestone-button.btn.btn-grouped{ data: { toggle: 'modal', - target: '#promote-milestone-modal', - milestone_title: @milestone.title, - group_name: @project.group.name, - url: promote_project_milestone_path(@milestone.project, @milestone), - container: 'body' }, - disabled: true, - type: 'button' } - = _('Promote') - #promote-milestone-modal + - if @project.group + %button.js-promote-project-milestone-button.btn.btn-grouped{ data: { toggle: 'modal', + target: '#promote-milestone-modal', + milestone_title: @milestone.title, + group_name: @project.group.name, + url: promote_project_milestone_path(@milestone.project, @milestone), + container: 'body' }, + disabled: true, + type: 'button' } + = _('Promote') + #promote-milestone-modal - - if @milestone.active? - = link_to _('Close milestone'), project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: 'btn btn-close btn-nr btn-grouped' - - else - = link_to _('Reopen milestone'), project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: 'btn btn-reopen btn-nr btn-grouped' + - if @milestone.active? + = link_to _('Close milestone'), project_milestone_path(@project, @milestone, milestone: {state_event: :close }), method: :put, class: 'btn btn-close btn-nr btn-grouped' + - else + = link_to _('Reopen milestone'), project_milestone_path(@project, @milestone, milestone: {state_event: :activate }), method: :put, class: 'btn btn-reopen btn-nr btn-grouped' - = render 'shared/milestones/delete_button' + = 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') + %a.btn.btn-default.btn-grouped.float-right.d-block.d-sm-none.js-sidebar-toggle{ href: '#' } + = icon('angle-double-left') - .detail-page-description.milestone-detail - %h2.title.qa-milestone-title - = markdown_field(@milestone, :title) +.detail-page-description.milestone-detail + %h2.title.qa-milestone-title + = markdown_field(@milestone, :title) - %div - - if @milestone.description.present? - .description.md - = markdown_field(@milestone, :description) + %div + - if @milestone.description.present? + .description.md + = markdown_field(@milestone, :description) - = render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project += render_if_exists 'shared/milestones/burndown', milestone: @milestone, project: @project - - if can?(current_user, :read_issue, @project) && @milestone.total_issues_count(current_user).zero? - .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.') +- if can?(current_user, :read_issue, @project) && @milestone.total_issues_count(current_user).zero? + .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.') - = render 'shared/milestones/tabs', milestone: @milestone - = render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153 += render 'shared/milestones/tabs', milestone: @milestone += render 'shared/milestones/sidebar', milestone: @milestone, project: @project, affix_offset: 153 |