watched_issue_my_page_block.diff

Karel Pičman, 2015-02-11 12:59

Download (1.01 KB)

View differences:

app/helpers/my_helper.rb (working copy)
52 52
  end
53 53

  
54 54
  def issueswatched_items
55
    Issue.visible.on_active_project.watched_by(User.current.id).recently_updated.limit(10).to_a
55
    Issue.visible.open.on_active_project.watched_by(User.current.id).recently_updated.limit(10).to_a
56 56
  end
57 57

  
58 58
  def news_items
app/views/my/blocks/_issueswatched.html.erb (working copy)
1 1
<h3>
2 2
  <%= link_to l(:label_watched_issues),
3 3
        issues_path(:set_filter => 1, :watcher_id => 'me', :sort => 'updated_on:desc') %>
4
  (<%= Issue.visible.watched_by(user.id).count %>)
4
  (<%= Issue.visible.open.watched_by(user.id).count %>)
5 5
</h3>
6 6

  
7 7
<% watched_issues = issueswatched_items %>