<% #-- # Copyright (C) 2009 Johan Sørensen # Copyright (C) 2009 Marius Mathiesen # Copyright (C) 2009 Tor Arne Vestbø # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Affero General Public License for more details. # # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . #++ %> <%= breadcrumbs_from(@root) -%>

<%= @page.new? ? t("views.common.creating") : t("views.common.editing") -%> <%= t("views.pages.page") -%> <%= link_to h(@page.title), site_wiki_page_path(@page.title) -%>

<% if @page.new? -%> <%= help_box(:middle, :error) do -%>

The page "<%=h params[:id] -%>" does not exist yet. You can create it below if you like.

<% end -%> <% end -%> <%= form_for @page, :url => { :action => "update" } do |f| -%>

<%= t("views.common.markdown_format_with_help") -%> <%= t("views.pages.wikiwords_syntax") -%>

<%= render_markdown_help -%>

<%= f.text_area :content, :class => "text fill taller" -%>
<%= f.submit -%> <%= button_to_function("Show preview", "toggle_wiki_preview('#{preview_site_wiki_page_path(@page)}')", :id => "wiki_preview_toggler", :class => "preview") %> <%= t("views.pages.or_back_to_page", :page_link => link_to(@page.title, site_wiki_page_path(@page.title))) -%> <% end -%>