diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2016-02-19 22:44:13 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2016-02-19 22:44:13 +0300 |
commit | de84fa365eff85a3d21a664f24e9832a664c10c9 (patch) | |
tree | 4bfc6b5c369626a94bc306888a773751d97e5b6c /app/views/projects/milestones | |
parent | bcc23320618c861491add3439abe783ef9b19b37 (diff) | |
parent | 62dd6745bd5d3fd1a144b13701bf80f4cb13f887 (diff) |
Merge branch 'issue_3276' into 'master'
Labels should be visible in milestone view
Closes #3276
See merge request !2599
Diffstat (limited to 'app/views/projects/milestones')
-rw-r--r-- | app/views/projects/milestones/_issue.html.haml | 13 | ||||
-rw-r--r-- | app/views/projects/milestones/_issues.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/milestones/_merge_requests.html.haml | 1 | ||||
-rw-r--r-- | app/views/projects/milestones/show.html.haml | 87 |
4 files changed, 61 insertions, 45 deletions
diff --git a/app/views/projects/milestones/_issue.html.haml b/app/views/projects/milestones/_issue.html.haml index 133d802aaca..ca51b8c745d 100644 --- a/app/views/projects/milestones/_issue.html.haml +++ b/app/views/projects/milestones/_issue.html.haml @@ -1,9 +1,10 @@ %li{ id: dom_id(issue, 'sortable'), class: 'issue-row', 'data-iid' => issue.iid, 'data-url' => issue_path(issue) } - .pull-right.assignee-icon - - if issue.assignee - = image_tag avatar_icon(issue.assignee, 16), class: "avatar s16", alt: '' %span - = link_to [@project.namespace.becomes(Namespace), @project, issue] do - %span.cgray ##{issue.iid} = link_to_gfm issue.title, [@project.namespace.becomes(Namespace), @project, issue], title: issue.title - + .issue-detail + = link_to [@project.namespace.becomes(Namespace), @project, issue] do + %span.issue-number ##{issue.iid} + - issue.labels.each do |label| + = render_colored_label(label) + - if issue.assignee + = image_tag avatar_icon(issue.assignee, 16), class: "avatar s24", alt: '' diff --git a/app/views/projects/milestones/_issues.html.haml b/app/views/projects/milestones/_issues.html.haml index 6e4df75a3df..6f8a341e478 100644 --- a/app/views/projects/milestones/_issues.html.haml +++ b/app/views/projects/milestones/_issues.html.haml @@ -1,6 +1,7 @@ .panel.panel-default - .panel-heading= title + .panel-heading + = title + .pull-right= issues.size %ul{ class: "well-list issues-sortable-list", id: "issues-list-#{id}", "data-state" => id } - issues.sort_by(&:position).each do |issue| = render 'issue', issue: issue - %li.light.ui-sort-disabled Drag and drop available diff --git a/app/views/projects/milestones/_merge_requests.html.haml b/app/views/projects/milestones/_merge_requests.html.haml index 00889a5eb24..9a5a02af215 100644 --- a/app/views/projects/milestones/_merge_requests.html.haml +++ b/app/views/projects/milestones/_merge_requests.html.haml @@ -3,4 +3,3 @@ %ul{ class: "well-list merge_requests-sortable-list", id: "merge_requests-list-#{id}", "data-state" => id } - merge_requests.sort_by(&:position).each do |merge_request| = render 'merge_request', merge_request: merge_request - %li.light.ui-sort-disabled Drag and drop available diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml index 528a4f9552f..631bc8c3e9d 100644 --- a/app/views/projects/milestones/show.html.haml +++ b/app/views/projects/milestones/show.html.haml @@ -24,7 +24,7 @@ - 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" - = link_to namespace_project_milestone_path(@project.namespace, @project, @milestone), data: { confirm: 'Are you sure?' }, method: :delete, class: "btn btn-grouped btn-nr btn-remove" do + = 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') Delete @@ -32,7 +32,7 @@ = icon('pencil-square-o') Edit -.detail-page-description.content-block +.detail-page-description.milestone-detail.second-block %h2.title = markdown escape_once(@milestone.title), pipeline: :single_line %div @@ -47,44 +47,55 @@ %span All issues for this milestone are closed. You may close milestone now. .context.prepend-top-default - %p.lead - Progress: - #{@milestone.closed_items_count} closed - – - #{@milestone.open_items_count} open - - %span.light #{@milestone.percent_complete}% complete - %span.pull-right= @milestone.expires_at + .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.time-elapsed + %strong== #{@milestone.percent_time_used}% + time elapsed + %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" + = milestone_progress_bar(@milestone) %ul.nav-links.no-top.no-bottom %li.active - = link_to '#tab-issues', 'data-toggle' => 'tab' do + = link_to '#tab-issues', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do Issues %span.badge= @issues.count %li - = link_to '#tab-merge-requests', 'data-toggle' => 'tab' do + = link_to '#tab-merge-requests', 'data-toggle' => 'tab', 'data-show' => '.tab-merge-requests-buttons' do Merge Requests %span.badge= @merge_requests.count %li = link_to '#tab-participants', 'data-toggle' => 'tab' do Participants %span.badge= @users.count + %li + = link_to '#tab-labels', 'data-toggle' => 'tab', 'data-show' => '.tab-issues-buttons' do + Labels + %span.badge= @labels.count -.tab-content +.tab-content.milestone-content .tab-pane.active#tab-issues - .content-block.oneline-block - .controls - - 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" - - .oneline - All issues in this milestone - .row.prepend-top-default .col-md-4 = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned') @@ -94,14 +105,6 @@ = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed') .tab-pane#tab-merge-requests - .content-block.oneline-block - .controls - - 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" - - .oneline - All merge requests in this milestone - .row.prepend-top-default .col-md-3 = render('merge_requests', title: 'Work in progress (open and unassigned)', merge_requests: @merge_requests.opened.unassigned, id: 'unassigned') @@ -117,9 +120,6 @@ = render 'merge_request', merge_request: merge_request .tab-pane#tab-participants - .content-block.oneline-block - All participants to this milestone - %ul.bordered-list - @users.each do |user| %li @@ -128,3 +128,18 @@ %strong= truncate(user.name, lenght: 40) %br %small.cgray= user.username + + .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' |