summaryrefslogtreecommitdiffstats
path: root/app/views/wiki/diff.rhtml
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-07-14 11:25:03 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-07-14 11:25:03 +0000
commit5e20417e6d523372320861f1d9a446ddd75e041f (patch)
tree9f276a706577f6959fb7465e00e74c3f69258c6e /app/views/wiki/diff.rhtml
parentbf74efcd1159d9872cdbdc55e9b859c3b2928ffc (diff)
downloadredmine-5e20417e6d523372320861f1d9a446ddd75e041f.tar.gz
redmine-5e20417e6d523372320861f1d9a446ddd75e041f.zip
Added wiki diff.
Diff can be viewed from the page history, or directly from the project activity page for each edit. Uses Lars Christensen's diff library. git-svn-id: http://redmine.rubyforge.org/svn/trunk@583 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/wiki/diff.rhtml')
-rw-r--r--app/views/wiki/diff.rhtml19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/views/wiki/diff.rhtml b/app/views/wiki/diff.rhtml
new file mode 100644
index 000000000..8db2df008
--- /dev/null
+++ b/app/views/wiki/diff.rhtml
@@ -0,0 +1,19 @@
+<div class="contextual">
+<%= link_to(l(:button_edit), {:action => 'edit', :page => @page.title}, :class => 'icon icon-edit') %>
+<%= link_to(l(:label_history), {:action => 'history', :page => @page.title}, :class => 'icon icon-history') %>
+<%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
+</div>
+
+<h2><%= @page.pretty_title %></h2>
+
+<p>
+<%= l(:label_version) %> <%= link_to @diff.content_from.version, :action => 'index', :page => @page.title, :version => @diff.content_from.version %>
+<em>(<%= @diff.content_from.author ? @diff.content_from.author.name : "anonyme" %>, <%= format_time(@diff.content_from.updated_on) %>)</em>
+&#8594;
+<%= l(:label_version) %> <%= link_to @diff.content_to.version, :action => 'index', :page => @page.title, :version => @diff.content_to.version %>/<%= @page.content.version %>
+<em>(<%= @diff.content_to.author ? @diff.content_to.author.name : "anonyme" %>, <%= format_time(@diff.content_to.updated_on) %>)</em>
+</p>
+
+<hr />
+
+<%= html_diff(@diff) %>