<div class="outgoing correspondence box" id="outgoing-<%= outgoing_message.id.to_s %>">
  <%- if not outgoing_message.user_can_view?(@user) %>
    <%= render :partial => 'request/hidden_correspondence', :locals => { :message => outgoing_message }%>
  <%- else %>
    <%= render :partial => 'request/restricted_correspondence', :locals => {:message => outgoing_message } %>

    <h2>
      <%= _("From:") %> <%= @info_request.user_name %><br>
      <br><%= simple_date(info_request_event.created_at) %>
    </h2>

    <%= render :partial => 'request/bubble', :locals => { :body => outgoing_message.get_body_for_html_display(), :attachments => nil }  %>

    <p class="event_actions">
      <% if outgoing_message.status == 'ready' && !@info_request.is_external? %>
        <%= _('<strong>Warning:</strong> This message has <strong>not yet ' \
                 'been sent</strong> for an unknown reason.') %>
      <% end %>
      <%= link_to _("Link to this"), outgoing_message_path(outgoing_message), :class => "link_to_this" %>
    </p>
  <%- end %>
</div>

<div class="outgoing correspondence box" id="outgoing-<%= outgoing_message.id.to_s %>">
  <%- if not outgoing_message.user_can_view?(@user) %>
    <%= render :partial => 'request/hidden_correspondence', :locals => { :message => outgoing_message }%>
  <%- else %>
    <%= render :partial => 'request/restricted_correspondence', :locals => {:message => outgoing_message } %>

    <h2>
      <%= _("From:") %> <%= @info_request.user_name %>
      <br>
      <br>
      <%= simple_date(info_request_event.created_at) %>
      <% if @user && @user.admin_page_links? %>
        (<%= link_to _('Logs'), outgoing_message_mail_server_logs_path(outgoing_message) %>)
      <% end %>
    </h2>

    <%= render :partial => 'request/bubble', :locals => { :body => outgoing_message.get_body_for_html_display(), :attachments => nil }  %>

    <p class="event_actions">
      <% if outgoing_message.status == 'ready' && !@info_request.is_external? %>
        <%= _('<strong>Warning:</strong> This message has <strong>not yet ' \
                 'been sent</strong> for an unknown reason.') %>
      <% end %>
      <%= link_to _("Link to this"), outgoing_message_path(outgoing_message), :class => "link_to_this" %>
    </p>
  <%- end %>
</div>

Add link to mail logs from correspondence bubble
Add link to mail logs from correspondence bubble

Only allow site admins to view the link for now. The actual URL is
available to anyone, but shouldn't be readily found. This gives us a
little chance to check everything looks okay before we make public.
