diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository.rb | 5 | ||||
-rw-r--r-- | app/models/repository/filesystem.rb | 2 | ||||
-rw-r--r-- | app/views/repositories/_link_to_functions.html.erb | 2 | ||||
-rw-r--r-- | app/views/repositories/_navigation.html.erb | 4 | ||||
-rw-r--r-- | app/views/repositories/show.html.erb | 4 |
5 files changed, 11 insertions, 6 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index dfed2b611..b6c8f0988 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -185,6 +185,11 @@ class Repository < ActiveRecord::Base end def supports_all_revisions? + ActiveSupport::Deprecation.warn 'Repository#supports_all_revisions? is deprecated and will be removed in Redmine 6.0. Please use #supports_history instead.' + supports_history? + end + + def supports_history? true end diff --git a/app/models/repository/filesystem.rb b/app/models/repository/filesystem.rb index 3ce7c5d73..52e888122 100644 --- a/app/models/repository/filesystem.rb +++ b/app/models/repository/filesystem.rb @@ -41,7 +41,7 @@ class Repository::Filesystem < Repository 'Filesystem' end - def supports_all_revisions? + def supports_history? false end diff --git a/app/views/repositories/_link_to_functions.html.erb b/app/views/repositories/_link_to_functions.html.erb index bfdc99cc4..ef7bb7c22 100644 --- a/app/views/repositories/_link_to_functions.html.erb +++ b/app/views/repositories/_link_to_functions.html.erb @@ -8,7 +8,7 @@ tabs << { name: 'entry', label: :button_view, tabs << { name: 'changes', label: :label_history, url: {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } - } if @repository.supports_all_revisions? + } if @repository.supports_history? tabs << { name: 'annotate', label: :button_annotate, url: {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } } if @repository.supports_annotate? diff --git a/app/views/repositories/_navigation.html.erb b/app/views/repositories/_navigation.html.erb index b37631a81..6653909d1 100644 --- a/app/views/repositories/_navigation.html.erb +++ b/app/views/repositories/_navigation.html.erb @@ -13,7 +13,7 @@ <%= link_to l(:label_statistics), {:action => 'stats', :id => @project, :repository_id => @repository.identifier_param}, - :class => 'icon icon-stats' if @repository.supports_all_revisions? %> + :class => 'icon icon-stats' if @repository.supports_history? %> <%= actions_dropdown do %> <%= link_to_if_authorized l(:label_settings), @@ -45,7 +45,7 @@ :id => 'tag' %> <% end -%> - <% if @repository.supports_all_revisions? %> + <% if @repository.supports_history? %> | <%= l(:label_revision) %>: <%= text_field_tag 'rev', @rev, :size => 8 %> <% end %> diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb index 5533ff09d..ec2ae6fbc 100644 --- a/app/views/repositories/show.html.erb +++ b/app/views/repositories/show.html.erb @@ -23,7 +23,7 @@ <p> <% has_branches = (!@repository.branches.nil? && @repository.branches.length > 0) sep = '' %> - <% if @repository.supports_all_revisions? && @path.blank? %> + <% if @repository.supports_history? && @path.blank? %> <%= link_to l(:label_view_all_revisions), :action => 'revisions', :id => @project, :repository_id => @repository.identifier_param %> <% sep = '|' %> @@ -39,7 +39,7 @@ :rev => @rev %> <% end %> </p> - <% if @repository.supports_all_revisions? %> + <% if @repository.supports_history? %> <% content_for :header_tags do %> <%= auto_discovery_link_tag( :atom, |