blob: 28bab018f7f76fd38e622b82a401c6aff7af254a [file] [log] [blame]
<% @overview = "Use this form to create a new page in site #{link_to_site(@wiki)}" %>
<%= error_messages_for 'new_page' %>
<% unless @templates.empty? %>
<% tabular_form_for :page, @new_page, :url => {:site_folder => params[:site_folder], :id => params[:id], :action => 'new'} do |f| %>
<%= f.text_field :presentation_name %>
<%= f.hidden_field :tool, :value => 'Wiki' %>
<%= f.text_area :note, :cols => 60, :rows => 8 %>
<tr>
<th align="right">Template</th>
<td><ul>
<% for template in @templates %>
<% if template.page.presentation_name != 'Templates' %>
<li style = "list-style-type:none"><%= radio_button(:page, :source_version, template.id) %>
<% if template.template? %>
<%= link_to_function("#{template.page.presentation_name.gsub(' Template','')}") do |page|
page.visual_effect :toggle_appear, "#{template.id}"
end %>
[<%= link_to 'View', '/' + template.wiki.rel_path + '/' + template.page.rel_path, :popup => true %>]
<p id="<%= template.id %>" style="display:none;"><%= template.uma_type_descr %></p>
<% else %>
<%= "#{template.page.presentation_name} (version #{template.version} from #{template.wiki.title})" %>
<% end %>
</li>
<% end %>
<% end %>
</ul>
</td>
</tr>
<tr><th></th><td><%= submit_tag "Submit" %></td></tr>
<% end %>
<% end %>