プロジェクト

全般

プロフィール

Vote #69282

完了

Ability to add watchers to Wiki pages

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Wiki_1
対象バージョン:
開始日:
2011/02/18
期日:
進捗率:

0%

予定工数:
category_id:
1
version_id:
155
issue_org_id:
7652
author_id:
11395
assigned_to_id:
332
comments:
9
status_id:
5
tracker_id:
2
plus1:
1
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Today I can only set myself as a watcher of a page.
Would be very useful to if I can add/remove another users as a watcher, like we can do in Issues today.


journals

--------------------------------------------------------------------------------
Here's how to do it for wiki pages -- I haven't had the need to do it for forums...

<pre><code class="diff">
Index: app/views/wiki/show.rhtml
===================================================================
--- app/views/wiki/show.rhtml
+++ app/views/wiki/show.rhtml
@@ -56,6 +56,10 @@

<% content_for :sidebar do %>
<%= render :partial => 'sidebar' %>
+
+ <div id="watchers">
+ <%= render :partial => 'watchers/watchers', :locals => {:watched => @page} %>
+ </div>
<% end %>

<% html_title @page.pretty_title %>
Index: lib/redmine.rb
===================================================================
--- lib/redmine.rb
+++ lib/redmine.rb
@@ -117,6 +117,7 @@
map.permission :edit_wiki_pages, :wiki => [:edit, :update, :preview, :add_attachment]
map.permission :delete_wiki_pages_attachments, {}
map.permission :protect_wiki_pages, {:wiki => :protect}, :require => :member
+ map.permission :add_issue_watchers, {:watchers => :new}
end

map.project_module :repository do |map|
</code></pre>

It uses the existing :add_issue_watchers permission (that's hardcoded elsewhere in the code).
-Z
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
To Zee Prime,
Thanks for your modified code.
But it only applied to current wiki page.
Can you add option check box such as "ㅁ Apply to all sub wiki pages?"
--------------------------------------------------------------------------------
You could add and remove watchers with wiki pages (could be done on the sidebar like issues).
I have attached a patch.

!{width:600px;border:1px solid grey;}add-and-remove-watchers.png!

Roles > Permissions report
!{width:600px;border:1px solid grey;}roles-and-permissions.png!
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Setting the target version to 5.0.0.
--------------------------------------------------------------------------------
Split the patch into two parts.
--------------------------------------------------------------------------------
Committed the patch. Thank you for improving Redmine.
--------------------------------------------------------------------------------


related_issues

relates,Closed,7697,Extend watchers functionality of wiki and forums to be like issues

Admin Redmine さんが3年以上前に更新

  • カテゴリWiki_1 にセット
  • 対象バージョン5.0.0_155 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0