Added a new block available for my page: "Watched issues"
git-svn-id: http://redmine.rubyforge.org/svn/trunk@456 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
5d8200b9fc
commit
77cfc1cc59
9 files changed
+18
No files matched your search
@@ -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
|
||||
|
||||
@@ -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 %>
|
||||
Reference in new issue
Block a user