Commit 34e15801845f806e0f0f04aff8ba78962f8a9086
1 parent
bcf03b5d
Exists in
master
and in
4 other branches
Improved file browse page, prepared for downloads tab
Showing
8 changed files
with
157 additions
and
166 deletions
Show diff stats
app/assets/stylesheets/common.scss
... | ... | @@ -583,13 +583,6 @@ ul.bordered-list li:last-child { border:none } |
583 | 583 | } |
584 | 584 | } |
585 | 585 | |
586 | -.project-refs-form.commit-refs-form .chzn-container { | |
587 | - position: relative; | |
588 | - top: 0; | |
589 | - left: 0; | |
590 | - margin-right: 10px; | |
591 | -} | |
592 | - | |
593 | 586 | li.commit { |
594 | 587 | .avatar { |
595 | 588 | width:24px; | ... | ... |
app/assets/stylesheets/highlight.scss
... | ... | @@ -10,7 +10,8 @@ table.highlighttable |
10 | 10 | margin:0px; |
11 | 11 | padding:0px; |
12 | 12 | font-size:12px; |
13 | - table-layout:fixed | |
13 | + table-layout:fixed; | |
14 | + background: #F7F7F7; | |
14 | 15 | } |
15 | 16 | |
16 | 17 | td.code, |
... | ... | @@ -25,6 +26,8 @@ td.linenos{ |
25 | 26 | background:none; |
26 | 27 | padding:10px 0px 0px 10px; |
27 | 28 | margin-left:0px; |
29 | + border-left: 1px solid #DEE2E3; | |
30 | + background: white; | |
28 | 31 | } |
29 | 32 | |
30 | 33 | .linenodiv pre, | ... | ... |
app/assets/stylesheets/ref_select.scss
app/assets/stylesheets/tree.scss
1 | -#tree-content-holder { | |
2 | - float:left; | |
3 | - width:100%; | |
4 | -} | |
5 | -#tree-readme-holder { | |
6 | - float:left; | |
7 | - width:100%; | |
8 | - .readme { | |
9 | - @include round-borders-all(4px); | |
10 | - padding:4px 15px; | |
11 | - background: #F7F7F7; | |
1 | +#tree-holder { | |
2 | + #tree-content-holder { | |
3 | + float:left; | |
4 | + width:100%; | |
12 | 5 | } |
13 | -} | |
14 | -#tree-breadcrumbs { | |
15 | - div { | |
16 | - margin:0; | |
17 | - margin-bottom:20px; | |
6 | + #tree-readme-holder { | |
18 | 7 | float:left; |
19 | - font-size:14px; | |
8 | + width:100%; | |
9 | + .readme { | |
10 | + @include round-borders-all(4px); | |
11 | + padding:4px 15px; | |
12 | + background: #F7F7F7; | |
13 | + } | |
20 | 14 | } |
21 | -} | |
22 | 15 | |
23 | -.tree_progress { | |
24 | - display:none; | |
25 | - margin:20px; | |
26 | - &.loading { | |
27 | - display:block; | |
16 | + .tree_progress { | |
17 | + display:none; | |
18 | + margin:20px; | |
19 | + &.loading { | |
20 | + display:block; | |
21 | + } | |
28 | 22 | } |
29 | -} | |
30 | 23 | |
31 | 24 | |
32 | -/** FILE CONTENT VIEW **/ | |
33 | -.view_file_content{ | |
34 | - .old_line, .new_line { | |
35 | - background:#ECECEC; | |
36 | - color:#777; | |
37 | - width:15px; | |
38 | - float:left; | |
39 | - padding: 0px 10px; | |
40 | - border-right: 1px solid #ccc; | |
41 | - } | |
42 | - .old_line{ | |
43 | - display:none; | |
25 | + /** FILE CONTENT VIEW **/ | |
26 | + .view_file_content{ | |
27 | + .old_line, .new_line { | |
28 | + background:#ECECEC; | |
29 | + color:#777; | |
30 | + width:15px; | |
31 | + float:left; | |
32 | + padding: 0px 10px; | |
33 | + border-right: 1px solid #ccc; | |
34 | + } | |
35 | + .old_line{ | |
36 | + display:none; | |
37 | + } | |
44 | 38 | } |
45 | -} | |
46 | 39 | |
47 | -.view_file .view_file_header, | |
48 | -.diff_file .diff_file_header { | |
49 | - background-image: -webkit-gradient(linear, 0 0, 0 26, color-stop(0.076, #fefefe), to(#F6F7F8)); | |
50 | - background-image: -webkit-linear-gradient(#fefefe 7.6%, #F6F7F8); | |
51 | - background-image: -moz-linear-gradient(#fefefe 7.6%, #F6F7F8); | |
52 | - background-image: -o-linear-gradient(#fefefe 7.6%, #F6F7F8); | |
40 | + .view_file .view_file_header, | |
41 | + .diff_file .diff_file_header { | |
42 | + background:#f5f5f5; | |
53 | 43 | margin: 0; |
54 | 44 | font-weight: normal; |
55 | 45 | font-weight: bold; |
56 | 46 | text-align: left; |
57 | 47 | color: #666; |
58 | - border-bottom: 1px solid #DEE2E3; | |
48 | + border-bottom: 1px solid #ccc; | |
59 | 49 | padding: 7px 10px; |
60 | 50 | |
61 | 51 | .mode_text, |
62 | 52 | .file_icon { |
63 | - margin-right:15px; | |
64 | - padding-right:15px; | |
65 | - border-right:1px solid $lite_border_color; | |
66 | - float:left; | |
67 | 53 | color:#aaa; |
68 | 54 | } |
55 | + } | |
69 | 56 | |
70 | - .file_icon { | |
71 | - padding-left:15px; | |
72 | - } | |
73 | -} | |
57 | + .view_file { | |
58 | + border:1px solid #CCC; | |
59 | + margin-bottom:1em; | |
74 | 60 | |
75 | -.view_file { | |
76 | - border:1px solid #CCC; | |
77 | - margin-bottom:1em; | |
78 | - | |
79 | - .view_file_content { | |
80 | - background:#fff; | |
81 | - color:#514721; | |
82 | - font-size: 11px; | |
83 | - } | |
84 | - .view_file_content_image { | |
85 | - background:#eee; | |
86 | - text-align:center; | |
87 | - img { | |
88 | - padding:100px; | |
89 | - max-width:300px; | |
61 | + .view_file_content { | |
62 | + background:#fff; | |
63 | + color:#514721; | |
64 | + font-size: 11px; | |
65 | + } | |
66 | + .view_file_content_image { | |
67 | + background:#eee; | |
68 | + text-align:center; | |
69 | + img { | |
70 | + padding:100px; | |
71 | + max-width:300px; | |
72 | + } | |
90 | 73 | } |
91 | 74 | } |
92 | -} | |
93 | 75 | |
94 | -td.code { | |
95 | - width: 100%; | |
96 | - .highlight { | |
97 | - margin-left: 55px; | |
98 | - overflow:auto; | |
99 | - overflow-y:hidden; | |
100 | - border-left: 1px solid #DEE2E3; | |
101 | - background: white; | |
76 | + td.code { | |
77 | + width: 100%; | |
78 | + .highlight { | |
79 | + margin-left: 55px; | |
80 | + overflow:auto; | |
81 | + overflow-y:hidden; | |
82 | + } | |
83 | + } | |
84 | + .highlight pre { | |
85 | + white-space: pre; | |
86 | + word-wrap:normal; | |
102 | 87 | } |
103 | -} | |
104 | -.highlight pre { | |
105 | - white-space: pre; | |
106 | - word-wrap:normal; | |
107 | -} | |
108 | - | |
109 | -table.highlighttable { | |
110 | - border: none; | |
111 | - background: #F7F7F7; | |
112 | -} | |
113 | -body.project-page table.highlighttable td { border: none } | |
114 | -table.highlighttable tr:hover { background:none;} | |
115 | - | |
116 | -table.highlighttable pre{ | |
117 | - line-height:16px !important; | |
118 | - font-size:12px !important; | |
119 | -} | |
120 | 88 | |
121 | -table.highlighttable .linenodiv pre { | |
122 | - text-align: right; | |
123 | - padding-right: 4px; | |
124 | - color:#888; | |
125 | -} | |
89 | + table.highlighttable { | |
90 | + border: none; | |
91 | + } | |
92 | + body.project-page table.highlighttable td { border: none } | |
93 | + table.highlighttable tr:hover { background:none;} | |
126 | 94 | |
127 | -.tree-item { | |
128 | - &:hover { | |
129 | - background: $hover; | |
130 | - cursor:pointer; | |
95 | + table.highlighttable pre{ | |
96 | + line-height:16px !important; | |
97 | + font-size:12px !important; | |
131 | 98 | } |
132 | 99 | |
100 | + table.highlighttable .linenodiv pre { | |
101 | + text-align: right; | |
102 | + padding-right: 4px; | |
103 | + color:#888; | |
104 | + } | |
133 | 105 | |
134 | - .tree-item-file-name { | |
135 | - font-weight:bold; | |
136 | - a { | |
137 | - color:$style_color; | |
106 | + .tree-item { | |
107 | + &:hover { | |
108 | + background: $hover; | |
109 | + cursor:pointer; | |
138 | 110 | } |
139 | 111 | |
140 | - img { | |
141 | - position: relative; | |
142 | - top: 2px; | |
112 | + | |
113 | + .tree-item-file-name { | |
114 | + font-weight:bold; | |
115 | + a { | |
116 | + color:$style_color; | |
117 | + } | |
118 | + | |
119 | + img { | |
120 | + position: relative; | |
121 | + top: 2px; | |
122 | + } | |
143 | 123 | } |
144 | 124 | } |
145 | -} | |
146 | 125 | |
147 | -.breadcrumb { | |
148 | - background:white; | |
149 | - border:none; | |
126 | + ul.breadcrumb { | |
127 | + background:white; | |
128 | + border:none; | |
150 | 129 | |
151 | - a { | |
152 | - color:$link_color; | |
153 | - font-weight:bold; | |
154 | - font-size:13px; | |
130 | + a { | |
131 | + color:#666; | |
132 | + font-weight:bold; | |
133 | + font-size:14px; | |
134 | + } | |
155 | 135 | } |
156 | -} | |
157 | 136 | |
158 | -#tree-slider { | |
159 | - @include shade; | |
137 | + #tree-slider { | |
138 | + @include shade; | |
160 | 139 | |
161 | - td { | |
162 | - padding:7px; | |
163 | - border-color:#f1f1f1; | |
140 | + td { | |
141 | + padding:7px; | |
142 | + border-color:#f1f1f1; | |
143 | + } | |
144 | + | |
145 | + th { | |
146 | + background:#f5f5f5; | |
147 | + } | |
164 | 148 | } |
165 | 149 | |
166 | - th { | |
167 | - background:#f5f5f5; | |
150 | + .tree-commit-link { | |
151 | + color:#333; | |
168 | 152 | } |
169 | -} | |
170 | 153 | |
171 | -.tree-commit-link { | |
172 | - color:#333; | |
173 | -} | |
154 | + #tree-content-holder .view_file{ | |
155 | + @include shade; | |
156 | + } | |
174 | 157 | |
175 | -#tree-content-holder .view_file{ | |
176 | - @include shade; | |
177 | -} | |
158 | + #tree-readme-holder .readme { | |
159 | + @include shade; | |
160 | + margin-bottom:20px; | |
161 | + } | |
178 | 162 | |
179 | -#tree-readme-holder .readme { | |
180 | - @include shade; | |
181 | - margin-bottom:20px; | |
182 | -} | |
163 | + a.tree-commit-link { | |
164 | + color: #666; | |
165 | + &:hover { | |
166 | + text-decoration: underline; | |
167 | + } | |
168 | + } | |
183 | 169 | |
184 | -a.tree-commit-link { | |
185 | - color: #666; | |
186 | - &:hover { | |
187 | - text-decoration: underline; | |
170 | + .arrow { | |
171 | + background: url("images.png") no-repeat -85px -77px; | |
172 | + width: 19px; | |
173 | + height: 16px; | |
174 | + float: left; | |
175 | + position: relative; | |
176 | + left: -10px; | |
188 | 177 | } |
189 | 178 | } | ... | ... |
app/views/commits/_head.html.haml
1 | 1 | %ul.tabs |
2 | 2 | %li |
3 | - = form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form commit-refs-form" do | |
3 | + = form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form" do | |
4 | 4 | = select_tag "ref", grouped_options_refs, :onchange => "$(this.form).trigger('submit');", :class => "project-refs-select" |
5 | 5 | = hidden_field_tag :destination, "commits" |
6 | 6 | ... | ... |
app/views/refs/_tree.html.haml
1 | 1 | %ul.breadcrumb |
2 | 2 | %li |
3 | - = form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form left", :remote => true do | |
4 | - = select_tag "ref", grouped_options_refs, :onchange => "$(this.form).trigger('submit');", :class => "project-refs-select" | |
5 | - = hidden_field_tag :destination, "tree" | |
6 | - = hidden_field_tag :path, params[:path] | |
7 | - | |
8 | - %li | |
3 | + %span.arrow | |
9 | 4 | = link_to tree_project_ref_path(@project, @ref, :path => nil), :remote => true do |
10 | - = @project.code | |
5 | + = @project.name | |
11 | 6 | - tree.breadcrumbs(6) do |link| |
12 | 7 | \/ |
13 | 8 | %li= link | ... | ... |
app/views/refs/_tree_file.html.haml
1 | 1 | :css |
2 | 2 | .view_file |
3 | 3 | .view_file_header |
4 | - %strong | |
5 | - %span.file_icon= image_tag "txt.png" | |
6 | - %span.mode_text= file.mode | |
7 | - %span.file_name= name | |
8 | - = link_to "raw", blob_project_ref_path(@project, @ref, :path => params[:path] ), :class => "right", :target => "_blank" | |
9 | - = link_to "history", project_commits_path(@project, :path => params[:path], :ref => @ref ), :class => "right", :style => "margin-right:10px;" | |
10 | - %br/ | |
4 | + .row | |
5 | + .span1.file_icon= image_tag "txt.png" | |
6 | + .span2.mode_text= file.mode | |
7 | + .span7.file_name= name | |
8 | + .span4.right | |
9 | + = link_to "raw", blob_project_ref_path(@project, @ref, :path => params[:path] ), :class => "right", :target => "_blank" | |
10 | + = link_to "history", project_commits_path(@project, :path => params[:path], :ref => @ref ), :class => "right", :style => "margin-right:10px;" | |
11 | 11 | - if file.text? |
12 | 12 | .view_file_content |
13 | 13 | - unless file.empty? | ... | ... |
app/views/refs/tree.html.haml
1 | +%ul.tabs | |
2 | + %li | |
3 | + = form_tag switch_project_refs_path(@project), :method => :get, :class => "project-refs-form", :remote => true do | |
4 | + = select_tag "ref", grouped_options_refs, :onchange => "$(this.form).trigger('submit');", :class => "project-refs-select" | |
5 | + = hidden_field_tag :destination, "tree" | |
6 | + = hidden_field_tag :path, params[:path] | |
7 | + %li{:class => "#{'active' if (controller.controller_name == "refs") }"} | |
8 | + = link_to tree_project_ref_path(@project, @ref) do | |
9 | + Code | |
10 | + | |
1 | 11 | #tree-holder= render :partial => "tree", :locals => {:repo => @repo, :commit => @commit, :tree => @tree} |
2 | 12 | |
3 | 13 | :javascript | ... | ... |