Add a second action menu to IssuesController#show. (#4331)

Will have the update, log time, watch, copy, etc buttons.  Had to rework
how the watchers button works since it requires a unique DOM id for the
Ajax response.  Also modified the WatchersController to be able to replace
multiple sections of the page, e.g. two Watch links.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3119 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2009-12-03 18:41:00 +00:00
parent 97c5362cfe
commit e02da72947
5 changed files with 66 additions and 14 deletions
+4 -8
View File
@@ -1,11 +1,4 @@
<div class="contextual">
<%= 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 => 'edit', :issue_id => @issue}, :class => 'icon icon-time-add' %>
<%= watcher_tag(@issue, User.current) %>
<%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-copy' %>
<%= link_to_if_authorized l(:button_move), {:controller => 'issues', :action => 'move', :id => @issue }, :class => 'icon icon-move' %>
<%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
</div>
<%= render :partial => 'action_menu' %>
<h2><%= @issue.tracker.name %> #<%= @issue.id %></h2>
@@ -93,6 +86,9 @@
<%= render :partial => 'history', :locals => { :journals => @journals } %>
</div>
<% end %>
<%= render :partial => 'action_menu', :locals => {:replace_watcher => 'watcher2' } %>
<div style="clear: both;"></div>
<% if authorize_for('issues', 'edit') %>