diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-02 10:50:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-02-02 10:50:31 +0000 |
commit | bea49ae24532284ca4ef9ce72733b78f77e480d5 (patch) | |
tree | af4cc8c8774e45178f737b7e3774979c04d13ffa /app/views | |
parent | 4abb82fd7bcdd2cdffdd8778a5d9e2fc6a3857dd (diff) | |
download | redmine-bea49ae24532284ca4ef9ce72733b78f77e480d5.tar.gz redmine-bea49ae24532284ca4ef9ce72733b78f77e480d5.zip |
Administrators can edit issue notes.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1105 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/issues/_history.rhtml | 2 | ||||
-rw-r--r-- | app/views/journals/_notes_form.rhtml | 7 | ||||
-rw-r--r-- | app/views/journals/edit.rjs | 3 | ||||
-rw-r--r-- | app/views/journals/update.rjs | 3 |
4 files changed, 14 insertions, 1 deletions
diff --git a/app/views/issues/_history.rhtml b/app/views/issues/_history.rhtml index bab37b4fd..edfb9b94d 100644 --- a/app/views/issues/_history.rhtml +++ b/app/views/issues/_history.rhtml @@ -8,6 +8,6 @@ <li><%= show_detail(detail) %></li> <% end %> </ul> - <%= textilizable(journal.notes) unless journal.notes.blank? %> + <%= render_notes(journal) unless journal.notes.blank? %> <% note_id += 1 %> <% end %> diff --git a/app/views/journals/_notes_form.rhtml b/app/views/journals/_notes_form.rhtml new file mode 100644 index 000000000..9baec03fa --- /dev/null +++ b/app/views/journals/_notes_form.rhtml @@ -0,0 +1,7 @@ +<% form_remote_tag(:url => {}, :html => { :id => "journal-#{@journal.id}-form" }) do %> + <%= text_area_tag :notes, @journal.notes, :class => 'wiki-edit', + :rows => (@journal.notes.blank? ? 10 : [[10, @journal.notes.length / 50].max, 100].min) %> + <p><%= submit_tag l(:button_save) %> + <%= link_to l(:button_cancel), '#', :onclick => "Element.remove('journal-#{@journal.id}-form'); " + + "Element.show('journal-#{@journal.id}-notes'); return false;" %></p> +<% end %> diff --git a/app/views/journals/edit.rjs b/app/views/journals/edit.rjs new file mode 100644 index 000000000..798cb0f04 --- /dev/null +++ b/app/views/journals/edit.rjs @@ -0,0 +1,3 @@ +page.hide "journal-#{@journal.id}-notes" +page.insert_html :after, "journal-#{@journal.id}-notes", + :partial => 'notes_form' diff --git a/app/views/journals/update.rjs b/app/views/journals/update.rjs new file mode 100644 index 000000000..9da0ebeae --- /dev/null +++ b/app/views/journals/update.rjs @@ -0,0 +1,3 @@ +page.replace "journal-#{@journal.id}-notes", render_notes(@journal) +page.show "journal-#{@journal.id}-notes" +page.remove "journal-#{@journal.id}-form" |