Added page-preview feature to wiki module.

This commit is contained in:
Benjamin Meichsner 2009-05-20 12:42:01 +02:00
parent 0fb8ee214f
commit 7de45543c4
7 changed files with 36 additions and 21 deletions

View file

@ -0,0 +1 @@
= wikified_body @page.body

View file

@ -1,3 +1,7 @@
- if params[:preview]
%h2 Vorschau
#preview= render :partial => 'body'
#wiki-syntax-help{:style => "float:right"}
%p
%b Schnelle Formatierungshilfe
@ -25,6 +29,8 @@
%br/
= f.text_area :body, :size => "60x30"
%p
= f.submit "Vorschau", :name => 'preview'
|
= f.submit "Speichern"
|
= link_to "Abbrechen", :back

View file

@ -11,7 +11,7 @@
= "(#{User.find(version.updated_by).nick})"
= wikified_body @page.body
= render :partial => 'body'
%hr.clear/
%p