Project

General

Profile

Feature #25999 » 0004-Style-links-on-repository-entries-as-2nd-level-tabs-.patch

Jan from Planio www.plan.io, 2017-05-18 12:30

View differences:

app/views/repositories/_link_to_functions.html.erb
1 1
<% if @entry && @entry.kind == 'file' %>
2 2

  
3
<%
4
tabs = []
5
tabs << { name: 'entry', label: :button_view,
6
          url: {:action => 'entry', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
7
        } if @repository.supports_cat?
8

  
9
tabs << { name: 'changes', label: :label_history,
10
          url: {:action => 'changes', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
11
        }
12
tabs << { name: 'annotate', label: :button_annotate,
13
          url: {:action => 'annotate', :id => @project, :repository_id => @repository.identifier_param, :path => to_path_param(@path), :rev => @rev }
14
        } if @repository.supports_annotate?
15
%>
16

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

  
3 19
<p>
4
<% if @repository.supports_cat? %>
5
    <%= 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 } %> |
6
<% end %>
7
<%= 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 } %> |
8
<% if @repository.supports_annotate? %>
9
    <%= 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 } %> |
10
<% end %>
11 20
<%= link_to(l(:button_download),
12 21
            {:action => 'raw', :id => @project,
13 22
             :repository_id => @repository.identifier_param,
public/stylesheets/scm.css
67 67
table.filecontent tr:target th.line-num { background-color:#E0E0E0; color: #777; }
68 68
table.filecontent tr:target td.line-code { background-color:#DDEEFF; }
69 69

  
70
img.filecontent { max-width: 100%; margin-top: 1em;}
70
img.filecontent { max-width: 100%; }
71 71

  
72 72
/* 12 different colors for the annonate view */
73 73
table.annotate tr.bloc-0 {background: #FFFFBF;}
(4-4/6)