<% if Redmine::VERSION.to_s > '2.3' extend Redmine::Pagination else extend ActionController::Pagination end source_id_cond = @contact.is_company ? Contact.visible.order_by_name.select(:id).find_all_by_company(@contact.first_name) << @contact.id : @contact.id @note = Note.new(:created_on => Time.now) @notes_pages, @notes = paginate :notes, :per_page => 30, :conditions => {:source_id => source_id_cond, :source_type => 'Contact'}, :include => [:attachments], :order => "#{Note.table_name}.created_on DESC" %> <% if authorize_for(:notes, :create) %>
<%= render :partial => 'notes/add', :locals => {:note_source => @contact} %>
<% end %> <% if @contact.is_public? || authorize_for(:notes, :show) %>
<%= render :partial => 'notes/note_item', :collection => @notes, :locals => {:show_info => @contact.is_company, :note_source => @contact} %>

<%= pagination_links_full @notes_pages %>

<% other_formats_links do |f| %> <%= f.link_to 'Atom', :url => params.merge(:key => User.current.rss_key) %> <% end %> <% end %>