Commit 028b435a authored by jplang's avatar jplang

Kepp the arguments clean (#26043).

git-svn-id: https://svn.redmine.org/redmine/trunk@16775 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent f2d84ded
...@@ -70,7 +70,7 @@ class WikiController < ApplicationController ...@@ -70,7 +70,7 @@ class WikiController < ApplicationController
@page.title = '' unless editable? @page.title = '' unless editable?
@page.validate @page.validate
if @page.errors[:title].blank? if @page.errors[:title].blank?
path = project_wiki_page_path(:project_id => @project, :id => @page.title, :parent => params[:parent]) path = project_wiki_page_path(@project, @page.title, :parent => params[:parent])
respond_to do |format| respond_to do |format|
format.html { redirect_to path } format.html { redirect_to path }
format.js { render :js => "window.location = #{path.to_json}" } format.js { render :js => "window.location = #{path.to_json}" }
......
<h3 class="title"><%=l(:label_wiki_page_new)%></h3> <h3 class="title"><%=l(:label_wiki_page_new)%></h3>
<%= labelled_form_for :page, @page, <%= labelled_form_for :page, @page,
:url => new_project_wiki_page_path(:project_id => @project, :parent => params[:parent]), :url => new_project_wiki_page_path(@project, :parent => params[:parent]),
:method => 'post', :method => 'post',
:remote => true do |f| %> :remote => true do |f| %>
......
<div class="contextual"> <div class="contextual">
<% if User.current.allowed_to?(:edit_wiki_pages, @project) %> <% if User.current.allowed_to?(:edit_wiki_pages, @project) %>
<%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(:project_id => @project, :parent => @page.title), :remote => true, :class => 'icon icon-add' %> <%= link_to l(:label_wiki_page_new), new_project_wiki_page_path(@project, :parent => @page.title), :remote => true, :class => 'icon icon-add' %>
<% end %> <% end %>
<% if @editable %> <% if @editable %>
<% if @content.current_version? %> <% if @content.current_version? %>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment