diff --git a/app/helpers/wiki_helper.rb b/app/helpers/wiki_helper.rb index 000acc05..07d614a8 100644 --- a/app/helpers/wiki_helper.rb +++ b/app/helpers/wiki_helper.rb @@ -24,23 +24,23 @@ module WikiHelper def edit_page link_text = (@page.name == "HomePage" ? 'Edit Page' : 'Edit') link_to(link_text, {:web => @web.address, :action => 'edit', :id => @page.name}, - {:class => 'navlink', :accesskey => 'E', :id => 'edit'}) + {:class => 'navlink', :accesskey => 'E', :id => 'edit', :rel => 'nofollow'}) end def edit_web link_to('Edit Web', {:web => @web.address, :action => 'edit_web'}, - {:class => 'navlink', :accesskey => 'W', :id => 'edit_web'}) + {:class => 'navlink', :accesskey => 'W', :id => 'edit_web', :rel => 'nofollow'}) end def forward if @revision_number < @page.revisions.length - 1 link_to('Forward in time', {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @revision_number + 1}, - {:class => 'navlink', :accesskey => 'F', :id => 'to_next_revision'}) + + {:class => 'navlink', :accesskey => 'F', :id => 'to_next_revision', :rel => 'nofollow'}) + " (#{@revision.page.revisions.length - @revision_number} more) " else link_to('Forward in time', {:web => @web.address, :action => 'show', :id => @page.name}, - {:class => 'navlink', :accesskey => 'F', :id => 'to_next_revision'}) + + {:class => 'navlink', :accesskey => 'F', :id => 'to_next_revision', :rel => 'nofollow'}) + " (to current)" end end @@ -48,7 +48,7 @@ module WikiHelper def back_for_revision link_to('Back in time', {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @revision_number - 1}, - {:class => 'navlink', :id => 'to_previous_revision'}) + + {:class => 'navlink', :id => 'to_previous_revision', :rel => 'nofollow'}) + " (#{@revision_number - 1} more)" end @@ -56,7 +56,7 @@ module WikiHelper link_to('Back in time', {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @page.revisions.length - 1}, - {:class => 'navlink', :accesskey => 'B', :id => 'to_previous_revision'}) + + {:class => 'navlink', :accesskey => 'B', :id => 'to_previous_revision', :rel => 'nofollow'}) + " (#{@page.revisions.length - 1} #{@page.revisions.length - 1 == 1 ? 'revision' : 'revisions'})" end @@ -69,19 +69,19 @@ module WikiHelper link_to(@show_diff ? 'Hide changes' : 'See changes', {:web => @web.address, :action => 'revision', :id => @page.name, :rev => @revision_number, :mode => (@show_diff ? nil : 'diff') }, - {:class => 'navlink', :accesskey => 'C', :id => 'see_changes'}) + {:class => 'navlink', :accesskey => 'C', :id => 'see_changes', :rel => 'nofollow'}) end def see_or_hide_changes_for_page link_to(@show_diff ? 'Hide changes' : 'See changes', {:web => @web.address, :action => 'show', :id => @page.name, :mode => (@show_diff ? nil : 'diff') }, - {:class => 'navlink', :accesskey => 'C', :id => 'see_changes'}) + {:class => 'navlink', :accesskey => 'C', :id => 'see_changes', :rel => 'nofollow'}) end def rollback link_to('Rollback', {:web => @web.address, :action => 'rollback', :id => @page.name, :rev => @revision_number}, - {:class => 'navlink', :id => 'rollback'}) + {:class => 'navlink', :id => 'rollback', :rel => 'nofollow'}) end diff --git a/app/views/wiki/page.rhtml b/app/views/wiki/page.rhtml index 277c1cae..86155e8e 100644 --- a/app/views/wiki/page.rhtml +++ b/app/views/wiki/page.rhtml @@ -34,11 +34,11 @@ | Views: <%= link_to('Print', { :web => @web.address, :action => 'print', :id => @page.name }, - { :accesskey => 'p', :id => 'view_print' }) %> + { :accesskey => 'p', :id => 'view_print', :rel => 'nofollow' }) %> <% if @web.markup == :markdownMML or @web.markup == :markdown %> | <%= link_to 'TeX', {:web => @web.address, :action => 'tex', :id => @page.name}, - {:id => 'view_tex'} %> + {:id => 'view_tex', :rel => 'nofollow' } %> <% if WikiReference.pages_in_category(@web, 'S5-slideshow').map.include?(@page.name) %> | <%= link_to 'S5', {:web => @web.address, :action => 's5', :id => @page.name},