a503e2b8ac
Be a little gentler in recovering from Instiki::ValidationErrors, when saving a page. Previously, we threw away all the user's changes upon the redirect. Now we attempt to salvage what he wrote.
24 lines
611 B
Plaintext
24 lines
611 B
Plaintext
<%- @title = "#{@page.plain_name} is locked" -%>
|
|
|
|
<p>
|
|
<%= link_to_page(h(@page.locked_by.purify)) %>
|
|
<%- if @page.lock_duration(Time.now) == 0 -%>
|
|
just started editing this page.
|
|
<%- else -%>
|
|
has been editing this page for <%= @page.lock_duration(Time.now) %> minutes.
|
|
<%- end -%>
|
|
</p>
|
|
|
|
<p>
|
|
<%= link_to 'Edit the page anyway',
|
|
{:web => @web_name, :action => 'edit', :id => @page.name, :params => {'break_lock' => '1'} },
|
|
{:accesskey => 'E'}
|
|
%>
|
|
|
|
<%= link_to 'Cancel',
|
|
{:web => @web_name, :action => 'show', :id => @page.name},
|
|
{:accesskey => 'C'}
|
|
%>
|
|
|
|
</p>
|