From c0daecb52b223bb6548a3e32e28c20d28764f54e Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 10 Jun 2017 08:40:00 +0000 Subject: [PATCH] View content of repository files by default, instead of its history (#25999). Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16646 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/repositories/_breadcrumbs.html.erb | 2 +- app/views/repositories/_dir_list_content.html.erb | 2 +- app/views/repositories/_link_to_functions.html.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/repositories/_breadcrumbs.html.erb b/app/views/repositories/_breadcrumbs.html.erb index eb115f9ad..82f25d43a 100644 --- a/app/views/repositories/_breadcrumbs.html.erb +++ b/app/views/repositories/_breadcrumbs.html.erb @@ -18,7 +18,7 @@ dirs.each do |dir| <% end %> <% if filename %> / <%= link_to filename, - :action => 'changes', :id => @project, :repository_id => @repository.identifier_param, + :action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param("#{link_path}/#{filename}"), :rev => @rev %> <% end %> <% diff --git a/app/views/repositories/_dir_list_content.html.erb b/app/views/repositories/_dir_list_content.html.erb index 9721fa66c..f78073b0c 100644 --- a/app/views/repositories/_dir_list_content.html.erb +++ b/app/views/repositories/_dir_list_content.html.erb @@ -17,7 +17,7 @@ :parent_id => tr_id)) %>');">  <% end %> <%= link_to ent_name, - {:action => (entry.is_dir? ? 'show' : 'changes'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev}, + {:action => (entry.is_dir? ? 'show' : 'entry'), :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(ent_path), :rev => @rev}, :class => (entry.is_dir? ? 'icon icon-folder' : "icon icon-file #{Redmine::MimeType.css_class_of(ent_name)}")%> <%= (entry.size ? number_to_human_size(entry.size) : "?") unless entry.is_dir? %> diff --git a/app/views/repositories/_link_to_functions.html.erb b/app/views/repositories/_link_to_functions.html.erb index f75a7ce5f..53a5acc40 100644 --- a/app/views/repositories/_link_to_functions.html.erb +++ b/app/views/repositories/_link_to_functions.html.erb @@ -1,10 +1,10 @@ <% if @entry && @entry.kind == 'file' %>

-<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> | <% if @repository.supports_cat? %> <%= link_to_if action_name != 'entry', l(:button_view), {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> | <% end %> +<%= link_to_if action_name != 'changes', l(:label_history), {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> | <% if @repository.supports_annotate? %> <%= link_to_if action_name != 'annotate', l(:button_annotate), {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev } %> | <% end %> -- 2.39.5