You can change the page parent now at pages/edit.
* Increased text area size for better layout with the new feature. * Closes #39
This commit is contained in:
parent
7ec5381ca0
commit
8927a80246
4 changed files with 8 additions and 5 deletions
|
@ -60,6 +60,8 @@ class PagesController < ApplicationController
|
||||||
render :action => 'edit'
|
render :action => 'edit'
|
||||||
else
|
else
|
||||||
if @page.save
|
if @page.save
|
||||||
|
@page.parent_id = parent_id if (!params[:parent_id].blank? \
|
||||||
|
and params[:parent_id] != @page_id)
|
||||||
flash[:notice] = 'Seite wurde aktualisiert.'
|
flash[:notice] = 'Seite wurde aktualisiert.'
|
||||||
redirect_to wiki_page_path(@page.permalink)
|
redirect_to wiki_page_path(@page.permalink)
|
||||||
else
|
else
|
||||||
|
|
|
@ -82,7 +82,6 @@
|
||||||
- form_for @page do |f|
|
- form_for @page do |f|
|
||||||
= f.error_messages
|
= f.error_messages
|
||||||
= f.hidden_field :lock_version
|
= f.hidden_field :lock_version
|
||||||
= f.hidden_field :parent_id
|
|
||||||
%p
|
%p
|
||||||
%b Titel
|
%b Titel
|
||||||
%br/
|
%br/
|
||||||
|
@ -90,12 +89,14 @@
|
||||||
%p
|
%p
|
||||||
%b Inhalt
|
%b Inhalt
|
||||||
%br/
|
%br/
|
||||||
= f.text_area :body, :size => "60x30"
|
= f.text_area :body, :size => "65x30"
|
||||||
%p
|
%p
|
||||||
= f.submit "Vorschau", :name => 'preview'
|
= f.submit "Vorschau", :name => 'preview'
|
||||||
|
|
|
|
||||||
= f.submit "Speichern"
|
= f.submit "Speichern"
|
||||||
|
|
|
|
||||||
= link_to "Abbrechen", @page
|
= link_to "Abbrechen", @page
|
||||||
|
| Oberseite ändern:
|
||||||
|
= collection_select(:page, :parent_id, Page.all, :id, :permalink, {:prompt => "Neue Oberseite?"})
|
||||||
|
|
||||||
%div(style="clear:right; height:1px")
|
%div(style="clear:right; height:1px")
|
Loading…
Reference in a new issue