##// END OF EJS Templates
files: moved source path to lower position according to the design
marcink -
r3715:0edc69aa new-ui
parent child Browse files
Show More
@@ -1,478 +1,481 b''
1 // summary.less
1 // summary.less
2 // For use in RhodeCode applications;
2 // For use in RhodeCode applications;
3 // Used for headers and file detail summary screens.
3 // Used for headers and file detail summary screens.
4
4
5 .summary {
5 .summary {
6 clear: both;
6 clear: both;
7 float: none;
7 float: none;
8 position: relative;
8 position: relative;
9 width: 100%;
9 width: 100%;
10 margin: 0;
10 margin: 0;
11 padding: 0;
11 padding: 0;
12 background: #FCFCFC;
12 background: #FCFCFC;
13 border: 1px solid #EAEAEA;
13 border: 1px solid #EAEAEA;
14 border-radius: @border-radius;
14 border-radius: @border-radius;
15 margin-bottom: 20px;
15 margin-bottom: 20px;
16
16
17 .summary-detail-header {
17 .summary-detail-header {
18 display: block;
18 display: block;
19 width: 100%;
19 width: 100%;
20 margin-bottom: 10px;
20 margin-bottom: 10px;
21 padding: 0 0 .5em 0;
21 padding: 0 0 .5em 0;
22 border-bottom: @border-thickness solid @border-default-color;
22 border-bottom: @border-thickness solid @border-default-color;
23
23
24 .breadcrumbs {
24 .breadcrumbs {
25 display: inline;
25 display: inline;
26 margin: 0;
26 margin: 0;
27 padding: 0;
27 padding: 0;
28 }
28 }
29
29
30 h4 {
30 h4 {
31 margin: 0 1em 0 0;
31 margin: 0 1em 0 0;
32 padding: 10px 0 5px 20px;
32 padding: 10px 0 5px 20px;
33 line-height: 1.2em;
33 line-height: 1.2em;
34 font-size: @basefontsize;
34 font-size: @basefontsize;
35 }
35 }
36
36
37 .action_link {
37 .action_link {
38 float: right;
38 float: right;
39 }
39 }
40
40
41 .new-file {
41 .new-file {
42 float: right;
42 float: right;
43 margin-top: -1.5em;
43 margin-top: -1.5em;
44 }
44 }
45 }
45 }
46
46
47 .summary-detail {
47 .summary-detail {
48 float: none;
48 float: none;
49 position: relative;
49 position: relative;
50 width: 100%;
50 width: 100%;
51 margin: 0;
51 margin: 0;
52 padding: 0 0 20px 0;
52 padding: 0 0 20px 0;
53
53
54 .file_diff_buttons {
54 .file_diff_buttons {
55 margin-top: @space;
55 margin-top: @space;
56 }
56 }
57
57
58 // commit message
58 // commit message
59 .commit {
59 .commit {
60 white-space: pre-wrap;
60 white-space: pre-wrap;
61 }
61 }
62
62
63 .left-clone {
63 .left-clone {
64 float: left;
64 float: left;
65 height: 30px;
65 height: 30px;
66 margin: 0;
66 margin: 0;
67 padding: 0;
67 padding: 0;
68 width: 130px;
68 width: 130px;
69 font-weight: @text-semibold-weight;
69 font-weight: @text-semibold-weight;
70 font-family: @text-semibold;
70 font-family: @text-semibold;
71 }
71 }
72 .left-clone select {
72 .left-clone select {
73 width: 130px;
73 width: 130px;
74 margin-right: 0;
74 margin-right: 0;
75 background-color: @grey7;
75 background-color: @grey7;
76 border-color: @grey4;
76 border-color: @grey4;
77 color: #5C5C5C;
77 color: #5C5C5C;
78 border-top-right-radius: 0;
78 border-top-right-radius: 0;
79 border-bottom-right-radius: 0;
79 border-bottom-right-radius: 0;
80 }
80 }
81
81
82 .right-clone {
82 .right-clone {
83 float: left;
83 float: left;
84 width: ~"calc(100% - 170px)";
84 width: ~"calc(100% - 170px)";
85
85
86 .clipboard-action {
86 .clipboard-action {
87 margin-left: -30px;
87 margin-left: -30px;
88 }
88 }
89 }
89 }
90
90
91 .clone_url_input {
91 .clone_url_input {
92 width: ~"calc(100% - 90px)";
92 width: ~"calc(100% - 90px)";
93 padding: 6px 30px 6px 10px;
93 padding: 6px 30px 6px 10px;
94 height: 14px;
94 height: 14px;
95 box-shadow: 0 1px 1px 0 rgba(0,0,0,0.07);
95 box-shadow: 0 1px 1px 0 rgba(0,0,0,0.07);
96 border-top-left-radius: 0;
96 border-top-left-radius: 0;
97 border-bottom-left-radius: 0;
97 border-bottom-left-radius: 0;
98 margin-left: -1px;
98 margin-left: -1px;
99 }
99 }
100
100
101 &.directory {
101 &.directory {
102 margin-bottom: 0;
102 margin-bottom: 0;
103 }
103 }
104
104
105 .desc {
105 .desc {
106 white-space: pre-wrap;
106 white-space: pre-wrap;
107 }
107 }
108 .disabled {
108 .disabled {
109 opacity: .5;
109 opacity: .5;
110 cursor: inherit;
110 cursor: inherit;
111 }
111 }
112 .help-block {
112 .help-block {
113 color: inherit;
113 color: inherit;
114 margin: 0;
114 margin: 0;
115 }
115 }
116 }
116 }
117
117
118 .sidebar-right {
118 .sidebar-right {
119 float: left;
119 float: left;
120 width: 24%;
120 width: 24%;
121 margin: 0;
121 margin: 0;
122 padding: 0;
122 padding: 0;
123
123
124 ul {
124 ul {
125 margin-left: 0;
125 margin-left: 0;
126 padding-left: 0;
126 padding-left: 0;
127
127
128 li {
128 li {
129 list-style-type: none;
129 list-style-type: none;
130 }
130 }
131 }
131 }
132 }
132 }
133
133
134 #clone_by_name, #clone_by_id{
134 #clone_by_name, #clone_by_id{
135 display: inline-block;
135 display: inline-block;
136 margin-left: 0px;
136 margin-left: 0px;
137 }
137 }
138
138
139 .codeblock {
139 .codeblock {
140 border: none;
140 border: none;
141 background-color: transparent;
141 background-color: transparent;
142 }
142 }
143
143
144 .code-body {
144 .code-body {
145 border: @border-thickness solid @border-default-color;
145 border: @border-thickness solid @border-default-color;
146 .border-radius(@border-radius);
146 .border-radius(@border-radius);
147 }
147 }
148
148
149 .btn-collapse {
149 .btn-collapse {
150 clear: both;
150 clear: both;
151 float: none;
151 float: none;
152 background: #F7F7F7;
152 background: #F7F7F7;
153 text-align: center;
153 text-align: center;
154 color: #949494;
154 color: #949494;
155 font-size: 11px;
155 font-size: 11px;
156
156
157 &:hover {
157 &:hover {
158 background: #f1f1f1;
158 background: #f1f1f1;
159 color: #2B2B2D;
159 color: #2B2B2D;
160 }
160 }
161 }
161 }
162 }
162 }
163
163
164 // this is used outside of just the summary
164 // this is used outside of just the summary
165 .fieldset, // similar to form fieldset
165 .fieldset, // similar to form fieldset
166 .summary .sidebar-right-content { // these have to match
166 .summary .sidebar-right-content { // these have to match
167 clear: both;
167 clear: both;
168 float: none;
168 float: none;
169 position: relative;
169 position: relative;
170 display:block;
170 display:block;
171 width: 100%;
171 width: 100%;
172 min-height: 1em;
172 min-height: 1em;
173 margin-bottom: 10px;
173 margin-bottom: 10px;
174 padding: 0;
174 padding: 0;
175 line-height: 1.2em;
175 line-height: 1.2em;
176
176
177 &:after { // clearfix
177 &:after { // clearfix
178 content: "";
178 content: "";
179 clear: both;
179 clear: both;
180 width: 100%;
180 width: 100%;
181 height: 1em;
181 height: 1em;
182 }
182 }
183 }
183 }
184
184
185 .summary .sidebar-right-content {
185 .summary .sidebar-right-content {
186 margin-bottom: 0;
186 margin-bottom: 0;
187
187
188 .rc-user {
188 .rc-user {
189 min-width: 0;
189 min-width: 0;
190 }
190 }
191
191
192 li {
192 li {
193 list-style: none;
193 list-style: none;
194 line-height: normal;
194 line-height: normal;
195 }
195 }
196 }
196 }
197
197
198 .summary {
198 .summary {
199 .fieldset {
199 .fieldset {
200 margin-bottom: 0;
200 margin-bottom: 0;
201 }
201 }
202 }
202 }
203
203
204 .fieldset {
204 .fieldset {
205
205
206 .left-label { // similar to form legend
206 .left-label { // similar to form legend
207 display: block;
207 display: block;
208 margin: 0;
208 margin: 0;
209 padding: 0;
209 padding: 0;
210 font-weight: @text-semibold-weight;
210 font-weight: @text-semibold-weight;
211 font-family: @text-semibold;
211 font-family: @text-semibold;
212 }
212 }
213
213
214 .left-label-summary {
214 .left-label-summary {
215 padding-left: 20px;
215 padding-left: 20px;
216 margin-bottom: 5px;
216 margin-bottom: 5px;
217
217
218 p {
218 p {
219 margin-bottom: 5px;
219 margin-bottom: 5px;
220 color: @grey1;
220 color: @grey1;
221 float: left;
221 float: left;
222 width: 130px;
222 width: 130px;
223
223
224 &.spacing {
224 &.spacing {
225 margin-top: 10px;
225 margin-top: 10px;
226 }
226 }
227 }
227 }
228
228
229 .right-label-summary {
229 .right-label-summary {
230 float: left;
230 float: left;
231 margin-top: 7px;
231 margin-top: 7px;
232 width: ~"calc(100% - 160px)";
232 width: ~"calc(100% - 160px)";
233 }
233 }
234 }
234 }
235
235
236 .left-label-summary-files {
236 .left-label-summary-files {
237 padding-left: 45px;
237 padding-left: 45px;
238 margin-top: 5px;
238 margin-top: 5px;
239
239
240 p {
240 p {
241 margin-bottom: 5px;
241 margin-bottom: 5px;
242 color: @grey1;
242 color: @grey1;
243 float: left;
243 float: left;
244 width: 130px;
244 width: 130px;
245
245
246 &.spacing {
246 &.spacing {
247 margin-top: 10px;
247 margin-top: 10px;
248 }
248 }
249 }
249 }
250
250
251 .right-label-summary {
251 .right-label-summary {
252 float: left;
252 float: left;
253 margin-top: 7px;
253 margin-top: 7px;
254 }
254 }
255 }
255 }
256
256
257 .left-content {
257 .left-content {
258 width: ~"calc(60% - 20px)";
258 width: ~"calc(60% - 20px)";
259 float: left;
259 float: left;
260 margin: 15px 0 15px 20px;
260 margin: 15px 0 15px 20px;
261
261
262 .rc-user {
262 .rc-user {
263 min-width: auto;
263 min-width: auto;
264 max-width: none;
264 max-width: none;
265 min-height: auto;
265 min-height: auto;
266 padding-right: 5px;
266 padding-right: 5px;
267 }
267 }
268
268
269 .left-content-avatar {
269 .left-content-avatar {
270 width: 45px;
270 width: 45px;
271 float: left;
271 float: left;
272 margin-top: 8px;
272 margin-top: 8px;
273 }
273 }
274
274
275 .left-content-message {
275 .left-content-message {
276 float: left;
276 float: left;
277 width: ~"calc(100% - 45px)";
277 width: ~"calc(100% - 45px)";
278 }
278 }
279 }
279 }
280
280
281 .right-content { // similar to form fields
281 .right-content { // similar to form fields
282 float: left;
282 float: left;
283 display: block;
283 display: block;
284 width: ~"calc(40% - 20px)";
284 width: ~"calc(40% - 20px)";
285 text-align: right;
285 text-align: right;
286 margin: 15px 20px 15px 0;
286 margin: 15px 20px 15px 0;
287
287
288 .truncate-wrap,
288 .truncate-wrap,
289 .truncate {
289 .truncate {
290 max-width: 100%;
290 max-width: 100%;
291 width: 100%;
291 width: 100%;
292 }
292 }
293
293
294 .commit-long {
294 .commit-long {
295 overflow-x: auto;
295 overflow-x: auto;
296 }
296 }
297
297
298 .commit-info {
298 .commit-info {
299 margin-top: 7px;
299 margin-top: 7px;
300 }
300 }
301
301
302 .tag, .tagtag, .branchtag, .booktag, .metatag, .perm_tag {
302 .tag, .tagtag, .branchtag, .booktag, .metatag, .perm_tag {
303 background:transparent;
303 background:transparent;
304 border: none;
304 border: none;
305 box-shadow: none;
305 box-shadow: none;
306 margin-left: 10px;
306 margin-left: 10px;
307 font-size: 13px;
307 font-size: 13px;
308 }
308 }
309
309
310 .tag span, .tag i {
310 .tag span, .tag i {
311 color: @grey1;
311 color: @grey1;
312 }
312 }
313 }
313 }
314 .commit {
314 .commit {
315 color: @grey1;
315 color: @grey1;
316 margin-bottom: 5px;
316 margin-bottom: 5px;
317 white-space: pre;
317 white-space: pre;
318 }
318 }
319 .commit.truncate-wrap {
319 .commit.truncate-wrap {
320 overflow:hidden;
320 overflow:hidden;
321 text-overflow: ellipsis;
321 text-overflow: ellipsis;
322 }
322 }
323 .commit-author {
323 .commit-author {
324 color: @grey1;
324 color: @grey1;
325 }
325 }
326 .commit-date {
326 .commit-date {
327 color: @grey4;
327 color: @grey4;
328 }
328 }
329 }
329 }
330
330
331 // expand commit message
331 // expand commit message
332 #message_expand {
332 #message_expand {
333 clear: both;
333 clear: both;
334 display: block;
334 display: block;
335 color: @rcblue;
335 color: @rcblue;
336 cursor: pointer;
336 cursor: pointer;
337 }
337 }
338
338
339 #trimmed_message_box {
339 #trimmed_message_box {
340 max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height
340 max-height: floor(2 * @basefontsize * 1.2); // 2 lines * line-height
341 overflow: hidden;
341 overflow: hidden;
342 }
342 }
343
343
344 // show/hide comments button
344 // show/hide comments button
345 .show-inline-comments {
345 .show-inline-comments {
346 display: inline;
346 display: inline;
347 cursor: pointer;
347 cursor: pointer;
348
348
349 .comments-show { display: inline; }
349 .comments-show { display: inline; }
350 .comments-hide { display: none; }
350 .comments-hide { display: none; }
351
351
352 &.comments-visible {
352 &.comments-visible {
353 .comments-show { display: none; }
353 .comments-show { display: none; }
354 .comments-hide { display: inline; }
354 .comments-hide { display: inline; }
355 }
355 }
356 }
356 }
357
357
358 // Quick Start section
358 // Quick Start section
359
359
360 .empty-repo {
360 .empty-repo {
361 border: 1px solid #EAEAEA;
361 border: 1px solid #EAEAEA;
362 border-bottom: 0;
362 border-bottom: 0;
363 border-radius: @border-radius;
363 border-radius: @border-radius;
364 padding: 0 20px;
364 padding: 0 20px;
365 }
365 }
366
366
367 .empty-repo h3, .quick_start p {
367 .empty-repo h3, .quick_start p {
368 margin-bottom: 10px;
368 margin-bottom: 10px;
369 }
369 }
370
370
371 .quick_start pre {
371 .quick_start pre {
372 background: #FCFEFF;
372 background: #FCFEFF;
373 border: 1px solid #CBDBEB;
373 border: 1px solid #CBDBEB;
374 box-shadow: @button-shadow;
374 box-shadow: @button-shadow;
375 padding: 10px 15px;
375 padding: 10px 15px;
376 border-radius: 4px;
376 border-radius: 4px;
377 color: @grey2;
377 color: @grey2;
378 }
378 }
379
379
380 .clear-fix {
380 .clear-fix {
381 clear: both;
381 clear: both;
382 }
382 }
383
383
384 .quick_start {
384 .quick_start {
385 display: block;
385 display: block;
386 position: relative;
386 position: relative;
387 border: 1px solid #EAEAEA;
387 border: 1px solid #EAEAEA;
388 border-top: 0;
388 border-top: 0;
389 border-radius: @border-radius;
389 border-radius: @border-radius;
390 padding: 0 20px;
390 padding: 0 20px;
391
391
392 // adds some space to make copy and paste easier
392 // adds some space to make copy and paste easier
393 .left-label,
393 .left-label,
394 .right-content {
394 .right-content {
395 line-height: 1.6em;
395 line-height: 1.6em;
396 }
396 }
397 }
397 }
398
398
399
399
400 .submodule {
400 .submodule {
401 .summary-detail {
401 .summary-detail {
402 width: 100%;
402 width: 100%;
403
403
404 .btn-collapse {
404 .btn-collapse {
405 display: none;
405 display: none;
406 }
406 }
407 }
407 }
408 }
408 }
409
409
410 .codeblock-header {
410 .codeblock-header {
411 float: left;
411 float: left;
412 display: block;
412 display: block;
413 width: 100%;
413 width: 100%;
414 margin: 0;
414 margin: 0;
415
415
416 .stats {
416 .file-filename {
417 float: left;
417 float:left;
418 padding: 10px;
418 padding: 10px;
419 }
419 }
420 .stats-filename {
420
421 font-size: 120%;
421 .file-stats {
422 padding: 10px;
423 float:right;
422 }
424 }
425
426
423 .stats-first-item {
427 .stats-first-item {
424 padding: 0px 0px 0px 3px;
428 padding: 0px 0px 0px 3px;
425 }
429 }
426
430
427 .stats-info {
431 .stats-info {
428 margin-top: 5px;
429 font-size: 11px;
432 font-size: 11px;
430 color: @grey4;
433 color: @grey4;
431 }
434 }
432
435
433 .buttons {
436 .buttons {
434 float: right;
437 float: right;
435 text-align: right;
438 text-align: right;
436 color: @grey4;
439 color: @grey4;
437 padding: 10px;
440 padding: 10px;
438 }
441 }
439
442
440 .file-container {
443 .file-container {
441 display: inline-block;
444 display: inline-block;
442 width: 100%;
445 width: 100%;
443 }
446 }
444
447
445 }
448 }
446
449
447 #summary-menu-stats {
450 #summary-menu-stats {
448
451
449 .stats-bullet {
452 .stats-bullet {
450 color: @grey3;
453 color: @grey3;
451 min-width: 3em;
454 min-width: 3em;
452 }
455 }
453
456
454 .repo-size {
457 .repo-size {
455 margin-bottom: .5em;
458 margin-bottom: .5em;
456 }
459 }
457
460
458 }
461 }
459
462
460 .rctable.repo_summary {
463 .rctable.repo_summary {
461 border: 1px solid #eaeaea;
464 border: 1px solid #eaeaea;
462 border-radius: 2px;
465 border-radius: 2px;
463 border-collapse: inherit;
466 border-collapse: inherit;
464 border-bottom: 0;
467 border-bottom: 0;
465
468
466 th {
469 th {
467 background: @grey7;
470 background: @grey7;
468 border-bottom: 0;
471 border-bottom: 0;
469 }
472 }
470
473
471 td {
474 td {
472 border-color: #eaeaea;
475 border-color: #eaeaea;
473 }
476 }
474
477
475 td.td-status {
478 td.td-status {
476 padding: 0 0 0 10px;
479 padding: 0 0 0 10px;
477 }
480 }
478 }
481 }
@@ -1,148 +1,160 b''
1 <%namespace name="sourceblock" file="/codeblocks/source.mako"/>
1 <%namespace name="sourceblock" file="/codeblocks/source.mako"/>
2
2
3 <div id="codeblock" class="browserblock">
3 <div id="codeblock" class="browserblock">
4 <div class="browser-header">
4 <div class="browser-header">
5 <div class="browser-nav">
5 <div class="browser-nav">
6 <div class="pull-left">
6 <div class="pull-left">
7 ## loads the history for a file
7 ## loads the history for a file
8 ${h.hidden('file_refs_filter')}
8 ${h.hidden('file_refs_filter')}
9 </div>
9 </div>
10
10
11 <div class="pull-right">
11 <div class="pull-right">
12
12
13 ## Download
13 ## Download
14 % if c.lf_node:
14 % if c.lf_node:
15 <a class="btn btn-default" href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path, _query=dict(lf=1))}">
15 <a class="btn btn-default" href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path, _query=dict(lf=1))}">
16 ${_('Download largefile')}
16 ${_('Download largefile')}
17 </a>
17 </a>
18 % else:
18 % else:
19 <a class="btn btn-default" href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}">
19 <a class="btn btn-default" href="${h.route_path('repo_file_download',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path)}">
20 ${_('Download file')}
20 ${_('Download file')}
21 </a>
21 </a>
22 % endif
22 % endif
23
23
24 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
24 %if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
25 ## on branch head, can edit files
25 ## on branch head, can edit files
26 %if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary:
26 %if c.on_branch_head and c.branch_or_raw_id and not c.file.is_binary:
27 ## binary files are delete only
27 ## binary files are delete only
28 % if c.file.is_binary:
28 % if c.file.is_binary:
29 ${h.link_to(_('Edit'), '#Edit', class_="btn btn-default disabled tooltip", title=_('Editing binary files not allowed'))}
29 ${h.link_to(_('Edit'), '#Edit', class_="btn btn-default disabled tooltip", title=_('Editing binary files not allowed'))}
30 ${h.link_to(_('Delete'), h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit'),class_="btn btn-danger")}
30 ${h.link_to(_('Delete'), h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit'),class_="btn btn-danger")}
31 % else:
31 % else:
32 <a class="btn btn-default" href="${h.route_path('repo_files_edit_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">
32 <a class="btn btn-default" href="${h.route_path('repo_files_edit_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">
33 ${_('Edit on branch: ')}<code>${c.branch_name}</code>
33 ${_('Edit on branch: ')}<code>${c.branch_name}</code>
34 </a>
34 </a>
35
35
36 <a class="btn btn-danger" href="${h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">
36 <a class="btn btn-danger" href="${h.route_path('repo_files_remove_file',repo_name=c.repo_name,commit_id=c.branch_or_raw_id,f_path=c.f_path, _anchor='edit')}">
37 ${_('Delete')}
37 ${_('Delete')}
38 </a>
38 </a>
39 % endif
39 % endif
40 ## not on head, forbid all
40 ## not on head, forbid all
41 % else:
41 % else:
42 ${h.link_to(_('Edit'), '#Edit', class_="btn btn-default disabled tooltip", title=_('Editing files allowed only when on branch head commit'))}
42 ${h.link_to(_('Edit'), '#Edit', class_="btn btn-default disabled tooltip", title=_('Editing files allowed only when on branch head commit'))}
43 ${h.link_to(_('Delete'), '#Delete', class_="btn btn-default btn-danger disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))}
43 ${h.link_to(_('Delete'), '#Delete', class_="btn btn-default btn-danger disabled tooltip", title=_('Deleting files allowed only when on branch head commit'))}
44 % endif
44 % endif
45 %endif
45 %endif
46
46
47 </div>
47 </div>
48 </div>
48 </div>
49 <div id="file_history_container"></div>
49 <div id="file_history_container"></div>
50
50
51 </div>
51 </div>
52 </div>
52 </div>
53
53
54 <div class="codeblock codeblock-header">
54 <div class="codeblock codeblock-header">
55 <div class="stats">
56 <div>
57 ${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path, request.GET.get('at'))}
58 </div>
59
55
60 % if c.lf_node:
56 <div class="file-filename">
61 <span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span>
57 <i class="icon-file"></i> ${c.file}
62 % endif
58 </div>
59
60 <div class="file-stats">
63
61
64 <div class="stats-info">
62 <div class="stats-info">
65 <span class="stats-first-item">${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
63 <span class="stats-first-item">${c.file.lines()[0]} ${_ungettext('line', 'lines', c.file.lines()[0])}</span>
64
66 <span> | ${h.format_byte_size_binary(c.file.size)}</span>
65 <span> | ${h.format_byte_size_binary(c.file.size)}</span>
66 % if c.lf_node:
67 <span title="${_('This file is a pointer to large binary file')}"> | ${_('LargeFile')} ${h.format_byte_size_binary(c.lf_node.size)} </span>
68 % endif
67 <span> | ${c.file.mimetype} </span>
69 <span> | ${c.file.mimetype} </span>
68 <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
70 <span> | ${h.get_lexer_for_filenode(c.file).__class__.__name__}</span>
69 </div>
71 </div>
70
72
71 </div>
73 </div>
72 <div class="pull-right stats">
74
73 <a id="file_history_overview" href="#loadHistory">
75 <div class="code-body">
74 ${_('History')}
76
75 </a>
77 <div>
76 |
78 <div class="pull-left">
77 %if c.annotate:
79 ${h.files_breadcrumbs(c.repo_name,c.commit.raw_id,c.file.path, request.GET.get('at'))}
78 ${h.link_to(_('Source'), h.route_path('repo_files', repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
80 </div>
79 %else:
80 ${h.link_to(_('Annotation'), h.route_path('repo_files:annotated',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
81 %endif
82 | ${h.link_to(_('Raw'), h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
83
81
84 </div>
82 <div class="pull-right stats">
83 <a id="file_history_overview" href="#loadHistory">
84 ${_('History')}
85 </a>
86 |
87 %if c.annotate:
88 ${h.link_to(_('Source'), h.route_path('repo_files', repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
89 %else:
90 ${h.link_to(_('Annotation'), h.route_path('repo_files:annotated',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
91 %endif
92 | ${h.link_to(_('Raw'), h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
85
93
86 <div class="code-body">
94 </div>
95 </div>
96
97
87 %if c.file.is_binary:
98 %if c.file.is_binary:
88 <% rendered_binary = h.render_binary(c.repo_name, c.file)%>
99 <% rendered_binary = h.render_binary(c.repo_name, c.file)%>
89 % if rendered_binary:
100 % if rendered_binary:
90 ${rendered_binary}
101 ${rendered_binary}
91 % else:
102 % else:
92 <div>
103 <div>
93 ${_('Binary file (%s)') % c.file.mimetype}
104 ${_('Binary file (%s)') % c.file.mimetype}
94 </div>
105 </div>
95 % endif
106 % endif
96 %else:
107 %else:
97 % if c.file.size < c.visual.cut_off_limit_file:
108 % if c.file.size < c.visual.cut_off_limit_file:
98 %if c.renderer and not c.annotate:
109 %if c.renderer and not c.annotate:
99 ## pick relative url based on renderer
110 ## pick relative url based on renderer
100 <%
111 <%
101 relative_urls = {
112 relative_urls = {
102 'raw': h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
113 'raw': h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
103 'standard': h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
114 'standard': h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
104 }
115 }
105 %>
116 %>
106 ${h.render(c.file.content, renderer=c.renderer, relative_urls=relative_urls)}
117 ${h.render(c.file.content, renderer=c.renderer, relative_urls=relative_urls)}
107 %else:
118 %else:
108 <table class="cb codehilite">
119 <table class="cb codehilite">
109 %if c.annotate:
120 %if c.annotate:
110 <% color_hasher = h.color_hasher() %>
121 <% color_hasher = h.color_hasher() %>
111 %for annotation, lines in c.annotated_lines:
122 %for annotation, lines in c.annotated_lines:
112 ${sourceblock.render_annotation_lines(annotation, lines, color_hasher)}
123 ${sourceblock.render_annotation_lines(annotation, lines, color_hasher)}
113 %endfor
124 %endfor
114 %else:
125 %else:
115 %for line_num, tokens in enumerate(c.lines, 1):
126 %for line_num, tokens in enumerate(c.lines, 1):
116 ${sourceblock.render_line(line_num, tokens)}
127 ${sourceblock.render_line(line_num, tokens)}
117 %endfor
128 %endfor
118 %endif
129 %endif
119 </table>
130 </table>
120 %endif
131 %endif
121 %else:
132 %else:
122 ${_('File size {} is bigger then allowed limit {}. ').format(h.format_byte_size_binary(c.file.size), h.format_byte_size_binary(c.visual.cut_off_limit_file))} ${h.link_to(_('Show as raw'),
133 ${_('File size {} is bigger then allowed limit {}. ').format(h.format_byte_size_binary(c.file.size), h.format_byte_size_binary(c.visual.cut_off_limit_file))} ${h.link_to(_('Show as raw'),
123 h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
134 h.route_path('repo_file_raw',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path))}
124 %endif
135 %endif
125 %endif
136 %endif
126 </div>
137 </div>
127 </div>
138
139 </div>
128
140
129 <script type="text/javascript">
141 <script type="text/javascript">
130 % if request.GET.get('mark'):
142 % if request.GET.get('mark'):
131
143
132 $(function(){
144 $(function(){
133 $(".codehilite").mark(
145 $(".codehilite").mark(
134 "${request.GET.get('mark')}",
146 "${request.GET.get('mark')}",
135 {
147 {
136 "className": 'match',
148 "className": 'match',
137 "accuracy": "complementary",
149 "accuracy": "complementary",
138 "ignorePunctuation": ":._(){}[]!'+=".split(""),
150 "ignorePunctuation": ":._(){}[]!'+=".split(""),
139 "each": function(el) {
151 "each": function(el) {
140 // and also highlight lines !
152 // and also highlight lines !
141 $($(el).closest('tr')).find('td.cb-lineno').addClass('cb-line-selected');
153 $($(el).closest('tr')).find('td.cb-lineno').addClass('cb-line-selected');
142 }
154 }
143 }
155 }
144 );
156 );
145
157
146 });
158 });
147 % endif
159 % endif
148 </script>
160 </script>
General Comments 0
You need to be logged in to leave comments. Login now