diff options
author | Mehdi Lahmam <mehdi@lahmam.com> | 2017-08-11 12:09:17 +0300 |
---|---|---|
committer | Mehdi Lahmam <mehdi@lahmam.com> | 2017-08-24 11:11:07 +0300 |
commit | 55f4ddad2b765f3b7466af5b43ef319a330c9fcd (patch) | |
tree | bc8887523b41d3014efcaf0736ba33729cb6e1bb /app/finders/admin | |
parent | d184f27ed387c1a90a9f06f68eab801ec3bd89e3 (diff) |
Add an option to list only archived projects
Closes #35994
Diffstat (limited to 'app/finders/admin')
-rw-r--r-- | app/finders/admin/projects_finder.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/finders/admin/projects_finder.rb b/app/finders/admin/projects_finder.rb index eac35ae0281..d6bcd939522 100644 --- a/app/finders/admin/projects_finder.rb +++ b/app/finders/admin/projects_finder.rb @@ -43,7 +43,13 @@ class Admin::ProjectsFinder end def by_archived(items) - items.non_archived unless params[:archived].present? + if params[:archived] == 'only' + items.archived + elsif params[:archived].blank? + items.non_archived + else + items + end end def by_personal(items) |