@@ -121,7 +121,7 @@ module Precious
|
|||||||
mustache :edit
|
mustache :edit
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
redirect "/create/#{CGI.escape(@name)}"
|
redirect to("/create/#{CGI.escape(@name)}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ module Precious
|
|||||||
@page = wiki.page(@name)
|
@page = wiki.page(@name)
|
||||||
wiki.delete_page(@page, { :message => "Destroyed #{@name} (#{@page.format})" })
|
wiki.delete_page(@page, { :message => "Destroyed #{@name} (#{@page.format})" })
|
||||||
|
|
||||||
redirect '/'
|
redirect to('/')
|
||||||
end
|
end
|
||||||
|
|
||||||
get '/create/*' do
|
get '/create/*' do
|
||||||
@@ -165,7 +165,7 @@ module Precious
|
|||||||
|
|
||||||
page = wiki.page(@name)
|
page = wiki.page(@name)
|
||||||
if page
|
if page
|
||||||
redirect "/#{page.escaped_url_path}"
|
redirect to("/#{page.escaped_url_path}")
|
||||||
else
|
else
|
||||||
mustache :create
|
mustache :create
|
||||||
end
|
end
|
||||||
@@ -346,7 +346,7 @@ module Precious
|
|||||||
file.raw_data
|
file.raw_data
|
||||||
else
|
else
|
||||||
page_path = [path, name].compact.join('/')
|
page_path = [path, name].compact.join('/')
|
||||||
redirect "/create/#{CGI.escape(page_path).gsub('%2F','/')}"
|
redirect to("/create/#{CGI.escape(page_path).gsub('%2F','/')}")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
<div id="footer">
|
<div id="footer">
|
||||||
<p id="last-edit">Last edited by <b>{{author}}</b>, {{date}}</p>
|
<p id="last-edit">Last edited by <b>{{author}}</b>, {{date}}</p>
|
||||||
<p>
|
<p>
|
||||||
<a id="delete-link" href="{{escaped_url_path}}" data-confirm="Are you sure you want to delete this page?"><span>Delete this Page</span></a>
|
<a id="delete-link" href="{{base_url}}/{{escaped_url_path}}" data-confirm="Are you sure you want to delete this page?"><span>Delete this Page</span></a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user