Commit ace816354fb098118539640b5d9af392da349396
1 parent
2b7fd29b
Exists in
master
and in
4 other branches
Add toggle to show closed issues on Milestones#show
Progress on #1167
Showing
4 changed files
with
19 additions
and
5 deletions
Show diff stats
@@ -0,0 +1,7 @@ | @@ -0,0 +1,7 @@ | ||
1 | +$ -> | ||
2 | + $('.milestone-issue-filter td[data-closed]').addClass('hide') | ||
3 | + | ||
4 | + $('.milestone-issue-filter ul.nav li a').click -> | ||
5 | + $('.milestone-issue-filter li').toggleClass('active') | ||
6 | + $('.milestone-issue-filter td[data-closed]').toggleClass('hide') | ||
7 | + false |
app/assets/stylesheets/gitlab_bootstrap/tables.scss
@@ -11,6 +11,11 @@ table { | @@ -11,6 +11,11 @@ table { | ||
11 | border-bottom: 1px solid #bbb; | 11 | border-bottom: 1px solid #bbb; |
12 | text-shadow: 0 1px 1px #fff; | 12 | text-shadow: 0 1px 1px #fff; |
13 | @include bg-dark-gray-gradient; | 13 | @include bg-dark-gray-gradient; |
14 | + | ||
15 | + ul.nav { | ||
16 | + text-shadow: none; | ||
17 | + margin: 0; | ||
18 | + } | ||
14 | } | 19 | } |
15 | 20 | ||
16 | th, td { | 21 | th, td { |
app/controllers/milestones_controller.rb
@@ -30,7 +30,7 @@ class MilestonesController < ProjectResourceController | @@ -30,7 +30,7 @@ class MilestonesController < ProjectResourceController | ||
30 | end | 30 | end |
31 | 31 | ||
32 | def show | 32 | def show |
33 | - @issues = @milestone.issues.opened.page(params[:page]).per(40) | 33 | + @issues = @milestone.issues |
34 | @users = @milestone.participants | 34 | @users = @milestone.participants |
35 | 35 | ||
36 | respond_to do |format| | 36 | respond_to do |format| |
app/views/milestones/show.html.haml
@@ -45,18 +45,20 @@ | @@ -45,18 +45,20 @@ | ||
45 | 45 | ||
46 | .row | 46 | .row |
47 | .span6 | 47 | .span6 |
48 | - %table | 48 | + %table.milestone-issue-filter |
49 | %thead | 49 | %thead |
50 | - %th Open Issues | 50 | + %th |
51 | + %ul.nav.nav-pills | ||
52 | + %li.active.open= link_to('Open Issues', '#') | ||
53 | + %li.all=link_to('All Issues', '#') | ||
51 | - @issues.each do |issue| | 54 | - @issues.each do |issue| |
52 | %tr | 55 | %tr |
53 | - %td | 56 | + %td{data: {closed: issue.closed}} |
54 | = link_to [@project, issue] do | 57 | = link_to [@project, issue] do |
55 | %span.badge.badge-info ##{issue.id} | 58 | %span.badge.badge-info ##{issue.id} |
56 | – | 59 | – |
57 | = link_to_gfm truncate(issue.title, length: 60), [@project, issue] | 60 | = link_to_gfm truncate(issue.title, length: 60), [@project, issue] |
58 | %br | 61 | %br |
59 | - = paginate @issues, theme: "gitlab" | ||
60 | 62 | ||
61 | .span6 | 63 | .span6 |
62 | %table | 64 | %table |