diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-08-22 16:13:26 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-08-22 16:13:26 +0100 |
commit | 1a2ab0837be7aed4d0e6f4e2a26020b01c76b3fb (patch) | |
tree | aaa2c2d4e70bc9c08adecbb3faacf436f4973a29 | |
parent | 1bc3f27ec2142e32be28e42545b19e540929f741 (diff) |
With reference to #561, display "[An anonymous user]" rather than an empty string for external requests with no external user name.
-rw-r--r-- | app/views/request/simple_correspondence.rhtml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/request/simple_correspondence.rhtml b/app/views/request/simple_correspondence.rhtml index 066bd3efc..bcbc795e7 100644 --- a/app/views/request/simple_correspondence.rhtml +++ b/app/views/request/simple_correspondence.rhtml @@ -13,7 +13,7 @@ if !incoming_message.safe_mail_from.nil? && incoming_message.safe_mail_from.strip != @info_request.public_body.name.strip %> <%= _('From:') %> <%= incoming_message.safe_mail_from %><% end if incoming_message.safe_mail_from.nil? || (incoming_message.mail_from_domain == @info_request.public_body.request_email_domain) %>, <%= @info_request.public_body.name %><% end %> -<%= _('To:') %> <%= @info_request.user_name %> +<%= _('To:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %> <%= _('Date:') %> <%= simple_date(incoming_message.sent_at) %> <%= incoming_message.get_body_for_quoting %> @@ -24,7 +24,7 @@ elsif [ 'sent', 'followup_sent' ].include?(info_request_event.event_type) outgoing_message = info_request_event.outgoing_message %> -<%= _('From:') %> <%= @info_request.user_name %> +<%= _('From:') %> <% if @info_request.user_name %><%= @info_request.user_name %><% else %><%= "[#{_('An anonymous user')}]"%><% end %> <%= _('To:') %> <%= @info_request.public_body.name %> <%= _('Date:') %> <%= simple_date(info_request_event.created_at) %> <% |