Changed the create.rjs so it will replace the td on the admin and project panel.

* td's are now id'ed like rate_project_user

  #1923
This commit is contained in:
Eric Davis
2009-01-21 12:20:17 -08:00
parent 05501f3eb6
commit dc6acf5031
3 changed files with 3 additions and 3 deletions

View File

@@ -1,2 +1,2 @@
element = 'rate_' + @rate.project_id.to_s
element = 'rate_' + @rate.project_id.to_s + '_' + @rate.user_id.to_s
page.replace_html element, "<strong>#{link_to number_to_currency(@rate.amount), { :action => 'edit', :id => @rate.user, :tab => 'rates'} }</strong>"

View File

@@ -23,7 +23,7 @@
<%= link_to l(:button_delete), {:action => 'destroy_membership', :id => @user, :membership_id => membership }, :method => :post, :class => 'icon icon-del' %>
</td>
<%# TODO: Hook %>
<td id="rate_<%= membership.project.id %>">
<td id="rate_<%= membership.project.id %>_<%= membership.user.id %>">
<% rate = Rate.for(@user, membership.project) %>
<% if rate.nil? || rate.default? %>

View File

@@ -49,7 +49,7 @@ class RateProjectHook < Redmine::Hook::ViewListener
form << submit_tag(l(:rate_label_set_rate), :class => "small")
return content_tag(:td, form, :align => 'center' )
return content_tag(:td, form, :align => 'left', :id => "rate_#{project.id}_#{member.user.id}" )
end
end