2012-07-18 22:35:25 +04:00
|
|
|
<%= form_tag({:controller => 'journals', :action => 'edit', :id => @journal},
|
|
|
|
:remote => true,
|
|
|
|
: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) %>
|
2012-07-18 21:47:19 +04:00
|
|
|
<%= preview_link preview_edit_issue_path(:project_id => @project, :id => @journal.issue),
|
|
|
|
"journal-#{@journal.id}-form",
|
|
|
|
"journal_#{@journal.id}_preview" %> |
|
2012-07-22 17:29:26 +04:00
|
|
|
<%= link_to l(:button_cancel), '#', :onclick => "$('#journal-#{@journal.id}-form').remove(); $('#journal-#{@journal.id}-notes').show(); 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" %>
|