summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-03-15 14:07:04 +0100
committerhukl <contact@smyck.org>2009-03-15 14:07:04 +0100
commita936993a5a7bbe7bb4f679d3adc059929cd0d7c5 (patch)
tree4913c2909cf698a2bf0e1b5fc552f6c2454d882c /app/views
parentc9fa047402fdc009319dca7b05455e8ce73eaee7 (diff)
first revision and diff interface
Diffstat (limited to 'app/views')
-rw-r--r--app/views/revisions/diff.html.erb27
-rw-r--r--app/views/revisions/index.html.erb2
-rw-r--r--app/views/revisions/show.html.erb2
3 files changed, 31 insertions, 0 deletions
diff --git a/app/views/revisions/diff.html.erb b/app/views/revisions/diff.html.erb
new file mode 100644
index 0000000..bcbf560
--- /dev/null
+++ b/app/views/revisions/diff.html.erb
@@ -0,0 +1,27 @@
1<h1>Revisions#diff</h1>
2
3<% form_tag url_for(:action => :diff), :method => :get do %>
4 <%= select_tag :start, options_for_select(@node.pages.map{|x| x.revision}, params[:start].to_i) %>
5 <%= select_tag :end, options_for_select(@node.pages.map{|x| x.revision}, params[:end].to_i) %>
6 <%= submit_tag 'Diff' %>
7<% end %>
8
9<div id="start_text" style="display: none;">
10 <%= (@start.body) %>
11</div>
12
13<div id="end_text" style="display: none;">
14 <%= (@end.body) %>
15</div>
16
17
18<%= javascript_include_tag 'cacycle_diff' %>
19<script type="text/javascript" charset="utf-8">
20 window.onload = function() {
21 text1 = document.getElementById('start_text').innerHTML;
22 text2 = document.getElementById('end_text').innerHTML;
23 document.getElementById('diffview').innerHTML = WDiffString(text1, text2);
24 }
25</script>
26
27<div id="diffview"></div> \ No newline at end of file
diff --git a/app/views/revisions/index.html.erb b/app/views/revisions/index.html.erb
new file mode 100644
index 0000000..b41a77c
--- /dev/null
+++ b/app/views/revisions/index.html.erb
@@ -0,0 +1,2 @@
1<h1>Revisions#index</h1>
2<p>Find me in app/views/revisions/index.html.erb</p>
diff --git a/app/views/revisions/show.html.erb b/app/views/revisions/show.html.erb
new file mode 100644
index 0000000..20fc39c
--- /dev/null
+++ b/app/views/revisions/show.html.erb
@@ -0,0 +1,2 @@
1<h1>Revisions#show</h1>
2<p>Find me in app/views/revisions/show.html.erb</p>