mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-06 07:51:48 +01:00
fix editing a note from the notes page
This commit is contained in:
parent
77e2ff0751
commit
94b5aa2346
10 changed files with 133 additions and 61 deletions
|
|
@ -4,39 +4,12 @@
|
|||
<h2><%= link_to(t('notes.note_header', :id => note.id.to_s), note_path(note), :title => t('notes.note_link_title', :id => note.id.to_s)) %></h2>
|
||||
|
||||
<div class="project_notes" id="<%= dom_id(note) %>">
|
||||
|
||||
<div class="note_boby"><%= format_note(note.body) %></div>
|
||||
|
||||
<div class="note_footer">
|
||||
<% # = link_to_remote(
|
||||
#image_tag("blank.png", :title =>t('notes.delete_note_title'), :class=>"delete_item", :id => "delete_note_"+note.id.to_s),
|
||||
#:url => note_path(note),
|
||||
#:html => {:class => 'delete_note', :title => "delete note"},
|
||||
#:method => :delete,
|
||||
#:confirm => t('notes.delete_confirmation', :id => note.id.to_s),
|
||||
#:before => visual_effect(:fade, dom_id(note, 'container'))) -
|
||||
%>
|
||||
|
||||
<%= link_to_delete_note(note, image_tag( "blank.png",:title => t('notes.delete_item_title'), :class=>"delete_item")) %>
|
||||
<%= link_to_edit_note(note, image_tag( "blank.png", :title => t('notes.edit_item_title'), :class=>"edit_item") ) %>
|
||||
|
||||
<%# link_to_function(image_tag( "blank.png", :title => t('notes.edit_item_title'), :class=>"edit_item"),
|
||||
#"$('##{dom_id(note)}').toggle(); $('##{dom_id(note, 'edit')}').show(); $('##{dom_id(note, 'edit_form')} textarea').focus();" ) + " | "
|
||||
%>
|
||||
|
||||
| <%= link_to("In: " + note.project.name, project_path(note.project), :class=>"footer_link" ) %> |
|
||||
|
||||
<%= Note.human_attribute_name('created_at') %>: <%= format_date(note.created_at) %>
|
||||
|
||||
<% if note.updated_at? -%>
|
||||
| <%= Note.human_attribute_name('updated_at') %>: <%= format_date(note.updated_at) %>
|
||||
<% end -%>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "notes/note_details", :object => note %>
|
||||
</div>
|
||||
|
||||
<div id="<%= dom_id(note, 'edit') %>" class="edit-form" style="display:none;">
|
||||
<div id="<%= dom_id(note, 'edit') %>" class="note-edit-form" style="display:none;">
|
||||
<%= render :partial => "notes/note_edit_form", :object => note %>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue