diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-25 17:17:49 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-04-25 17:17:49 +0000 |
commit | 5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7 (patch) | |
tree | 93e57765139714bd82dede475725516c448c0d55 /app/views/wiki | |
parent | 34e20c4373b7f5a20ab3a132feae3f70f21ec477 (diff) | |
download | redmine-5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7.tar.gz redmine-5e57a1a9d9478162ac4f27ae96b2ccaf55a1aba7.zip |
Merged rails-3.2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/wiki')
-rw-r--r-- | app/views/wiki/_sidebar.html.erb | 2 | ||||
-rw-r--r-- | app/views/wiki/destroy.html.erb | 2 | ||||
-rw-r--r-- | app/views/wiki/edit.html.erb | 6 | ||||
-rw-r--r-- | app/views/wiki/history.html.erb | 4 | ||||
-rw-r--r-- | app/views/wiki/rename.html.erb | 4 | ||||
-rw-r--r-- | app/views/wiki/show.html.erb | 5 |
6 files changed, 14 insertions, 9 deletions
diff --git a/app/views/wiki/_sidebar.html.erb b/app/views/wiki/_sidebar.html.erb index 9a24963f2..b4034d88b 100644 --- a/app/views/wiki/_sidebar.html.erb +++ b/app/views/wiki/_sidebar.html.erb @@ -6,4 +6,4 @@ <%= link_to l(:field_start_page), {:action => 'show', :id => nil} %><br /> <%= link_to l(:label_index_by_title), {:action => 'index'} %><br /> -<%= link_to l(:label_index_by_date), {:action => 'date_index'} %><br /> +<%= link_to l(:label_index_by_date), {:controller => 'wiki', :project_id => @project, :action => 'date_index'} %><br /> diff --git a/app/views/wiki/destroy.html.erb b/app/views/wiki/destroy.html.erb index a3cc476bf..05c0fd56d 100644 --- a/app/views/wiki/destroy.html.erb +++ b/app/views/wiki/destroy.html.erb @@ -2,7 +2,7 @@ <h2><%=h @page.pretty_title %></h2> -<% form_tag({}, :method => :delete) do %> +<%= form_tag({}, :method => :delete) do %> <div class="box"> <p><strong><%= l(:text_wiki_page_destroy_question, :descendants => @descendants_count) %></strong></p> <p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_wiki_page_nullify_children) %></label><br /> diff --git a/app/views/wiki/edit.html.erb b/app/views/wiki/edit.html.erb index 281657990..51d8ab94e 100644 --- a/app/views/wiki/edit.html.erb +++ b/app/views/wiki/edit.html.erb @@ -2,7 +2,7 @@ <h2><%= h @page.pretty_title %></h2> -<% form_for :content, @content, +<%= form_for @content, :as => :content, :url => {:action => 'update', :id => @page.title}, :html => {:method => :put, :multipart => true, :id => 'wiki_form'} do |f| %> <%= f.hidden_field :version %> @@ -16,10 +16,10 @@ <%= text_area_tag 'content[text]', @text, :cols => 100, :rows => 25, :class => 'wiki-edit', :accesskey => accesskey(:edit) %> <% if @page.safe_attribute_names.include?('parent_id') && @wiki.pages.any? %> - <% fields_for @page do |fp| %> + <%= fields_for @page do |fp| %> <p> <label><%= l(:field_parent_title) %></label> - <%= fp.select :parent_id, "<option value=''></option>" + wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent) %> + <%= fp.select :parent_id, content_tag('option', '', :value => '') + wiki_page_options_for_select(@wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent) %> </p> <% end %> <% end %> diff --git a/app/views/wiki/history.html.erb b/app/views/wiki/history.html.erb index cfbf64154..fa9effd1a 100644 --- a/app/views/wiki/history.html.erb +++ b/app/views/wiki/history.html.erb @@ -4,7 +4,9 @@ <h3><%= l(:label_history) %></h3> -<% form_tag({:controller => 'wiki', :action => 'diff', :project_id => @page.project, :id => @page.title}, :method => :get) do %> +<%= form_tag({:controller => 'wiki', :action => 'diff', + :project_id => @page.project, :id => @page.title}, + :method => :get) do %> <table class="list wiki-page-versions"> <thead><tr> <th>#</th> diff --git a/app/views/wiki/rename.html.erb b/app/views/wiki/rename.html.erb index fea76383a..86385a94b 100644 --- a/app/views/wiki/rename.html.erb +++ b/app/views/wiki/rename.html.erb @@ -4,14 +4,14 @@ <%= error_messages_for 'page' %> -<% labelled_form_for :wiki_page, @page, +<%= labelled_form_for :wiki_page, @page, :url => { :action => 'rename' }, :html => { :method => :post } do |f| %> <div class="box tabular"> <p><%= f.text_field :title, :required => true, :size => 100 %></p> <p><%= f.check_box :redirect_existing_links %></p> <p><%= f.select :parent_id, - "<option value=''></option>" + + content_tag('option', '', :value => '') + wiki_page_options_for_select( @wiki.pages.all(:include => :parent) - @page.self_and_descendants, @page.parent), diff --git a/app/views/wiki/show.html.erb b/app/views/wiki/show.html.erb index 19215bb98..0ef8fc869 100644 --- a/app/views/wiki/show.html.erb +++ b/app/views/wiki/show.html.erb @@ -42,7 +42,10 @@ <div id="wiki_add_attachment"> <p><%= link_to l(:label_attachment_new), {}, :onclick => "Element.show('add_attachment_form'); Element.hide(this); Element.scrollTo('add_attachment_form'); return false;", :id => 'attach_files_link' %></p> -<% form_tag({ :controller => 'wiki', :action => 'add_attachment', :project_id => @project, :id => @page.title }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %> +<%= form_tag({:controller => 'wiki', :action => 'add_attachment', + :project_id => @project, :id => @page.title}, + :multipart => true, :id => "add_attachment_form", + :style => "display:none;") do %> <div class="box"> <p><%= render :partial => 'attachments/form' %></p> </div> |