Hiding the View Differences button when a wiki page's history only has one version.
Patch contributed by Chaoqun Zou (#1743) git-svn-id: http://redmine.rubyforge.org/svn/trunk@1749 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a899904f63
commit
af6b01f55d
|
@ -30,6 +30,6 @@
|
|||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= submit_tag l(:label_view_diff), :class => 'small' %>
|
||||
<%= submit_tag l(:label_view_diff), :class => 'small' if show_diff %>
|
||||
<span class="pagination"><%= pagination_links_full @version_pages, @version_count, :page_param => :p %></span>
|
||||
<% end %>
|
||||
|
|
|
@ -109,6 +109,16 @@ class WikiControllerTest < Test::Unit::TestCase
|
|||
assert_template 'history'
|
||||
assert_not_nil assigns(:versions)
|
||||
assert_equal 3, assigns(:versions).size
|
||||
assert_select "input[type=submit][name=commit]"
|
||||
end
|
||||
|
||||
def test_history_with_one_version
|
||||
get :history, :id => 1, :page => 'Another_page'
|
||||
assert_response :success
|
||||
assert_template 'history'
|
||||
assert_not_nil assigns(:versions)
|
||||
assert_equal 1, assigns(:versions).size
|
||||
assert_select "input[type=submit][name=commit]", false
|
||||
end
|
||||
|
||||
def test_diff
|
||||
|
|
Loading…
Reference in New Issue