From da44232b15d02873d137f6b1e6fd3e0666984926 Mon Sep 17 00:00:00 2001 From: Jan Schulz-Hofen Date: Thu, 18 May 2017 10:33:49 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Make=20=E2=80=9CView=E2=80=9D=20the=20defau?= =?UTF-8?q?lt=20action=20for=20repository=20entries=20(instead=20of=20?= =?UTF-8?q?=E2=80=9Chistory=E2=80=9D)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 eb115f9..82f25d4 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 9721fa6..f78073b 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 f75a7ce..53a5acc 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.7.2