diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-16 18:24:59 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-16 18:24:59 +0000 |
commit | 44a898a2108708a5f8301a0c5b05a58d32db759b (patch) | |
tree | 2aaeef622748bb05ffffd1cd28f682105c415ee1 /app/controllers/issues_controller.rb | |
parent | dfe26befdddea9ddd7e5cfb7d21a9c1cb7a5ac43 (diff) | |
download | redmine-44a898a2108708a5f8301a0c5b05a58d32db759b.tar.gz redmine-44a898a2108708a5f8301a0c5b05a58d32db759b.zip |
Display the position of the current issue in the query results.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8663 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/issues_controller.rb')
-rw-r--r-- | app/controllers/issues_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 8cd34d08e..358faf507 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -330,6 +330,10 @@ private limit = 500 issue_ids = @query.issue_ids(:order => sort_clause, :limit => (limit + 1), :include => [:assigned_to, :tracker, :priority, :category, :fixed_version]) if (idx = issue_ids.index(@issue.id)) && idx < limit + if issue_ids.size < 500 + @issue_position = idx + 1 + @issue_count = issue_ids.size + end @prev_issue_id = issue_ids[idx - 1] if idx > 0 @next_issue_id = issue_ids[idx + 1] if idx < (issue_ids.size - 1) end |