diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-07 21:52:31 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2011-12-07 21:52:31 +0000 |
commit | d19a0b70e0c3af4174f9d3303da89fa474999b78 (patch) | |
tree | 3426eb55fb9105a7f8709fe0c39e6bcccf5a81b8 | |
parent | 535b5ccf2b82173a4e127b62e0822b06035be827 (diff) | |
download | redmine-d19a0b70e0c3af4174f9d3303da89fa474999b78.tar.gz redmine-d19a0b70e0c3af4174f9d3303da89fa474999b78.zip |
Merged r7971 from trunk (#9682).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.2-stable@8116 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/wiki/show.rhtml | 4 | ||||
-rw-r--r-- | test/functional/wiki_controller_test.rb | 7 |
2 files changed, 9 insertions, 2 deletions
diff --git a/app/views/wiki/show.rhtml b/app/views/wiki/show.rhtml index 9b2f2de28..78aab42e4 100644 --- a/app/views/wiki/show.rhtml +++ b/app/views/wiki/show.rhtml @@ -46,8 +46,8 @@ <% end %> <% other_formats_links do |f| %> - <%= f.link_to 'HTML', :url => {:id => @page.title, :version => @content.version} %> - <%= f.link_to 'TXT', :url => {:id => @page.title, :version => @content.version} %> + <%= f.link_to 'HTML', :url => {:id => @page.title, :version => params[:version]} %> + <%= f.link_to 'TXT', :url => {:id => @page.title, :version => params[:version]} %> <% end if User.current.allowed_to?(:export_wiki_pages, @project) %> <% content_for :header_tags do %> diff --git a/test/functional/wiki_controller_test.rb b/test/functional/wiki_controller_test.rb index e32367b4f..7ea8510d7 100644 --- a/test/functional/wiki_controller_test.rb +++ b/test/functional/wiki_controller_test.rb @@ -43,6 +43,13 @@ class WikiControllerTest < ActionController::TestCase :child => { :tag => 'a', :attributes => { :href => '/projects/ecookbook/wiki/Page_with_an_inline_image' }, :content => 'Page with an inline image' } } end + + def test_export_link + Role.anonymous.add_permission! :export_wiki_pages + get :show, :project_id => 'ecookbook' + assert_response :success + assert_tag 'a', :attributes => {:href => '/projects/ecookbook/wiki/CookBook_documentation.txt'} + end def test_show_page_with_name get :show, :project_id => 1, :id => 'Another_page' |