diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2022-02-23 21:16:18 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2022-02-23 21:16:18 +0000 |
commit | ba74ba1c702e7a122328094341e659c2baf9fd3d (patch) | |
tree | b6d43d8beaf9538ff54bebd16768f29f7ef782a6 /app/views | |
parent | 3a6c43deeec8f9f444008e43f53e58a6614716ed (diff) | |
download | redmine-ba74ba1c702e7a122328094341e659c2baf9fd3d.tar.gz redmine-ba74ba1c702e7a122328094341e659c2baf9fd3d.zip |
Allow users to be mentioned using @ in issues and wiki pages (#13919):
* the user must have add watchers permission on that object in order to mention other users
* mentioned user will receive a notification email
* only visible users who can view the object can be mentioned
git-svn-id: http://svn.redmine.org/redmine/trunk@21435 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/issues/_form.html.erb | 5 | ||||
-rw-r--r-- | app/views/wiki/edit.html.erb | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index 9654d631d..3993b9ebf 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -55,6 +55,11 @@ <% heads_for_wiki_formatter %> <%= heads_for_auto_complete(@issue.project) %> +<% if User.current.allowed_to?(:add_issue_watchers, @issue.project)%> + <%= update_data_sources_for_auto_complete({users: watchers_autocomplete_for_mention_path(project_id: @issue.project, q: '', object_type: 'issue', + object_id: @issue.id)}) %> +<% end %> + <%= javascript_tag do %> $(document).ready(function(){ $("#issue_tracker_id, #issue_status_id").each(function(){ diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb index c501d6e28..7e9cf42af 100644 --- a/app/views/wiki/edit.html.erb +++ b/app/views/wiki/edit.html.erb @@ -64,6 +64,10 @@ <%= link_to l(:button_cancel), wiki_page_edit_cancel_path(@page) %> </p> <%= wikitoolbar_for 'content_text', preview_project_wiki_page_path(:project_id => @project, :id => @page.title) %> + +<% if User.current.allowed_to?(:add_wiki_page_watchers, @project)%> + <%= update_data_sources_for_auto_complete({users: watchers_autocomplete_for_mention_path(project_id: @project, q: '', object_type: 'wiki_page', object_id: @page.id)}) %> + <% end %> <% end %> <% content_for :header_tags do %> |