use new markup for wiki

pull/2612/head
Florian Kraft 10 years ago
parent dabad9153e
commit 9882a9492d
No known key found for this signature in database
GPG Key ID: 786CD08D94605A9E
  1. 23
      app/views/wiki/edit.html.erb
  2. 35
      app/views/wiki/new.html.erb

@ -30,20 +30,25 @@ See doc/COPYRIGHT.rdoc for more details.
<%= labelled_tabular_form_for @content, :as => :content, :url => {:action => 'update', :id => @page}, :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %>
<%= f.hidden_field :lock_version %>
<%= error_messages_for 'content' %>
<p>
<div class="form--field -required">
<%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit),
:value => format_text(@content, :text, :attachments => @content.page.attachments, :edit => true),
:'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json),
:'ng-non-bindable' => '' %>
</p>
<p>
</div>
<div class="form--field -required">
<%= f.text_field :comments, :size => 120 %>
</p>
<p><label><%= l(:label_attachment_plural) %></label><br />
<%= render :partial => 'attachments/form' %></p>
<p><%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= preview_link preview_project_wiki_path(@project, @page), 'wiki_form', class: 'button' %>
</p>
</div>
<div class="form--field">
<label>
<%= l(:label_attachment_plural) %>
</label>
<%= render :partial => 'attachments/form' %>
</div>
<hr>
<%= f.submit l(:button_save), class: 'button -highlight' %>
<%= preview_link preview_project_wiki_path(@project, @page), 'wiki_form', class: 'button' %>
<%= wikitoolbar_for 'content_text' %>
<% end %>
<div id="preview" class="wiki"></div>

@ -41,37 +41,30 @@ See doc/COPYRIGHT.rdoc for more details.
<%= error_messages_for 'page' %>
<div class="box">
<%= fields_for :page, @page do |page_fields| %>
<%= page_fields.hidden_field :parent_id %>
<p>
<%= page_fields.label :title%>
<br />
<div class="form--field -required">
<%= f.fields_for :page, @page do |page_fields| %>
<%= page_fields.hidden_field :parent_id %>
<%= page_fields.text_field :title, :size => 120 %>
</p>
<% end %>
<p>
<% end %>
</div>
<div class="form--field -required">
<%= f.text_area :text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit),
:'data-wp_autocomplete_url' => work_packages_auto_complete_path(:project_id => @project, :format => :json),
:'ng-non-bindable' => '' %>
</p>
</div>
<p>
<div class="form--field -required">
<%= f.text_field :comments, :size => 120 %>
</p>
</div>
<p>
<div class="form--field">
<label><%= l(:label_attachment_plural) %></label>
<br />
<%= render :partial => 'attachments/form', :f => f %>
</p>
</div>
</div>
<p>
<%= submit_tag l(:button_save), class: 'button -highlight' %>
<%= preview_link preview_wiki_path(@project), 'wiki_form', class: 'button' %>
</p>
<hr>
<%= f.submit l(:button_save), class: 'button -highlight' %>
<%= preview_link preview_wiki_path(@project), 'wiki_form', class: 'button' %>
<%= wikitoolbar_for 'content_text' %>
<% end %>

Loading…
Cancel
Save