Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 344
- Log:
Massive changeset which brings the old, ROOL customised Instiki
version up to date, but without any ROOL customisations in this
latest checked-in version (which is 0.19.1). This is deliberate,
so that it's easy to see the changes made for the ROOL version
in a subsequent changeset. The 'app/views/shared' directory is not
part of Instiki but is kept to maintain the change history with
updated ROOL customisations, some of which involve the same files
in that same directory.
- Author:
- rool
- Date:
- Sat Mar 19 19:52:13 +0000 2011
- Size:
- 3738 Bytes
1 | module WikiHelper |
2 | |
3 | def navigation_menu_for_revision |
4 | menu = [] |
5 | menu << forward |
6 | menu << back_for_revision if @revision_number > 1 |
7 | menu << current_revision |
8 | menu << see_or_hide_changes_for_revision if @revision_number > 1 |
9 | menu << history if @page.revisions.size > 1 |
10 | menu << rollback |
11 | menu |
12 | end |
13 | |
14 | def navigation_menu_for_page |
15 | menu = [] |
16 | menu << edit_page |
17 | menu << edit_web if @page.name == "HomePage" |
18 | if @page.revisions.size > 1 |
19 | menu << back_for_page |
20 | menu << see_or_hide_changes_for_page |
21 | end |
22 | menu << history if @page.revisions.size > 1 |
23 | menu |
24 | end |
25 | |
26 | def edit_page |
27 | link_text = (@page.name == "HomePage" ? 'Edit Page' : 'Edit') |
28 | link_to(link_text, {:web => @web.address, :action => 'edit', :id => @page.name}, |
29 | {:class => 'navlink', :accesskey => 'E', :id => 'edit', :rel => 'nofollow'}) |
30 | end |
31 | |
32 | def edit_web |
33 | link_to('Edit Web', {:web => @web.address, :action => 'edit_web'}, |
34 | {:class => 'navlink', :accesskey => 'W', :id => 'edit_web', :rel => 'nofollow'}) |
35 | end |
36 | |
37 | def history |
38 | link_to_history(@page, 'History', |
39 | {:class => 'navlink', :accesskey => 'S', :id => 'history', :rel => 'nofollow'}) |
40 | end |
41 | |
42 | def forward |
43 | if @revision_number < @page.revisions.size - 1 |
44 | link_to('Forward in time', |
45 | {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @revision_number + 1}, |
46 | {:class => 'navlink', :accesskey => 'F', :id => 'to_next_revision', :rel => 'nofollow'}) + |
47 | " <span class='revisions'>(#{@revision.page.revisions.size - @revision_number} more)</span> ".html_safe |
48 | else |
49 | link_to('Forward in time', {:web => @web.address, :action => 'show', :id => @page.name}, |
50 | {:class => 'navlink', :accesskey => 'F', :id => 'to_next_revision', :rel => 'nofollow'}) + |
51 | " <span class='revisions'>(to current)</span>".html_safe |
52 | end |
53 | end |
54 | |
55 | def back_for_revision |
56 | link_to('Back in time', |
57 | {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @revision_number - 1}, |
58 | {:class => 'navlink', :id => 'to_previous_revision', :rel => 'nofollow'}) + |
59 | " <span class='revisions'>(#{@revision_number - 1} more)</span>".html_safe |
60 | end |
61 | |
62 | def back_for_page |
63 | link_to('Back in time', |
64 | {:web => @web.address, :action => 'revision', :id => @page.name, |
65 | :rev => @page.revisions.size - 1}, |
66 | {:class => 'navlink', :accesskey => 'B', :id => 'to_previous_revision', :rel => 'nofollow'}) + |
67 | " <span class='revisions'>(#{@page.revisions.size - 1} #{@page.revisions.size - 1 == 1 ? 'revision' : 'revisions'})</span>".html_safe |
68 | end |
69 | |
70 | def current_revision |
71 | link_to('See current', {:web => @web.address, :action => 'show', :id => @page.name}, |
72 | {:class => 'navlink', :id => 'to_current_revision'}) |
73 | end |
74 | |
75 | def see_or_hide_changes_for_revision |
76 | link_to(@show_diff ? 'Hide changes' : 'See changes', |
77 | {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @revision_number, |
78 | :mode => (@show_diff ? nil : 'diff') }, |
79 | {:class => 'navlink', :accesskey => 'C', :id => 'see_changes', :rel => 'nofollow'}) |
80 | end |
81 | |
82 | def see_or_hide_changes_for_page |
83 | link_to(@show_diff ? 'Hide changes' : 'See changes', |
84 | {:web => @web.address, :action => 'show', :id => @page.name, :mode => (@show_diff ? nil : 'diff') }, |
85 | {:class => 'navlink', :accesskey => 'C', :id => 'see_changes', :rel => 'nofollow'}) |
86 | end |
87 | |
88 | def rollback |
89 | link_to('Rollback', |
90 | {:web => @web.address, :action => 'rollback', :id => @page.name, :rev => @revision_number}, |
91 | {:class => 'navlink', :id => 'rollback', :rel => 'nofollow'}) |
92 | end |
93 | |
94 | end |