Commit f1ec62f465711c136d9ffc84b328f7c55e68fa9c
1 parent
47937802
Exists in
spb-stable
and in
2 other branches
Add reopened tab to milestone issues. Add ids and data to milestone issues to enable dragging
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
6 changed files
with
35 additions
and
20 deletions
Show diff stats
app/assets/stylesheets/main/mixins.scss
| @@ -124,7 +124,7 @@ | @@ -124,7 +124,7 @@ | ||
| 124 | margin-bottom: 10px; | 124 | margin-bottom: 10px; |
| 125 | } | 125 | } |
| 126 | 126 | ||
| 127 | -@mixin str-truncated($max_width: "82%") { | 127 | +@mixin str-truncated($max_width: 82%) { |
| 128 | display: inline-block; | 128 | display: inline-block; |
| 129 | overflow: hidden; | 129 | overflow: hidden; |
| 130 | text-overflow: ellipsis; | 130 | text-overflow: ellipsis; |
app/controllers/projects/issues_controller.rb
| @@ -87,6 +87,11 @@ class Projects::IssuesController < Projects::ApplicationController | @@ -87,6 +87,11 @@ class Projects::IssuesController < Projects::ApplicationController | ||
| 87 | render :edit | 87 | render :edit |
| 88 | end | 88 | end |
| 89 | end | 89 | end |
| 90 | + format.json do | ||
| 91 | + render json: { | ||
| 92 | + saved: @issue.valid?, | ||
| 93 | + } | ||
| 94 | + end | ||
| 90 | end | 95 | end |
| 91 | end | 96 | end |
| 92 | 97 |
| @@ -0,0 +1,9 @@ | @@ -0,0 +1,9 @@ | ||
| 1 | +%li{ 'data-iid' => issue.iid, 'data-url' => project_issue_path(@project, issue) } | ||
| 2 | + %span.str-truncated | ||
| 3 | + = link_to [@project, issue] do | ||
| 4 | + %span.cgray ##{issue.iid} | ||
| 5 | + = link_to_gfm issue.title, [@project, issue] | ||
| 6 | + - if issue.assignee | ||
| 7 | + .pull-right | ||
| 8 | + = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16" | ||
| 9 | + |
app/views/projects/milestones/_issues.html.haml
| 1 | .panel.panel-default | 1 | .panel.panel-default |
| 2 | .panel-heading= title | 2 | .panel-heading= title |
| 3 | - %ul.well-list | 3 | + %ul{ class: "well-list issues-sortable-list", id: "issues-list-#{id}", "data-state" => id } |
| 4 | - issues.each do |issue| | 4 | - issues.each do |issue| |
| 5 | - %li | ||
| 6 | - = link_to [@project, issue] do | ||
| 7 | - %span.label{class: issue.closed? ? 'label-danger' : 'label-info'} ##{issue.iid} | ||
| 8 | - = link_to_gfm truncate(issue.title, length: 40), [@project, issue] | ||
| 9 | - - if issue.assignee | ||
| 10 | - .pull-right | ||
| 11 | - = image_tag avatar_icon(issue.assignee.email, 16), class: "avatar s16" | 5 | + = render 'issue', issue: issue |
| 6 | + %li.light Drag and drop available |
app/views/projects/milestones/show.html.haml
| @@ -35,6 +35,12 @@ | @@ -35,6 +35,12 @@ | ||
| 35 | %h4.title | 35 | %h4.title |
| 36 | = gfm escape_once(@milestone.title) | 36 | = gfm escape_once(@milestone.title) |
| 37 | 37 | ||
| 38 | + - if @milestone.description.present? | ||
| 39 | + .description | ||
| 40 | + .wiki | ||
| 41 | + = preserve do | ||
| 42 | + = markdown @milestone.description | ||
| 43 | + | ||
| 38 | .context | 44 | .context |
| 39 | %p | 45 | %p |
| 40 | Progress: | 46 | Progress: |
| @@ -45,11 +51,6 @@ | @@ -45,11 +51,6 @@ | ||
| 45 | .progress.progress-info | 51 | .progress.progress-info |
| 46 | .progress-bar{style: "width: #{@milestone.percent_complete}%;"} | 52 | .progress-bar{style: "width: #{@milestone.percent_complete}%;"} |
| 47 | 53 | ||
| 48 | - - if @milestone.description.present? | ||
| 49 | - .description | ||
| 50 | - .wiki | ||
| 51 | - = preserve do | ||
| 52 | - = markdown @milestone.description | ||
| 53 | 54 | ||
| 54 | %ul.nav.nav-tabs | 55 | %ul.nav.nav-tabs |
| 55 | %li.active | 56 | %li.active |
| @@ -74,12 +75,14 @@ | @@ -74,12 +75,14 @@ | ||
| 74 | .tab-content | 75 | .tab-content |
| 75 | .tab-pane.active#tab-issues | 76 | .tab-pane.active#tab-issues |
| 76 | .row | 77 | .row |
| 77 | - .col-md-4 | ||
| 78 | - = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned) | ||
| 79 | - .col-md-4 | ||
| 80 | - = render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned) | ||
| 81 | - .col-md-4 | ||
| 82 | - = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed) | 78 | + .col-md-3 |
| 79 | + = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.only_opened.unassigned, id: 'unassigned') | ||
| 80 | + .col-md-3 | ||
| 81 | + = render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.only_opened.assigned, id: 'ongoing') | ||
| 82 | + .col-md-3 | ||
| 83 | + = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed') | ||
| 84 | + .col-md-3 | ||
| 85 | + = render('issues', title: 'Reopened Issues (reopened)', issues: @issues.only_reopened, id: 'reopened') | ||
| 83 | 86 | ||
| 84 | .tab-pane#tab-merge-requests | 87 | .tab-pane#tab-merge-requests |
| 85 | .row | 88 | .row |