summaryrefslogtreecommitdiffstats
path: root/app/views/repositories/_link_to_functions.html.erb
blob: ef7bb7c22cd4131793aabdde81389c83dcf95ef0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<% 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 }
        } 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?
%>

<%= render :partial => 'common/tabs', :locals => {:tabs => tabs, :selected_tab => action_name} %>

<% end %>