Remove use of deprecated :comment attribute on link_to and button_to
This commit is contained in:
parent
0adb54ad86
commit
13ef6a2df1
6 changed files with 14 additions and 14 deletions
|
@ -2,6 +2,6 @@
|
|||
<h4 id="comment<%= diary_comment.id %>"><%= raw(t('diary_entry.diary_comment.comment_from', :link_user => (link_to h(diary_comment.user.display_name), :controller => 'user', :action => 'view', :display_name => diary_comment.user.display_name), :comment_created_at => l(diary_comment.created_at, :format => :friendly))) %></h4>
|
||||
<%= diary_comment.body.to_html %>
|
||||
<%= if_administrator(:span) do %>
|
||||
<%= link_to t('diary_entry.diary_comment.hide_link'), {:action => 'hidecomment', :display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id}, {:method => :post, :confirm => t('diary_entry.diary_comment.confirm')} %>
|
||||
<%= link_to t('diary_entry.diary_comment.hide_link'), hide_diary_comment_path(:display_name => diary_comment.diary_entry.user.display_name, :id => diary_comment.diary_entry.id, :comment => diary_comment.id), :method => :post, :data=> { :confirm => t('diary_entry.diary_comment.confirm') } %>
|
||||
<% end %>
|
||||
<hr />
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
| <%= link_to t('diary_entry.diary_entry.edit_link'), :action => 'edit', :display_name => diary_entry.user.display_name, :id => diary_entry.id %>
|
||||
<% end %>
|
||||
<%= if_administrator(:span) do %>
|
||||
| <%= link_to t('diary_entry.diary_entry.hide_link'), {:action => 'hide', :display_name => diary_entry.user.display_name, :id => diary_entry.id}, {:method => :post, :confirm => t('diary_entry.diary_entry.confirm')} %>
|
||||
| <%= link_to t('diary_entry.diary_entry.hide_link'), hide_diary_entry_path(:display_name => diary_entry.user.display_name, :id => diary_entry.id), :method => :post, :data => { :confirm => t('diary_entry.diary_entry.confirm') } %>
|
||||
<% end %>
|
||||
|
||||
<br />
|
||||
|
|
|
@ -27,6 +27,6 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td><%= button_to t('oauth_clients.show.edit'), edit_oauth_client_path(@client_application.user.display_name, @client_application), :method => :get %></td>
|
||||
<td><%= button_to t('oauth_clients.show.delete'), oauth_client_path(@client_application.user.display_name, @client_application), :method => :delete, :confirm => t('oauth_clients.show.confirm') %></td>
|
||||
<td><%= button_to t('oauth_clients.show.delete'), oauth_client_path(@client_application.user.display_name, @client_application), :method => :delete, :data => { :confirm => t('oauth_clients.show.confirm') } %></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<table>
|
||||
<tr>
|
||||
<td><%= button_to t('redaction.show.edit'), edit_redaction_path(@redaction), :method => :get %></td>
|
||||
<td><%= button_to t('redaction.show.destroy'), @redaction, :confirm => t('redaction.show.confirm'), :method => "delete", :remote => true %></td>
|
||||
<td><%= button_to t('redaction.show.destroy'), @redaction, :method => "delete", :remote => true, :data => { :confirm => t('redaction.show.confirm') } %></td>
|
||||
</tr>
|
||||
</table>
|
||||
<% end %>
|
||||
|
|
|
@ -52,19 +52,19 @@
|
|||
<% if @user and @user.administrator? %>
|
||||
<br/>
|
||||
<% if ["active", "confirmed"].include? @this_user.status %>
|
||||
<%= link_to t('user.view.deactivate_user'), {:controller => 'user', :action => 'set_status', :status => 'pending', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
|
||||
<%= link_to t('user.view.deactivate_user'), set_status_user_path(:status => 'pending', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
|
||||
<% elsif ["pending"].include? @this_user.status %>
|
||||
<%= link_to t('user.view.activate_user'), {:controller => 'user', :action => 'set_status', :status => 'active', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
|
||||
<%= link_to t('user.view.activate_user'), set_status_user_path(:status => 'active', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
|
||||
<% end %>
|
||||
<% if ["active", "suspended"].include? @this_user.status %>
|
||||
<%= link_to t('user.view.confirm_user'), {:controller => 'user', :action => 'set_status', :status => 'confirmed', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
|
||||
<%= link_to t('user.view.confirm_user'), set_status_user_path(:status => 'confirmed', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
|
||||
<% end %>
|
||||
<% if ["pending", "active", "confirmed", "suspended"].include? @this_user.status %>
|
||||
<%= link_to t('user.view.hide_user'), {:controller => 'user', :action => 'set_status', :status => 'deleted', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
|
||||
<%= link_to t('user.view.hide_user'), set_status_user_path(:status => 'deleted', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
|
||||
<% else %>
|
||||
<%= link_to t('user.view.unhide_user'), {:controller => 'user', :action => 'set_status', :status => 'active', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %> |
|
||||
<%= link_to t('user.view.unhide_user'), set_status_user_path(:status => 'active', :display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %> |
|
||||
<% end %>
|
||||
<%= link_to t('user.view.delete_user'), {:controller => 'user', :action => 'delete', :display_name => @this_user.display_name}, {:confirm => t('user.view.confirm')} %>
|
||||
<%= link_to t('user.view.delete_user'), delete_user_path(:display_name => @this_user.display_name), :data => { :confirm => t('user.view.confirm') } %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -169,16 +169,16 @@ OpenStreetMap::Application.routes.draw do
|
|||
match '/user/:display_name/diary/:id' => 'diary_entry#view', :via => :get, :id => /\d+/
|
||||
match '/user/:display_name/diary/:id/newcomment' => 'diary_entry#comment', :via => :post, :id => /\d+/
|
||||
match '/user/:display_name/diary/:id/edit' => 'diary_entry#edit', :via => [:get, :post], :id => /\d+/
|
||||
match '/user/:display_name/diary/:id/hide' => 'diary_entry#hide', :via => :post, :id => /\d+/
|
||||
match '/user/:display_name/diary/:id/hidecomment/:comment' => 'diary_entry#hidecomment', :via => :post, :id => /\d+/, :comment => /\d+/
|
||||
match '/user/:display_name/diary/:id/hide' => 'diary_entry#hide', :via => :post, :id => /\d+/, :as => :hide_diary_entry
|
||||
match '/user/:display_name/diary/:id/hidecomment/:comment' => 'diary_entry#hidecomment', :via => :post, :id => /\d+/, :comment => /\d+/, :as => :hide_diary_comment
|
||||
|
||||
# user pages
|
||||
match '/user/:display_name' => 'user#view', :via => :get, :as => "user"
|
||||
match '/user/:display_name/make_friend' => 'user#make_friend', :via => :get
|
||||
match '/user/:display_name/remove_friend' => 'user#remove_friend', :via => :get
|
||||
match '/user/:display_name/account' => 'user#account', :via => [:get, :post]
|
||||
match '/user/:display_name/set_status' => 'user#set_status', :via => :get
|
||||
match '/user/:display_name/delete' => 'user#delete', :via => :get
|
||||
match '/user/:display_name/set_status' => 'user#set_status', :via => :get, :as => :set_status_user
|
||||
match '/user/:display_name/delete' => 'user#delete', :via => :get, :as => :delete_user
|
||||
|
||||
# user lists
|
||||
match '/users' => 'user#list', :via => [:get, :post]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue