tracks/app/views/notes/_notes.rhtml
bsag 2ac1a14c04 Merge branch 'svn-tracking' to svn rev 856
* svn-tracking:
  Removed outer tracks directory.
  regenerates compressed stylesheet
  adds a search textbox in the menu at top-right
  updates the compressed stylesheet because of changed of last commit
  adds search to tracks. you can search now on todos, projects and notes. This patch was contributed by Jeffrey Gipson. Thanks Jeffrey!

Conflicts:

	README
	README_FIRST
	app/controllers/todos_controller.rb
	app/helpers/todos_helper.rb
	app/models/todo.rb
	app/views/layouts/standard.html.erb
	app/views/notes/_notes.rhtml
	app/views/projects/_project.rhtml
	app/views/projects/_project_listing.rhtml
	app/views/todos/_todo.html.erb
	public/stylesheets/standard.css
	test/functional/todos_controller_test.rb
	tracks/README_FIRST
2008-05-24 16:53:10 +01:00

39 lines
1.9 KiB
Text

<% note = notes -%>
<div id="<%= dom_id(note, 'container') %>">
<h2><%= link_to("Note #{note.id}", note_path(note), :title => "Show note #{note.id}" ) %></h2>
<div id="<%= dom_id(note) %>">
<%= sanitize(textilize(note.body)) %>
<div class="note_footer">
<%= link_to_remote(
image_tag("blank.png",
:title =>"Delete this note",
:class=>"delete_item",
:id => "delete_note_"+note.id.to_s),
:update => dom_id(note),
:loading => visual_effect(:fade, dom_id(note, 'container')),
:complete => "Element.remove('#{dom_id(note, 'container')}');",
:url => note_path(note),
:method => :delete,
:confirm => "Are you sure that you want to delete the note \'#{note.id.to_s}\'?" ) + "&nbsp;" -%>
<%= link_to_function(image_tag( "blank.png", :title => "Edit item", :class=>"edit_item"),
"Element.toggle('#{dom_id(note)}'); Element.toggle('#{dom_id(note, 'edit')}'); Effect.Appear('#{dom_id(note, 'edit')}'); Form.focusFirstElement('#{dom_id(note, 'edit_form')}');" ) + " | " %>
<%= link_to("In: " + note.project.name, project_path(note.project), :class=>"footer_link" ) %>&nbsp;|&nbsp;
Created: <%= format_date(note.created_at) %>
<% if note.updated_at? -%>
&nbsp;|&nbsp;Modified: <%= format_date(note.updated_at) %>
<% end -%>
</div>
</div>
<div id="<%= dom_id(note, 'edit') %>" class="edit-form" style="display:none;">
<% form_remote_tag :url => note_path(note),
:method => :put,
:html => { :id => dom_id(note, 'edit_form'), :class => "inline-form" },
:update => dom_id(note, 'container'),
:complete => visual_effect(:appear, dom_id(note, 'container')) do -%>
<%= render :partial => "notes/note_edit_form", :object => note %>
<% end -%>
</div>
</div>
<% note = nil -%>