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