<% # Select - non custom fields
   #        - custom fields with mail_notification == TRUE
   visible_details = @journal.visible_details.select {|jd| jd.custom_field.nil? || (jd.custom_field.mail_notification && jd.custom_field.visible?) }
%>

<% if @journal.private_notes? %>
  <span class="private">(<%= l(:field_private_notes) %>)</span>
<% end %>
<div class="journal-details-container">
  <h4>
    <%= l(:text_issue_updated, :id => "##{@issue.id.to_s}", :author => h(@journal.user)) %>
  </h4>
  <% if visible_details.any? %>
    <div class="details">
      <% details_to_strings(visible_details, false, :only_path => false, :entity => @issue).each do |string| %>
        <span><%= string -%></span><br/>
      <% end %>
    </div>
  <% end %>
  <%= content_tag('div', textilizable(@journal, :notes, {:headings => false, :only_path => false}), :id => "journal-#{@journal.id}-notes", :class => "note") -%>
</div>

<%= render :partial => 'mailer/issue', :formats => [:html], :locals => { :issue => @issue, :users => @users, :issue_url => @issue_url } %>
