summaryrefslogtreecommitdiffstats
path: root/app/views/repositories
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-10 08:42:53 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2017-06-10 08:42:53 +0000
commit9ea27ba1564033385fd4394d49092a8f93d4340e (patch)
tree0715dca3543a7d1af50ccb3ff3b2ca87802e84c7 /app/views/repositories
parentf65a30392adf6209766f60619d32860a2125a960 (diff)
downloadredmine-9ea27ba1564033385fd4394d49092a8f93d4340e.tar.gz
redmine-9ea27ba1564033385fd4394d49092a8f93d4340e.zip
Style links on repository entries as 2nd level tabs (like in settings) (#25999).
Patch by Jan Schulz-Hofen. git-svn-id: http://svn.redmine.org/redmine/trunk@16649 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/repositories')
-rw-r--r--app/views/repositories/_link_to_functions.html.erb23
1 files changed, 16 insertions, 7 deletions
diff --git a/app/views/repositories/_link_to_functions.html.erb b/app/views/repositories/_link_to_functions.html.erb
index edb5e84a5..bdb534395 100644
--- a/app/views/repositories/_link_to_functions.html.erb
+++ b/app/views/repositories/_link_to_functions.html.erb
@@ -1,13 +1,22 @@
<% if @entry && @entry.kind == 'file' %>
+<%
+tabs = []
+tabs << { name: 'entry', label: :button_view,
+ url: {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
+ } if @repository.supports_cat?
+
+tabs << { name: 'changes', label: :label_history,
+ url: {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
+ }
+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?
+%>
+
+<%= render :partial => 'common/tabs', :locals => {:tabs => tabs, :selected_tab => action_name} %>
+
<p>
-<% 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 %>
<%= link_to(l(:button_download),
{:action => 'raw', :id => @project,
:repository_id => @repository.identifier_param,