Skip to content

Commit

Permalink
add a filter for hiding closed issues from roadmap view
Browse files Browse the repository at this point in the history
  • Loading branch information
coren committed Sep 27, 2015
1 parent c4f613c commit d0a82e8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/versions/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<%=h tracker.name %></label><br />
<% end %>
<br />
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label>
<label for="completed"><%= check_box_tag "completed", 1, params[:completed] %> <%= l(:label_show_completed_versions) %></label><br />
<label for="only_open"><%= check_box_tag "only_open", 1, params[:only_open] %> <%= l(:label_hide_closed_issues) %></label>
<% if @project.descendants.active.any? %>
<%= hidden_field_tag 'with_subprojects', 0 %>
<br /><label><%= check_box_tag 'with_subprojects', 1, @with_subprojects %> <%=l(:label_subproject_plural)%></label>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ en:
label_setting_ratio_good: "Good speed ratio"
label_setting_ratio_very_bad: "Very bad speed ratio"
label_setting_solved_issues_to_estimate: "Solved issues to estimate"
label_hide_closed_issues: "Hide solved issues"
notice_unable_delete_milestone: "Unable to delete milestone."
permission_manage_milestones: "Manage milestones"
permission_view_issue_estimated_hours: "View estimated hours"
1 change: 1 addition & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ fr:
label_setting_ratio_good: "Ratio de bonne vitesse de progression"
label_setting_ratio_very_bad: "Ratio de très mauvaise vitesse de progression"
label_setting_solved_issues_to_estimate: "Problèmes résolus à estimer"
label_hide_closed_issues: "Masquer les demandes résolues"
notice_unable_delete_milestone: "Impossible de supprimer l'étape."
permission_manage_milestones: "Gestion des étapes"
permission_view_issue_estimated_hours: "Voir nombres d'heures estimées"
5 changes: 5 additions & 0 deletions lib/advanced_roadmap/versions_controller_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ def index_with_plugin
index_without_plugin
@totals = Version.calculate_totals(@versions)
Version.sort_versions(@versions)

@issues_by_version.each do |versions|
versions.last.delete_if { |issue | issue.closed? }
end if params[:only_open]

end
alias_method_chain :index, :plugin

Expand Down

0 comments on commit d0a82e8

Please sign in to comment.