2008-02-02 13:50:31 +03:00
|
|
|
<% form_remote_tag(:url => {}, :html => { :id => "journal-#{@journal.id}-form" }) do %>
|
2011-10-29 05:23:23 +04:00
|
|
|
<%= label_tag "notes", l(:description_notes), :class => "hidden-for-sighted" %>
|
2011-03-29 00:04:48 +04:00
|
|
|
<%= text_area_tag :notes, @journal.notes,
|
|
|
|
:id => "journal_#{@journal.id}_notes",
|
2011-09-15 13:26:29 +04:00
|
|
|
:class => 'wiki-edit',
|
2011-03-29 00:04:48 +04:00
|
|
|
:rows => (@journal.notes.blank? ? 10 : [[10, @journal.notes.length / 50].max, 100].min) %>
|
2008-12-11 02:44:22 +03:00
|
|
|
<%= call_hook(:view_journals_notes_form_after_notes, { :journal => @journal}) %>
|
2008-02-02 13:50:31 +03:00
|
|
|
<p><%= submit_tag l(:button_save) %>
|
2011-09-15 13:26:29 +04:00
|
|
|
<%= link_to_remote l(:label_preview),
|
2012-02-16 02:49:03 +04:00
|
|
|
{ :url => preview_edit_issue_path(:project_id => @project, :id => @journal.issue),
|
2011-03-29 01:45:30 +04:00
|
|
|
:method => 'post',
|
|
|
|
:update => "journal_#{@journal.id}_preview",
|
|
|
|
:with => "Form.serialize('journal-#{@journal.id}-form')",
|
|
|
|
:complete => "Element.scrollTo('journal_#{@journal.id}_preview')"
|
|
|
|
}, :accesskey => accesskey(:preview) %>
|
|
|
|
|
|
2008-02-02 13:50:31 +03:00
|
|
|
<%= link_to l(:button_cancel), '#', :onclick => "Element.remove('journal-#{@journal.id}-form'); " +
|
|
|
|
"Element.show('journal-#{@journal.id}-notes'); return false;" %></p>
|
2011-03-29 01:45:30 +04:00
|
|
|
|
|
|
|
<div id="journal_<%= @journal.id %>_preview" class="wiki"></div>
|
2008-02-02 13:50:31 +03:00
|
|
|
<% end %>
|
2011-03-29 00:04:48 +04:00
|
|
|
<%= wikitoolbar_for "journal_#{@journal.id}_notes" %>
|