]> source.dussan.org Git - redmine.git/commitdiff
Do not show revisions links and field on filesystem repositories.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 16 Jan 2012 20:22:12 +0000 (20:22 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Mon, 16 Jan 2012 20:22:12 +0000 (20:22 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8665 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/views/repositories/_navigation.html.erb
app/views/repositories/show.html.erb
test/functional/repositories_filesystem_controller_test.rb
test/functional/repositories_subversion_controller_test.rb

index 05c19d9bebf85cb60c7ce8be197f56cacffcf532..1776d2b7ef35e27632a4c5f2d8791814fe56bdec 100644 (file)
@@ -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 -%>
index ca64c73f35a1dfd43ce85d954ff537988077af20..a31e0f6a67cb3c57fc702c37c9833dde514d57aa 100644 (file)
@@ -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(
index 0b10d8fe39092ab376f15726ce59e32a73b10f2c..fceb27cf32019bc2f0abbe4242425e5cad4e4445 100644 (file)
@@ -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
index 0e0de2e3babfea8381ad79da35f24626eb10705a..0e1925b6e865174c2f4a1d8786712d74545faae6 100644 (file)
@@ -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