Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
20d80482
Commit
20d80482
authored
May 14, 2011
by
Felix Schäfer
Committed by
Felix Schäfer
May 14, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update the watcher list on click on "watch".
#311
Based on a patch contributed by Price M.
parent
ebf45841
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
watchers_controller.rb
app/controllers/watchers_controller.rb
+6
-1
_action_menu.rhtml
app/views/issues/_action_menu.rhtml
+1
-1
No files found.
app/controllers/watchers_controller.rb
View file @
20d80482
...
...
@@ -90,7 +90,12 @@ private
format
.
js
do
render
(
:update
)
do
|
page
|
replace_ids
.
each
do
|
replace_id
|
page
.
replace_html
replace_id
,
watcher_link
(
@watched
,
user
,
:replace
=>
replace_ids
)
case
replace_id
when
'watchers'
page
.
replace_html
'watchers'
,
:partial
=>
'watchers/watchers'
,
:locals
=>
{
:watched
=>
@watched
}
else
page
.
replace_html
replace_id
,
watcher_link
(
@watched
,
user
,
:replace
=>
replace_ids
)
end
end
end
end
...
...
app/views/issues/_action_menu.rhtml
View file @
20d80482
...
...
@@ -2,7 +2,7 @@
<%=
link_to_if_authorized
(
l
(
:button_update
),
{
:controller
=>
'issues'
,
:action
=>
'edit'
,
:id
=>
@issue
},
:onclick
=>
'showAndScrollTo("update", "notes"); return false;'
,
:class
=>
'icon icon-edit'
,
:accesskey
=>
accesskey
(
:edit
))
%>
<%=
link_to_if_authorized
l
(
:button_log_time
),
{
:controller
=>
'timelog'
,
:action
=>
'new'
,
:issue_id
=>
@issue
},
:class
=>
'icon icon-time-add'
%>
<%
replace_watcher
||=
'watcher'
%>
<%=
watcher_tag
(
@issue
,
User
.
current
,
{
:id
=>
replace_watcher
,
:replace
=>
[
'watcher'
,
'watcher2'
]})
%>
<%=
watcher_tag
(
@issue
,
User
.
current
,
{
:id
=>
replace_watcher
,
:replace
=>
[
'watcher
s'
,
'watcher
'
,
'watcher2'
]})
%>
<%=
link_to_if_authorized
l
(
:button_duplicate
),
{
:controller
=>
'issues'
,
:action
=>
'new'
,
:project_id
=>
@project
,
:copy_from
=>
@issue
},
:class
=>
'icon icon-duplicate'
%>
<%=
link_to_if_authorized
l
(
:button_copy
),
{
:controller
=>
'issue_moves'
,
:action
=>
'new'
,
:id
=>
@issue
,
:copy_options
=>
{
:copy
=>
't'
}},
:class
=>
'icon icon-copy'
%>
<%=
link_to_if_authorized
l
(
:button_move
),
{
:controller
=>
'issue_moves'
,
:action
=>
'new'
,
:id
=>
@issue
},
:class
=>
'icon icon-move'
%>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment