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

144 lines
5.9 KiB
Text
Raw Normal View History

- page_title @milestone.title, "Milestones"
- page_description @milestone.description
2015-09-25 12:07:36 +05:30
= render "header_title"
2015-12-23 02:04:40 +05:30
.detail-page-header
.status-box{ class: status_box_class(@milestone) }
2015-04-26 12:48:37 +05:30
- if @milestone.closed?
Closed
- elsif @milestone.expired?
Expired
- else
Open
2015-12-23 02:04:40 +05:30
%span.identifier
Milestone ##{@milestone.iid}
- if @milestone.expires_at
%span.creator
·
= @milestone.expires_at
2014-09-02 18:07:02 +05:30
.pull-right
- if can?(current_user, :admin_milestone, @project)
- if @milestone.active?
= link_to 'Close Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :close }), method: :put, class: "btn btn-close btn-nr btn-grouped"
2014-09-02 18:07:02 +05:30
- else
= link_to 'Reopen Milestone', namespace_project_milestone_path(@project.namespace, @project, @milestone, milestone: {state_event: :activate }), method: :put, class: "btn btn-reopen btn-nr btn-grouped"
2015-12-23 02:04:40 +05:30
2016-04-02 18:10:28 +05:30
= link_to namespace_project_milestone_path(@project.namespace, @project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-nr" do
= icon('trash-o')
2015-12-23 02:04:40 +05:30
Delete
= link_to edit_namespace_project_milestone_path(@project.namespace, @project, @milestone), class: "btn btn-grouped btn-nr" do
= icon('pencil-square-o')
2015-12-23 02:04:40 +05:30
Edit
2016-04-02 18:10:28 +05:30
.detail-page-description.milestone-detail.second-block
2015-12-23 02:04:40 +05:30
%h2.title
= markdown escape_once(@milestone.title), pipeline: :single_line
%div
- if @milestone.description.present?
.description
.wiki
= preserve do
= markdown @milestone.description
2014-09-02 18:07:02 +05:30
- if @milestone.issues.any? && @milestone.can_be_closed?
2015-12-23 02:04:40 +05:30
.alert.alert-success.prepend-top-default
2014-09-02 18:07:02 +05:30
%span All issues for this milestone are closed. You may close milestone now.
2015-12-23 02:04:40 +05:30
.context.prepend-top-default
2016-04-02 18:10:28 +05:30
.milestone-summary
%h4 Progress
%strong= @milestone.issues.count
issues:
%span.milestone-stat
%strong= @milestone.open_items_count
open and
%strong= @milestone.closed_items_count
closed
%span.milestone-stat
%strong== #{@milestone.percent_complete}%
complete
%span.milestone-stat
%span.remaining-days= milestone_remaining_days(@milestone)
%span.pull-right.tab-issues-buttons
- if can?(current_user, :create_issue, @project)
= link_to new_namespace_project_issue_path(@project.namespace, @project, issue: { milestone_id: @milestone.id }), class: "btn btn-grouped", title: "New Issue" do
%i.fa.fa-plus
New Issue
- if can?(current_user, :read_issue, @project)
= link_to 'Browse Issues', namespace_project_issues_path(@milestone.project.namespace, @milestone.project, milestone_title: @milestone.title), class: "btn btn-grouped"
%span.pull-right.tab-merge-requests-buttons.hidden
- if can?(current_user, :read_merge_request, @project)
= link_to 'Browse Merge Requests', namespace_project_merge_requests_path(@milestone.project.namespace, @milestone.project, milestone_title: @milestone.title), class: "btn btn-grouped"
2015-04-26 12:48:37 +05:30
= milestone_progress_bar(@milestone)
2014-09-02 18:07:02 +05:30
%ul.nav-links.no-top.no-bottom
2014-09-02 18:07:02 +05:30
%li.active
2016-04-02 18:10:28 +05:30
= link_to '#tab-issues', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do
2014-09-02 18:07:02 +05:30
Issues
%span.badge= @issues.count
%li
2016-04-02 18:10:28 +05:30
= link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-show' => '.tab-merge-requests-buttons' do
2014-09-02 18:07:02 +05:30
Merge Requests
%span.badge= @merge_requests.count
%li
= link_to '#tab-participants', 'data-toggle' => 'tab' do
Participants
%span.badge= @users.count
2016-04-02 18:10:28 +05:30
%li
= link_to '#tab-labels', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do
Labels
%span.badge= @labels.count
2014-09-02 18:07:02 +05:30
2016-04-02 18:10:28 +05:30
.tab-content.milestone-content
2014-09-02 18:07:02 +05:30
.tab-pane.active#tab-issues
2015-12-23 02:04:40 +05:30
.row.prepend-top-default
2014-09-02 18:07:02 +05:30
.col-md-4
= render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned')
.col-md-4
= render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned, id: 'ongoing')
.col-md-4
= render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed')
.tab-pane#tab-merge-requests
2015-12-23 02:04:40 +05:30
.row.prepend-top-default
2014-09-02 18:07:02 +05:30
.col-md-3
= render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned')
.col-md-3
= render('merge_requests', title: 'Waiting for merge (open and assigned)', merge_requests: @merge_requests.opened.assigned, id: 'ongoing')
.col-md-3
2015-09-11 14:41:01 +05:30
= render('merge_requests', title: 'Rejected (closed)', merge_requests: @merge_requests.closed, id: 'closed')
2014-09-02 18:07:02 +05:30
.col-md-3
.panel.panel-primary
.panel-heading Merged
%ul.well-list
- @merge_requests.merged.each do |merge_request|
= render 'merge_request', merge_request: merge_request
.tab-pane#tab-participants
%ul.bordered-list
- @users.each do |user|
%li
= link_to user, title: user.name, class: "darken" do
2015-10-24 18:46:33 +05:30
= image_tag avatar_icon(user, 32), class: "avatar s32"
2014-09-02 18:07:02 +05:30
%strong= truncate(user.name, lenght: 40)
%br
%small.cgray= user.username
2016-04-02 18:10:28 +05:30
.tab-pane#tab-labels
%ul.bordered-list.manage-labels-list
- @labels.each do |label|
%li
= render_colored_label(label)
- args = [@milestone.project.namespace, @milestone.project, milestone_title: @milestone.title, label_name: label.title]
- options = args.extract_options!
%span.issues-count
= link_to namespace_project_issues_path(*args, options.merge(state: 'opened')) do
= pluralize label.open_issues_count, 'open issue'
%span.issues-count
= link_to namespace_project_issues_path(*args, options.merge(state: 'closed')) do
= pluralize label.closed_issues_count, 'closed issue'