Fix various routing and route generation errors

This commit is contained in:
Tom Hughes 2012-03-09 23:01:21 +00:00
parent 6391ea5a7a
commit 58d889436f
11 changed files with 32 additions and 24 deletions

View file

@ -187,7 +187,7 @@ class TraceController < ApplicationController
@trace.tagstring = params[:trace][:tagstring]
@trace.visibility = params[:trace][:visibility]
if @trace.save
redirect_to :action => 'view'
redirect_to :action => 'view', :display_name => @user.display_name
end
end
else

View file

@ -1,7 +1,7 @@
<% this_colour = cycle('lightgrey', 'white') %>
<tr id="inbox-<%= message_summary.id %>" class="inbox-row<%= "-unread" if not message_summary.message_read? %>">
<td class="inbox-sender" bgcolor="<%= this_colour %>"><%= link_to h(message_summary.sender.display_name), :controller => 'user', :action => message_summary.sender.display_name %></td>
<td class="inbox-sender" bgcolor="<%= this_colour %>"><%= link_to h(message_summary.sender.display_name), :controller => 'user', :action => 'view', :display_name => message_summary.sender.display_name %></td>
<td class="inbox-subject" bgcolor="<%= this_colour %>"><%= link_to h(message_summary.title), :controller => 'message', :action => 'read', :message_id => message_summary.id %></td>
<td class="inbox-sent nowrap" bgcolor="<%= this_colour %>"><%= l message_summary.sent_on, :format => :friendly %></td>
<% if message_summary.message_read? %>

View file

@ -1,4 +1,4 @@
<h2><%= t'message.inbox.my_inbox'%>/<%= link_to t('message.inbox.outbox'), url_for(:controller => "user", :action => "outbox", :id => @user.display_name) %></h2>
<h2><%= t'message.inbox.my_inbox'%>/<%= link_to t('message.inbox.outbox'), outbox_path(@user.display_name) %></h2>
<%= render :partial => "message_count" %>

View file

@ -1,4 +1,4 @@
<h2><%= raw(t'message.outbox.my_inbox', :inbox_link => link_to(t('message.outbox.inbox'), url_for(:controller => "user", :action => "inbox", :id => @user.display_name))) %>/<%= t'message.outbox.outbox' %></h2>
<h2><%= raw(t'message.outbox.my_inbox', :inbox_link => link_to(t('message.outbox.inbox'), inbox_path(@user.display_name))) %>/<%= t'message.outbox.outbox' %></h2>
<p><%= t'message.outbox.messages', :count => @user.sent_messages.size %>

View file

@ -19,7 +19,7 @@
<!-- Displaying user's own profile page -->
<%= link_to t('user.view.my diary'), :controller => 'diary_entry', :action => 'list', :display_name => @user.display_name %>
|
<%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new', :display_name => @user.display_name %>
<%= link_to t('user.view.new diary entry'), :controller => 'diary_entry', :action => 'new' %>
|
<%= link_to t('user.view.my comments' ), :controller => 'diary_entry', :action => 'comments', :display_name => @this_user.display_name %>
|
@ -122,8 +122,8 @@
<% if friends.empty? %>
<%= t 'user.view.no friends' %>
<% else %>
<%= link_to t('user.view.friends_changesets'), {:controller => 'browse', :action => 'friends'} %><br/>
<%= link_to t('user.view.friends_diaries'), {:controller => 'diary', :action => 'friends'} %><br/><br/>
<%= link_to t('user.view.friends_changesets'), friend_changesets_path %><br/>
<%= link_to t('user.view.friends_diaries'), friend_diaries_path %><br/><br/>
<table id="friends">
<%= render :partial => "contact", :collection => friends %>
</table>
@ -134,8 +134,8 @@
<% if nearby.empty? %>
<%= t 'user.view.no nearby users' %>
<% else %>
<%= link_to t('user.view.nearby_changesets'), {:controller => 'browse', :action => 'nearby'} %><br/>
<%= link_to t('user.view.nearby_diaries'), {:controller => 'diary', :action => 'nearby'} %><br/><br/>
<%= link_to t('user.view.nearby_changesets'), nearby_changesets_path %><br/>
<%= link_to t('user.view.nearby_diaries'), nearby_diaries_path %><br/><br/>
<table id="nearbyusers">
<%= render :partial => "contact", :collection => nearby %>
</table>

View file

@ -19,6 +19,6 @@
<td class="<%= c1 %>"><%= link_to t('user_block.partial.show'), block %></td>
<td class="<%= c1 %>"><% if @user and @user.id == block.creator_id and block.active? %><%= link_to t('user_block.partial.edit'), edit_user_block_path(block) %><% end %></td>
<% if show_revoke_link %>
<td class="<%= c1 %>"><% if block.active? %><%= link_to t('user_block.partial.revoke'), block, :confirm => t('user_block.partial.confirm'), :action => :revoke %><% end %></td>
<td class="<%= c1 %>"><% if block.active? %><%= link_to t('user_block.partial.revoke'), :controller => 'user_blocks', :action => 'revoke', :id => block.id %><% end %></td>
<% end %>
</tr>