add wiki diff
This commit is contained in:
13
app/views/wiki_page_versions/diff.html.erb
Normal file
13
app/views/wiki_page_versions/diff.html.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
<div id="c-wiki-pages">
|
||||
<div id="a-diff">
|
||||
<h1>Wiki Page: <%= @thispage.title %></h1>
|
||||
|
||||
<p>Showing differences between <%= compact_time @thispage.created_at %> (<%= link_to @thispage.updater.name, user_path(@thispage.updater) %>) and <%= compact_time @otherpage.created_at %> (<%= link_to @otherpage.updater.name, user_path(@otherpage.updater) %>)</p>
|
||||
|
||||
<div>
|
||||
<%= wiki_page_diff(@thispage, @otherpage) %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "wiki_pages/secondary_links" %>
|
||||
@@ -5,34 +5,42 @@
|
||||
<section id="content">
|
||||
<h1>Wiki Pages</h1>
|
||||
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="60%">Title</th>
|
||||
<th width="10%">IP Address</th>
|
||||
<th width="30%">Last edited</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wiki_page_versions.each do |wiki_page_version| %>
|
||||
<%= form_tag(diff_wiki_page_versions_path, :method => :get) do %>
|
||||
<table width="100%" class="striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><%= wiki_page_version.title %></td>
|
||||
<td>
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<%= wiki_page_version.updater_ip_addr %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to wiki_page_version.updated_at.strftime("%Y-%m-%d %I:%M"), wiki_page_version_path(wiki_page_version) %>
|
||||
<% if wiki_page_version.updater %>
|
||||
by
|
||||
<%= link_to wiki_page_version.updater_name, user_path(wiki_page_version.updater) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<th width="2%"></th>
|
||||
<th width="2%"></th>
|
||||
<th width="60%">Title</th>
|
||||
<th width="10%">IP Address</th>
|
||||
<th width="26%">Last edited</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% @wiki_page_versions.each do |wiki_page_version| %>
|
||||
<tr>
|
||||
<td><%= radio_button_tag "thispage", wiki_page_version.id %></td>
|
||||
<td><%= radio_button_tag "otherpage", wiki_page_version.id %></td>
|
||||
<td><%= wiki_page_version.title %></td>
|
||||
<td>
|
||||
<% if CurrentUser.is_admin? %>
|
||||
<%= wiki_page_version.updater_ip_addr %>
|
||||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to wiki_page_version.updated_at.strftime("%Y-%m-%d %I:%M"), wiki_page_version_path(wiki_page_version) %>
|
||||
<% if wiki_page_version.updater %>
|
||||
by
|
||||
<%= link_to wiki_page_version.updater_name, user_path(wiki_page_version.updater) %>
|
||||
<% end %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<%= submit_tag "Diff" %>
|
||||
<% end %>
|
||||
|
||||
<%= numbered_paginator(@wiki_page_versions) %>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user