Defect #18769 » RM_18769_move_role_stay_on_same_page.diff
| app/views/roles/index.html.erb (copie de travail) | ||
|---|---|---|
|
<td class="name"><%= content_tag(role.builtin? ? 'em' : 'span', link_to(h(role.name), edit_role_path(role))) %></td>
|
||
|
<td class="reorder">
|
||
|
<% unless role.builtin? %>
|
||
|
<%= reorder_links('role', {:action => 'update', :id => role}, :put) %>
|
||
|
<%= reorder_links('role', {:action => 'update', :id => role, :page => params[:page]}, :put) %>
|
||
|
<% end %>
|
||
|
</td>
|
||
|
<td class="buttons">
|
||
| app/controllers/roles_controller.rb (copie de travail) | ||
|---|---|---|
|
def update
|
||
|
if request.put? and @role.update_attributes(params[:role])
|
||
|
flash[:notice] = l(:notice_successful_update)
|
||
|
redirect_to roles_path
|
||
|
redirect_to roles_path(:page => params[:page])
|
||
|
else
|
||
|
render :action => 'edit'
|
||
|
end
|
||