redmine/app/views/my/blocks/_issueswatched.rhtml
Eric Davis 22c1e2b8cf Adds named scopes to replace custom finders.
* Adds watched_by class method in ActsAsWatchable
* Adds Issue#recently_updated, Issue#with_limit and Issue#on_active_project

  #2482

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3557 e93f8b46-1217-0410-a6f0-8f06a7374b81
2010-03-10 05:10:43 +00:00

12 lines
615 B
Plaintext

<h3><%=l(:label_watched_issues)%> (<%= Issue.visible.watched_by(user.id).count %>)</h3>
<% watched_issues = Issue.visible.on_active_project.watched_by(user.id).recently_updated.with_limit(10) %>
<%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
<% if watched_issues.length > 0 %>
<p class="small"><%= link_to l(:label_issue_view_all), :controller => 'issues',
:action => 'index',
:set_filter => 1,
:watcher_id => 'me',
:sort => 'updated_on:desc' %></p>
<% end %>