fixes #971
This commit is contained in:
@@ -57,6 +57,7 @@ class WikiPagesController < ApplicationController
|
|||||||
@wiki_page = WikiPage.find(params[:id])
|
@wiki_page = WikiPage.find(params[:id])
|
||||||
@version = WikiPageVersion.find(params[:version_id])
|
@version = WikiPageVersion.find(params[:version_id])
|
||||||
@wiki_page.revert_to!(@version)
|
@wiki_page.revert_to!(@version)
|
||||||
|
flash[:notice] = "Page was reverted"
|
||||||
respond_with(@wiki_page)
|
respond_with(@wiki_page)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th width="2%"></th>
|
<th width="2%"></th>
|
||||||
<th width="2%"></th>
|
<th width="2%"></th>
|
||||||
<th width="60%">Title</th>
|
<th width="55%">Title</th>
|
||||||
|
<th width="5%"></th>
|
||||||
<th width="10%">IP Address</th>
|
<th width="10%">IP Address</th>
|
||||||
<th width="26%">Last edited</th>
|
<th width="26%">Last edited</th>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -29,14 +30,15 @@
|
|||||||
<%= radio_button_tag "otherpage", wiki_page_version.id %>
|
<%= radio_button_tag "otherpage", wiki_page_version.id %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td><%= link_to wiki_page_version.title, wiki_page_path(wiki_page_version.wiki_page_id) %></td>
|
<td><%= link_to wiki_page_version.title, wiki_page_version_path(wiki_page_version) %></td>
|
||||||
|
<td><%= link_to "wiki", wiki_page_path(wiki_page_version.wiki_page_id) %></td>
|
||||||
<td>
|
<td>
|
||||||
<% if CurrentUser.is_admin? %>
|
<% if CurrentUser.is_admin? %>
|
||||||
<%= wiki_page_version.updater_ip_addr %>
|
<%= wiki_page_version.updater_ip_addr %>
|
||||||
<% end %>
|
<% end %>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<%= link_to wiki_page_version.updated_at.strftime("%Y-%m-%d %I:%M"), wiki_page_version_path(wiki_page_version) %>
|
<%= compact_time(wiki_page_version.updated_at) %>
|
||||||
<% if wiki_page_version.updater %>
|
<% if wiki_page_version.updater %>
|
||||||
by
|
by
|
||||||
<%= link_to wiki_page_version.updater_name, user_path(wiki_page_version.updater) %>
|
<%= link_to wiki_page_version.updater_name, user_path(wiki_page_version.updater) %>
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
<div id="wiki-page-body" class="dtext prose">
|
<div id="wiki-page-body" class="dtext prose">
|
||||||
<%= format_text(@wiki_page_version.body) %>
|
<%= format_text(@wiki_page_version.body) %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<p><%= link_to "Revert to this version", revert_wiki_page_path(@wiki_page_version.wiki_page_id, :version_id => @wiki_page_version.id), :method => :put %></p>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user