diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-04-21 12:28:22 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-04-21 12:28:22 +0000 |
commit | 77cfc1cc59c09fc7c3754a9b59a434c325483360 (patch) | |
tree | e28f92d0fc6a365054fc07516792001cf1de85f4 | |
parent | 5d8200b9fc55d740b390fae89839d23662adcbb2 (diff) | |
download | redmine-77cfc1cc59c09fc7c3754a9b59a434c325483360.tar.gz redmine-77cfc1cc59c09fc7c3754a9b59a434c325483360.zip |
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
-rw-r--r-- | app/controllers/my_controller.rb | 1 | ||||
-rw-r--r-- | app/views/my/blocks/_issueswatched.rhtml | 10 | ||||
-rw-r--r-- | lang/de.yml | 1 | ||||
-rw-r--r-- | lang/en.yml | 1 | ||||
-rw-r--r-- | lang/es.yml | 1 | ||||
-rw-r--r-- | lang/fr.yml | 1 | ||||
-rw-r--r-- | lang/it.yml | 1 | ||||
-rw-r--r-- | lang/ja.yml | 1 | ||||
-rw-r--r-- | lang/zh.yml | 1 |
9 files changed, 18 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 %>
diff --git a/lang/de.yml b/lang/de.yml index 590e5e0d5..9ef10cae5 100644 --- a/lang/de.yml +++ b/lang/de.yml @@ -357,6 +357,7 @@ label_diff_side_by_side: side by side label_options: Options label_copy_workflow_from: Copy workflow from label_permissions_report: Permissions report +label_watched_issues: Watched issues button_login: Einloggen button_submit: OK diff --git a/lang/en.yml b/lang/en.yml index e40c915f2..690706793 100644 --- a/lang/en.yml +++ b/lang/en.yml @@ -357,6 +357,7 @@ label_diff_side_by_side: side by side label_options: Options label_copy_workflow_from: Copy workflow from label_permissions_report: Permissions report +label_watched_issues: Watched issues button_login: Login button_submit: Submit diff --git a/lang/es.yml b/lang/es.yml index 103c399c0..026f5ddb8 100644 --- a/lang/es.yml +++ b/lang/es.yml @@ -357,6 +357,7 @@ label_diff_side_by_side: side by side label_options: Options label_copy_workflow_from: Copy workflow from label_permissions_report: Permissions report +label_watched_issues: Watched issues button_login: Conexión button_submit: Someter diff --git a/lang/fr.yml b/lang/fr.yml index d6666169c..45d24caf1 100644 --- a/lang/fr.yml +++ b/lang/fr.yml @@ -357,6 +357,7 @@ label_diff_side_by_side: côte à côte label_options: Options label_copy_workflow_from: Copier le workflow de label_permissions_report: Synthèse des permissions +label_watched_issues: Demandes surveillées button_login: Connexion button_submit: Soumettre diff --git a/lang/it.yml b/lang/it.yml index 6af04b2f4..0bd9c1b10 100644 --- a/lang/it.yml +++ b/lang/it.yml @@ -357,6 +357,7 @@ label_diff_side_by_side: side by side label_options: Options label_copy_workflow_from: Copy workflow from label_permissions_report: Permissions report +label_watched_issues: Watched issues button_login: Login button_submit: Invia diff --git a/lang/ja.yml b/lang/ja.yml index 5cc9bb907..235bf1be1 100644 --- a/lang/ja.yml +++ b/lang/ja.yml @@ -358,6 +358,7 @@ label_diff_side_by_side: 横に並べる label_options: オプション label_copy_workflow_from: ワークフローをここからコピー label_permissions_report: 権限レポート +label_watched_issues: Watched issues button_login: ログイン button_submit: 変更 diff --git a/lang/zh.yml b/lang/zh.yml index 78e093d59..03ff2bc63 100644 --- a/lang/zh.yml +++ b/lang/zh.yml @@ -360,6 +360,7 @@ label_diff_side_by_side: side by side label_options: Options label_copy_workflow_from: Copy workflow from label_permissions_report: Permissions report +label_watched_issues: Watched issues button_login: 登录 button_submit: 提交 |