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 @@ |
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
app/controllers/milestones_controller.rb
app/views/milestones/show.html.haml
... | ... | @@ -45,18 +45,20 @@ |
45 | 45 | |
46 | 46 | .row |
47 | 47 | .span6 |
48 | - %table | |
48 | + %table.milestone-issue-filter | |
49 | 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 | 54 | - @issues.each do |issue| |
52 | 55 | %tr |
53 | - %td | |
56 | + %td{data: {closed: issue.closed}} | |
54 | 57 | = link_to [@project, issue] do |
55 | 58 | %span.badge.badge-info ##{issue.id} |
56 | 59 | – |
57 | 60 | = link_to_gfm truncate(issue.title, length: 60), [@project, issue] |
58 | 61 | %br |
59 | - = paginate @issues, theme: "gitlab" | |
60 | 62 | |
61 | 63 | .span6 |
62 | 64 | %table | ... | ... |