<% #-- # 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), project_page_path(@project, @page.title) -%>

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

The page "<%=h params[:id] -%>" doesn't exist yet, you can create it below if you like.

<% end -%> <% end -%> <% form_for [@project, @page] 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" -%>
<%= button_to_function("Show preview", "toggle_wiki_preview('#{preview_project_page_path(@project,@page)}')", :id => "wiki_preview_toggler") %> <%= f.submit -%> <%= t("views.pages.or_back_to_page", :page_link => link_to(@page.title, project_page_path(@project, @page.title))) -%> <% end -%>