summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-16 20:22:12 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-16 20:22:12 +0000
commit346fccf782c8ac0bd99f163065399732a4e83d17 (patch)
tree7220c3e9ebb81c1471c1ba3acd56e8d414885050
parentf8e401b475f17b66bb4c3193113492358c06f456 (diff)
downloadredmine-346fccf782c8ac0bd99f163065399732a4e83d17.tar.gz
redmine-346fccf782c8ac0bd99f163065399732a4e83d17.zip
Do not show revisions links and field on filesystem repositories.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8665 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/views/repositories/_navigation.html.erb8
-rw-r--r--app/views/repositories/show.html.erb2
-rw-r--r--test/functional/repositories_filesystem_controller_test.rb4
-rw-r--r--test/functional/repositories_subversion_controller_test.rb4
4 files changed, 14 insertions, 4 deletions
diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb
index 05c19d9be..1776d2b7e 100644
--- a/app/views/repositories/_navigation.html.erb
+++ b/app/views/repositories/_navigation.html.erb
@@ -4,7 +4,7 @@
<%= link_to l(:label_statistics),
{:action => 'stats', :id => @project, :repository_id => @repository.identifier_param},
- :class => 'icon icon-stats' %>
+ :class => 'icon icon-stats' if @repository.supports_all_revisions? %>
<% form_tag({:action => controller.action_name,
:id => @project,
@@ -27,6 +27,8 @@
:id => 'tag' %>
<% end -%>
- | <%= l(:label_revision) %>:
- <%= text_field_tag 'rev', @rev, :size => 8 %>
+ <% if @repository.supports_all_revisions? %>
+ | <%= l(:label_revision) %>:
+ <%= text_field_tag 'rev', @rev, :size => 8 %>
+ <% end %>
<% end -%>
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index ca64c73f3..a31e0f6a6 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -44,7 +44,7 @@
<% end %>
</p>
-<% if true # @path.blank? %>
+<% if @repository.supports_all_revisions? %>
<% content_for :header_tags do %>
<%= auto_discovery_link_tag(
:atom, params.merge(
diff --git a/test/functional/repositories_filesystem_controller_test.rb b/test/functional/repositories_filesystem_controller_test.rb
index 0b10d8fe3..fceb27cf3 100644
--- a/test/functional/repositories_filesystem_controller_test.rb
+++ b/test/functional/repositories_filesystem_controller_test.rb
@@ -61,6 +61,10 @@ class RepositoriesFilesystemControllerTest < ActionController::TestCase
assert assigns(:entries).size > 0
assert_not_nil assigns(:changesets)
assert assigns(:changesets).size == 0
+
+ assert_no_tag 'input', :attributes => {:name => 'rev'}
+ assert_no_tag 'a', :content => 'Statistics'
+ assert_no_tag 'a', :content => 'Atom'
end
def test_show_no_extension
diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb
index 0e0de2e3b..0e1925b6e 100644
--- a/test/functional/repositories_subversion_controller_test.rb
+++ b/test/functional/repositories_subversion_controller_test.rb
@@ -58,6 +58,10 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
assert_template 'show'
assert_not_nil assigns(:entries)
assert_not_nil assigns(:changesets)
+
+ assert_tag 'input', :attributes => {:name => 'rev'}
+ assert_tag 'a', :content => 'Statistics'
+ assert_tag 'a', :content => 'Atom'
end
def test_browse_root