This repository has been archived on 2024-12-01. You can view files and clone it, but cannot push or open issues or pull requests.
redmine_rodax_crm/app/views/notes/_note_item.html.erb
2012-01-03 16:18:32 +00:00

42 lines
2.0 KiB
Plaintext

<% show_info = true if show_info.nil? %>
<div id=<%="note_#{note_item.id}"%>>
<table class="note_data">
<tr>
<% if show_info %>
<td class="avatar"><%= link_to avatar_to(note_item.source, :size => "32"), note_source_url(note_item.source), :id => "avatar" %></td>
<% end %>
<td class="name">
<div class="contextual">
<%= link_to(image_tag('edit.png'), {:controller => 'notes', :action => 'edit', :project_id => @project, :note_id => note_item}, :class => "delete", :title => l(:button_edit)) if note_item.editable_by?(User.current, @project) %>
<%= link_to_remote(image_tag('delete.png'),
:url => {:controller => :notes, :action => 'destroy', :note_id => note_item, :project_id => @project},
:method => :delete,
:confirm => l(:text_are_you_sure),
:html => {:class => "delete", :title => l(:button_delete) }) if note_item.destroyable_by?(User.current, @project) %>
</div>
<h4>
<%= note_type_icon(note_item) %>
<%= "#{note_item.subject} - " unless note_item.subject.blank? %>
<%= link_to_source(note_item.source) + "," if show_info %>
<%= authoring note_item.created_on, note_item.author %>
<%= link_to('&para;', {:controller => 'notes', :action => 'show', :project_id => @project, :note_id => note_item}, :title => l(:button_show), :class => "wiki-anchor") %>
</h4>
<div class="custom_fields">
<% note_item.custom_values.each do |custom_value| %>
<% if !custom_value.value.blank? %>
<p><%= custom_value.custom_field.name%>: <%=h show_value(custom_value) %></p>
<% end %>
<% end %>
</div>
<div class="wiki note">
<%= note_content(note_item) %>
<%= auto_thumbnails(note_item) %>
<%= render :partial => 'attachments/links', :locals => {:attachments => note_item.attachments, :options => {}} if note_item.attachments.any? %>
</div>
</td>
</tr>
</table>
</div>