diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/my_controller.rb | 1 | ||||
-rw-r--r-- | app/views/my/blocks/_issueswatched.rhtml | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/my_controller.rb b/app/controllers/my_controller.rb index 64a561f96..bc9a42a63 100644 --- a/app/controllers/my_controller.rb +++ b/app/controllers/my_controller.rb @@ -21,6 +21,7 @@ class MyController < ApplicationController BLOCKS = { 'issuesassignedtome' => :label_assigned_to_me_issues, 'issuesreportedbyme' => :label_reported_issues, + 'issueswatched' => :label_watched_issues, 'news' => :label_news_latest, 'calendar' => :label_calendar, 'documents' => :label_document_plural diff --git a/app/views/my/blocks/_issueswatched.rhtml b/app/views/my/blocks/_issueswatched.rhtml new file mode 100644 index 000000000..7324e9a47 --- /dev/null +++ b/app/views/my/blocks/_issueswatched.rhtml @@ -0,0 +1,10 @@ +<h3><%=l(:label_watched_issues)%></h3>
+<% watched_issues = Issue.find(:all,
+ :include => [:status, :project, :tracker, :watchers],
+ :limit => 10,
+ :conditions => ["#{Watcher.table_name}.user_id = ?", user.id],
+ :order => "#{Issue.table_name}.updated_on DESC") %>
+<%= render :partial => 'issues/list_simple', :locals => { :issues => watched_issues } %>
+<% if watched_issues.length > 0 %>
+<p><%=lwr(:label_last_updates, watched_issues.length)%></p>
+<% end %>
|