Show More
@@ -1,1293 +1,1301 b'' | |||
|
1 | 1 | // Default styles |
|
2 | 2 | |
|
3 | 3 | .diff-collapse { |
|
4 | 4 | margin: @padding 0; |
|
5 | 5 | text-align: right; |
|
6 | 6 | } |
|
7 | 7 | |
|
8 | 8 | .diff-container { |
|
9 | 9 | margin-bottom: @space; |
|
10 | 10 | |
|
11 | 11 | .diffblock { |
|
12 | 12 | margin-bottom: @space; |
|
13 | 13 | } |
|
14 | 14 | |
|
15 | 15 | &.hidden { |
|
16 | 16 | display: none; |
|
17 | 17 | overflow: hidden; |
|
18 | 18 | } |
|
19 | 19 | } |
|
20 | 20 | |
|
21 | 21 | |
|
22 | 22 | div.diffblock .sidebyside { |
|
23 | 23 | background: #ffffff; |
|
24 | 24 | } |
|
25 | 25 | |
|
26 | 26 | div.diffblock { |
|
27 | 27 | overflow-x: auto; |
|
28 | 28 | overflow-y: hidden; |
|
29 | 29 | clear: both; |
|
30 | 30 | padding: 0px; |
|
31 | 31 | background: @grey6; |
|
32 | 32 | border: @border-thickness solid @grey5; |
|
33 | 33 | -webkit-border-radius: @border-radius @border-radius 0px 0px; |
|
34 | 34 | border-radius: @border-radius @border-radius 0px 0px; |
|
35 | 35 | |
|
36 | 36 | |
|
37 | 37 | .comments-number { |
|
38 | 38 | float: right; |
|
39 | 39 | } |
|
40 | 40 | |
|
41 | 41 | // BEGIN CODE-HEADER STYLES |
|
42 | 42 | |
|
43 | 43 | .code-header { |
|
44 | 44 | background: @grey6; |
|
45 | 45 | padding: 10px 0 10px 0; |
|
46 | 46 | height: auto; |
|
47 | 47 | width: 100%; |
|
48 | 48 | |
|
49 | 49 | .hash { |
|
50 | 50 | float: left; |
|
51 | 51 | padding: 2px 0 0 2px; |
|
52 | 52 | } |
|
53 | 53 | |
|
54 | 54 | .date { |
|
55 | 55 | float: left; |
|
56 | 56 | text-transform: uppercase; |
|
57 | 57 | padding: 4px 0px 0px 2px; |
|
58 | 58 | } |
|
59 | 59 | |
|
60 | 60 | div { |
|
61 | 61 | margin-left: 4px; |
|
62 | 62 | } |
|
63 | 63 | |
|
64 | 64 | div.compare_header { |
|
65 | 65 | min-height: 40px; |
|
66 | 66 | margin: 0; |
|
67 | 67 | padding: 0 @padding; |
|
68 | 68 | |
|
69 | 69 | .drop-menu { |
|
70 | 70 | float:left; |
|
71 | 71 | display: block; |
|
72 | 72 | margin:0 0 @padding 0; |
|
73 | 73 | } |
|
74 | 74 | |
|
75 | 75 | .compare-label { |
|
76 | 76 | float: left; |
|
77 | 77 | clear: both; |
|
78 | 78 | display: inline-block; |
|
79 | 79 | min-width: 5em; |
|
80 | 80 | margin: 0; |
|
81 | 81 | padding: @button-padding @button-padding @button-padding 0; |
|
82 | 82 | font-weight: @text-semibold-weight; |
|
83 | 83 | font-family: @text-semibold; |
|
84 | 84 | } |
|
85 | 85 | |
|
86 | 86 | .compare-buttons { |
|
87 | 87 | float: left; |
|
88 | 88 | margin: 0; |
|
89 | 89 | padding: 0 0 @padding; |
|
90 | 90 | |
|
91 | 91 | .btn { |
|
92 | 92 | margin: 0 @padding 0 0; |
|
93 | 93 | } |
|
94 | 94 | } |
|
95 | 95 | } |
|
96 | 96 | |
|
97 | 97 | } |
|
98 | 98 | |
|
99 | 99 | .parents { |
|
100 | 100 | float: left; |
|
101 | 101 | width: 100px; |
|
102 | 102 | font-weight: 400; |
|
103 | 103 | vertical-align: middle; |
|
104 | 104 | padding: 0px 2px 0px 2px; |
|
105 | 105 | background-color: @grey6; |
|
106 | 106 | |
|
107 | 107 | #parent_link { |
|
108 | 108 | margin: 00px 2px; |
|
109 | 109 | |
|
110 | 110 | &.double { |
|
111 | 111 | margin: 0px 2px; |
|
112 | 112 | } |
|
113 | 113 | |
|
114 | 114 | &.disabled{ |
|
115 | 115 | margin-right: @padding; |
|
116 | 116 | } |
|
117 | 117 | } |
|
118 | 118 | } |
|
119 | 119 | |
|
120 | 120 | .children { |
|
121 | 121 | float: right; |
|
122 | 122 | width: 100px; |
|
123 | 123 | font-weight: 400; |
|
124 | 124 | vertical-align: middle; |
|
125 | 125 | text-align: right; |
|
126 | 126 | padding: 0px 2px 0px 2px; |
|
127 | 127 | background-color: @grey6; |
|
128 | 128 | |
|
129 | 129 | #child_link { |
|
130 | 130 | margin: 0px 2px; |
|
131 | 131 | |
|
132 | 132 | &.double { |
|
133 | 133 | margin: 0px 2px; |
|
134 | 134 | } |
|
135 | 135 | |
|
136 | 136 | &.disabled{ |
|
137 | 137 | margin-right: @padding; |
|
138 | 138 | } |
|
139 | 139 | } |
|
140 | 140 | } |
|
141 | 141 | |
|
142 | 142 | .changeset_header { |
|
143 | 143 | height: 16px; |
|
144 | 144 | |
|
145 | 145 | & > div{ |
|
146 | 146 | margin-right: @padding; |
|
147 | 147 | } |
|
148 | 148 | } |
|
149 | 149 | |
|
150 | 150 | .changeset_file { |
|
151 | 151 | text-align: left; |
|
152 | 152 | float: left; |
|
153 | 153 | padding: 0; |
|
154 | 154 | |
|
155 | 155 | a{ |
|
156 | 156 | display: inline-block; |
|
157 | 157 | margin-right: 0.5em; |
|
158 | 158 | } |
|
159 | 159 | |
|
160 | 160 | #selected_mode{ |
|
161 | 161 | margin-left: 0; |
|
162 | 162 | } |
|
163 | 163 | } |
|
164 | 164 | |
|
165 | 165 | .diff-menu-wrapper { |
|
166 | 166 | float: left; |
|
167 | 167 | } |
|
168 | 168 | |
|
169 | 169 | .diff-menu { |
|
170 | 170 | position: absolute; |
|
171 | 171 | background: none repeat scroll 0 0 #FFFFFF; |
|
172 | 172 | border-color: #003367 @grey3 @grey3; |
|
173 | 173 | border-right: 1px solid @grey3; |
|
174 | 174 | border-style: solid solid solid; |
|
175 | 175 | border-width: @border-thickness; |
|
176 | 176 | box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2); |
|
177 | 177 | margin-top: 5px; |
|
178 | 178 | margin-left: 1px; |
|
179 | 179 | } |
|
180 | 180 | |
|
181 | 181 | .diff-actions, .editor-actions { |
|
182 | 182 | float: left; |
|
183 | 183 | |
|
184 | 184 | input{ |
|
185 | 185 | margin: 0 0.5em 0 0; |
|
186 | 186 | } |
|
187 | 187 | } |
|
188 | 188 | |
|
189 | 189 | // END CODE-HEADER STYLES |
|
190 | 190 | |
|
191 | 191 | // BEGIN CODE-BODY STYLES |
|
192 | 192 | |
|
193 | 193 | .code-body { |
|
194 | 194 | padding: 0; |
|
195 | 195 | background-color: #ffffff; |
|
196 | 196 | position: relative; |
|
197 | 197 | max-width: none; |
|
198 | 198 | box-sizing: border-box; |
|
199 | 199 | // TODO: johbo: Parent has overflow: auto, this forces the child here |
|
200 | 200 | // to have the intended size and to scroll. Should be simplified. |
|
201 | 201 | width: 100%; |
|
202 | 202 | overflow-x: auto; |
|
203 | 203 | } |
|
204 | 204 | |
|
205 | 205 | pre.raw { |
|
206 | 206 | background: white; |
|
207 | 207 | color: @grey1; |
|
208 | 208 | } |
|
209 | 209 | // END CODE-BODY STYLES |
|
210 | 210 | |
|
211 | 211 | } |
|
212 | 212 | |
|
213 | 213 | |
|
214 | 214 | table.code-difftable { |
|
215 | 215 | border-collapse: collapse; |
|
216 | 216 | width: 99%; |
|
217 | 217 | border-radius: 0px !important; |
|
218 | 218 | |
|
219 | 219 | td { |
|
220 | 220 | padding: 0 !important; |
|
221 | 221 | background: none !important; |
|
222 | 222 | border: 0 !important; |
|
223 | 223 | } |
|
224 | 224 | |
|
225 | 225 | .context { |
|
226 | 226 | background: none repeat scroll 0 0 #DDE7EF; |
|
227 | 227 | } |
|
228 | 228 | |
|
229 | 229 | .add { |
|
230 | 230 | background: none repeat scroll 0 0 #DDFFDD; |
|
231 | 231 | |
|
232 | 232 | ins { |
|
233 | 233 | background: none repeat scroll 0 0 #AAFFAA; |
|
234 | 234 | text-decoration: none; |
|
235 | 235 | } |
|
236 | 236 | } |
|
237 | 237 | |
|
238 | 238 | .del { |
|
239 | 239 | background: none repeat scroll 0 0 #FFDDDD; |
|
240 | 240 | |
|
241 | 241 | del { |
|
242 | 242 | background: none repeat scroll 0 0 #FFAAAA; |
|
243 | 243 | text-decoration: none; |
|
244 | 244 | } |
|
245 | 245 | } |
|
246 | 246 | |
|
247 | 247 | /** LINE NUMBERS **/ |
|
248 | 248 | .lineno { |
|
249 | 249 | padding-left: 2px !important; |
|
250 | 250 | padding-right: 2px; |
|
251 | 251 | text-align: right; |
|
252 | 252 | width: 32px; |
|
253 | 253 | -moz-user-select: none; |
|
254 | 254 | -webkit-user-select: none; |
|
255 | 255 | border-right: @border-thickness solid @grey5 !important; |
|
256 | 256 | border-left: 0px solid #CCC !important; |
|
257 | 257 | border-top: 0px solid #CCC !important; |
|
258 | 258 | border-bottom: none !important; |
|
259 | 259 | |
|
260 | 260 | a { |
|
261 | 261 | &:extend(pre); |
|
262 | 262 | text-align: right; |
|
263 | 263 | padding-right: 2px; |
|
264 | 264 | cursor: pointer; |
|
265 | 265 | display: block; |
|
266 | 266 | width: 32px; |
|
267 | 267 | } |
|
268 | 268 | } |
|
269 | 269 | |
|
270 | 270 | .context { |
|
271 | 271 | cursor: auto; |
|
272 | 272 | &:extend(pre); |
|
273 | 273 | } |
|
274 | 274 | |
|
275 | 275 | .lineno-inline { |
|
276 | 276 | background: none repeat scroll 0 0 #FFF !important; |
|
277 | 277 | padding-left: 2px; |
|
278 | 278 | padding-right: 2px; |
|
279 | 279 | text-align: right; |
|
280 | 280 | width: 30px; |
|
281 | 281 | -moz-user-select: none; |
|
282 | 282 | -webkit-user-select: none; |
|
283 | 283 | } |
|
284 | 284 | |
|
285 | 285 | /** CODE **/ |
|
286 | 286 | .code { |
|
287 | 287 | display: block; |
|
288 | 288 | width: 100%; |
|
289 | 289 | |
|
290 | 290 | td { |
|
291 | 291 | margin: 0; |
|
292 | 292 | padding: 0; |
|
293 | 293 | } |
|
294 | 294 | |
|
295 | 295 | pre { |
|
296 | 296 | margin: 0; |
|
297 | 297 | padding: 0; |
|
298 | 298 | margin-left: .5em; |
|
299 | 299 | } |
|
300 | 300 | } |
|
301 | 301 | } |
|
302 | 302 | |
|
303 | 303 | |
|
304 | 304 | // Comments |
|
305 | 305 | .comment-selected-hl { |
|
306 | 306 | border-left: 6px solid @comment-highlight-color !important; |
|
307 | 307 | padding-left: 3px !important; |
|
308 | 308 | margin-left: -7px !important; |
|
309 | 309 | } |
|
310 | 310 | |
|
311 | 311 | div.comment:target, |
|
312 | 312 | div.comment-outdated:target { |
|
313 | 313 | .comment-selected-hl; |
|
314 | 314 | } |
|
315 | 315 | |
|
316 | 316 | //TODO: anderson: can't get an absolute number out of anything, so had to put the |
|
317 | 317 | //current values that might change. But to make it clear I put as a calculation |
|
318 | 318 | @comment-max-width: 1065px; |
|
319 | 319 | @pr-extra-margin: 34px; |
|
320 | 320 | @pr-border-spacing: 4px; |
|
321 | 321 | @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing; |
|
322 | 322 | |
|
323 | 323 | // Pull Request |
|
324 | 324 | .cs_files .code-difftable { |
|
325 | 325 | border: @border-thickness solid @grey5; //borders only on PRs |
|
326 | 326 | |
|
327 | 327 | .comment-inline-form, |
|
328 | 328 | div.comment { |
|
329 | 329 | width: @pr-comment-width; |
|
330 | 330 | } |
|
331 | 331 | } |
|
332 | 332 | |
|
333 | 333 | // Changeset |
|
334 | 334 | .code-difftable { |
|
335 | 335 | .comment-inline-form, |
|
336 | 336 | div.comment { |
|
337 | 337 | width: @comment-max-width; |
|
338 | 338 | } |
|
339 | 339 | } |
|
340 | 340 | |
|
341 | 341 | //Style page |
|
342 | 342 | @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding; |
|
343 | 343 | #style-page .code-difftable{ |
|
344 | 344 | .comment-inline-form, |
|
345 | 345 | div.comment { |
|
346 | 346 | width: @comment-max-width - @style-extra-margin; |
|
347 | 347 | } |
|
348 | 348 | } |
|
349 | 349 | |
|
350 | 350 | #context-bar > h2 { |
|
351 | 351 | font-size: 20px; |
|
352 | 352 | } |
|
353 | 353 | |
|
354 | 354 | #context-bar > h2> a { |
|
355 | 355 | font-size: 20px; |
|
356 | 356 | } |
|
357 | 357 | // end of defaults |
|
358 | 358 | |
|
359 | 359 | .file_diff_buttons { |
|
360 | 360 | padding: 0 0 @padding; |
|
361 | 361 | |
|
362 | 362 | .drop-menu { |
|
363 | 363 | float: left; |
|
364 | 364 | margin: 0 @padding 0 0; |
|
365 | 365 | } |
|
366 | 366 | .btn { |
|
367 | 367 | margin: 0 @padding 0 0; |
|
368 | 368 | } |
|
369 | 369 | } |
|
370 | 370 | |
|
371 | 371 | .code-body.textarea.editor { |
|
372 | 372 | max-width: none; |
|
373 | 373 | padding: 15px; |
|
374 | 374 | } |
|
375 | 375 | |
|
376 | 376 | td.injected_diff{ |
|
377 | 377 | max-width: 1178px; |
|
378 | 378 | overflow-x: auto; |
|
379 | 379 | overflow-y: hidden; |
|
380 | 380 | |
|
381 | 381 | div.diff-container, |
|
382 | 382 | div.diffblock{ |
|
383 | 383 | max-width: 100%; |
|
384 | 384 | } |
|
385 | 385 | |
|
386 | 386 | div.code-body { |
|
387 | 387 | max-width: 1124px; |
|
388 | 388 | overflow-x: auto; |
|
389 | 389 | overflow-y: hidden; |
|
390 | 390 | padding: 0; |
|
391 | 391 | } |
|
392 | 392 | div.diffblock { |
|
393 | 393 | border: none; |
|
394 | 394 | } |
|
395 | 395 | |
|
396 | 396 | &.inline-form { |
|
397 | 397 | width: 99% |
|
398 | 398 | } |
|
399 | 399 | } |
|
400 | 400 | |
|
401 | 401 | |
|
402 | 402 | table.code-difftable { |
|
403 | 403 | width: 100%; |
|
404 | 404 | } |
|
405 | 405 | |
|
406 | 406 | /** PYGMENTS COLORING **/ |
|
407 | 407 | div.codeblock { |
|
408 | 408 | |
|
409 | 409 | // TODO: johbo: Added interim to get rid of the margin around |
|
410 | 410 | // Select2 widgets. This needs further cleanup. |
|
411 | 411 | overflow: auto; |
|
412 | 412 | padding: 0px; |
|
413 | 413 | border: @border-thickness solid @grey6; |
|
414 | 414 | .border-radius(@border-radius); |
|
415 | 415 | |
|
416 | 416 | #remove_gist { |
|
417 | 417 | float: right; |
|
418 | 418 | } |
|
419 | 419 | |
|
420 | 420 | .gist_url { |
|
421 |
padding: 0px 0px |
|
|
421 | padding: 0px 0px 35px 0px; | |
|
422 | 422 | } |
|
423 | 423 | |
|
424 | .gist-desc { | |
|
425 | clear: both; | |
|
426 | margin: 0 0 10px 0; | |
|
427 | code { | |
|
428 | white-space: pre-line; | |
|
429 | line-height: inherit | |
|
430 | } | |
|
431 | } | |
|
424 | 432 | .author { |
|
425 | 433 | clear: both; |
|
426 | 434 | vertical-align: middle; |
|
427 | 435 | font-weight: @text-bold-weight; |
|
428 | 436 | font-family: @text-bold; |
|
429 | 437 | } |
|
430 | 438 | |
|
431 | 439 | .btn-mini { |
|
432 | 440 | float: left; |
|
433 | 441 | margin: 0 5px 0 0; |
|
434 | 442 | } |
|
435 | 443 | |
|
436 | 444 | .code-header { |
|
437 | 445 | padding: @padding; |
|
438 | 446 | border-bottom: @border-thickness solid @grey5; |
|
439 | 447 | |
|
440 | 448 | .rc-user { |
|
441 | 449 | min-width: 0; |
|
442 | 450 | margin-right: .5em; |
|
443 | 451 | } |
|
444 | 452 | |
|
445 | 453 | .stats { |
|
446 | 454 | clear: both; |
|
447 | 455 | margin: 0 0 @padding 0; |
|
448 | 456 | padding: 0; |
|
449 | 457 | .left { |
|
450 | 458 | float: left; |
|
451 | 459 | clear: left; |
|
452 | 460 | max-width: 75%; |
|
453 | 461 | margin: 0 0 @padding 0; |
|
454 | 462 | |
|
455 | 463 | &.item { |
|
456 | 464 | margin-right: @padding; |
|
457 | 465 | &.last { border-right: none; } |
|
458 | 466 | } |
|
459 | 467 | } |
|
460 | 468 | .buttons { float: right; } |
|
461 | 469 | .author { |
|
462 | 470 | height: 25px; margin-left: 15px; font-weight: bold; |
|
463 | 471 | } |
|
464 | 472 | } |
|
465 | 473 | |
|
466 | 474 | .commit { |
|
467 | 475 | margin: 5px 0 0 26px; |
|
468 | 476 | font-weight: normal; |
|
469 | 477 | white-space: pre-wrap; |
|
470 | 478 | } |
|
471 | 479 | } |
|
472 | 480 | |
|
473 | 481 | .message { |
|
474 | 482 | position: relative; |
|
475 | 483 | margin: @padding; |
|
476 | 484 | |
|
477 | 485 | .codeblock-label { |
|
478 | 486 | margin: 0 0 1em 0; |
|
479 | 487 | } |
|
480 | 488 | } |
|
481 | 489 | |
|
482 | 490 | .code-body { |
|
483 | 491 | padding: 0.8em 1em; |
|
484 | 492 | background-color: #ffffff; |
|
485 | 493 | min-width: 100%; |
|
486 | 494 | box-sizing: border-box; |
|
487 | 495 | // TODO: johbo: Parent has overflow: auto, this forces the child here |
|
488 | 496 | // to have the intended size and to scroll. Should be simplified. |
|
489 | 497 | width: 100%; |
|
490 | 498 | overflow-x: auto; |
|
491 | 499 | |
|
492 | 500 | img.rendered-binary { |
|
493 | 501 | height: auto; |
|
494 | 502 | width: 100%; |
|
495 | 503 | } |
|
496 | 504 | |
|
497 | 505 | .markdown-block { |
|
498 | 506 | padding: 1em 0; |
|
499 | 507 | } |
|
500 | 508 | } |
|
501 | 509 | |
|
502 | 510 | .codeblock-header { |
|
503 | 511 | background: @grey7; |
|
504 | 512 | height: 36px; |
|
505 | 513 | } |
|
506 | 514 | |
|
507 | 515 | .path { |
|
508 | 516 | border-bottom: 1px solid @grey6; |
|
509 | 517 | padding: .65em 1em; |
|
510 | 518 | height: 18px; |
|
511 | 519 | } |
|
512 | 520 | } |
|
513 | 521 | |
|
514 | 522 | .code-highlighttable, |
|
515 | 523 | div.codeblock { |
|
516 | 524 | |
|
517 | 525 | &.readme { |
|
518 | 526 | background-color: white; |
|
519 | 527 | } |
|
520 | 528 | |
|
521 | 529 | .markdown-block table { |
|
522 | 530 | border-collapse: collapse; |
|
523 | 531 | |
|
524 | 532 | th, |
|
525 | 533 | td { |
|
526 | 534 | padding: .5em; |
|
527 | 535 | border: @border-thickness solid @border-default-color; |
|
528 | 536 | } |
|
529 | 537 | } |
|
530 | 538 | |
|
531 | 539 | table { |
|
532 | 540 | border: 0px; |
|
533 | 541 | margin: 0; |
|
534 | 542 | letter-spacing: normal; |
|
535 | 543 | |
|
536 | 544 | |
|
537 | 545 | td { |
|
538 | 546 | border: 0px; |
|
539 | 547 | vertical-align: top; |
|
540 | 548 | } |
|
541 | 549 | } |
|
542 | 550 | } |
|
543 | 551 | |
|
544 | 552 | div.codeblock .code-header .search-path { padding: 0 0 0 10px; } |
|
545 | 553 | div.search-code-body { |
|
546 | 554 | background-color: #ffffff; padding: 5px 0 5px 10px; |
|
547 | 555 | pre { |
|
548 | 556 | .match { background-color: #faffa6;} |
|
549 | 557 | .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; } |
|
550 | 558 | } |
|
551 | 559 | .code-highlighttable { |
|
552 | 560 | border-collapse: collapse; |
|
553 | 561 | |
|
554 | 562 | tr:hover { |
|
555 | 563 | background: #fafafa; |
|
556 | 564 | } |
|
557 | 565 | td.code { |
|
558 | 566 | padding-left: 10px; |
|
559 | 567 | } |
|
560 | 568 | td.line { |
|
561 | 569 | border-right: 1px solid #ccc !important; |
|
562 | 570 | padding-right: 10px; |
|
563 | 571 | text-align: right; |
|
564 | 572 | font-family: @text-monospace; |
|
565 | 573 | span { |
|
566 | 574 | white-space: pre-wrap; |
|
567 | 575 | color: #666666; |
|
568 | 576 | } |
|
569 | 577 | } |
|
570 | 578 | } |
|
571 | 579 | } |
|
572 | 580 | |
|
573 | 581 | div.annotatediv { margin-left: 2px; margin-right: 4px; } |
|
574 | 582 | .code-highlight { |
|
575 | 583 | margin: 0; padding: 0; border-left: @border-thickness solid @grey5; |
|
576 | 584 | pre, .linenodiv pre { padding: 0 5px; margin: 0; } |
|
577 | 585 | pre div:target {background-color: @comment-highlight-color !important;} |
|
578 | 586 | } |
|
579 | 587 | |
|
580 | 588 | .linenos a { text-decoration: none; } |
|
581 | 589 | |
|
582 | 590 | .CodeMirror-selected { background: @rchighlightblue; } |
|
583 | 591 | .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; } |
|
584 | 592 | .CodeMirror ::selection { background: @rchighlightblue; } |
|
585 | 593 | .CodeMirror ::-moz-selection { background: @rchighlightblue; } |
|
586 | 594 | |
|
587 | 595 | .code { display: block; border:0px !important; } |
|
588 | 596 | .code-highlight, /* TODO: dan: merge codehilite into code-highlight */ |
|
589 | 597 | /* This can be generated with `pygmentize -S default -f html` */ |
|
590 | 598 | .codehilite { |
|
591 | 599 | .c-ElasticMatch { background-color: #faffa6; padding: 0.2em;} |
|
592 | 600 | .hll { background-color: #ffffcc } |
|
593 | 601 | .c { color: #408080; font-style: italic } /* Comment */ |
|
594 | 602 | .err, .codehilite .err { border: none } /* Error */ |
|
595 | 603 | .k { color: #008000; font-weight: bold } /* Keyword */ |
|
596 | 604 | .o { color: #666666 } /* Operator */ |
|
597 | 605 | .ch { color: #408080; font-style: italic } /* Comment.Hashbang */ |
|
598 | 606 | .cm { color: #408080; font-style: italic } /* Comment.Multiline */ |
|
599 | 607 | .cp { color: #BC7A00 } /* Comment.Preproc */ |
|
600 | 608 | .cpf { color: #408080; font-style: italic } /* Comment.PreprocFile */ |
|
601 | 609 | .c1 { color: #408080; font-style: italic } /* Comment.Single */ |
|
602 | 610 | .cs { color: #408080; font-style: italic } /* Comment.Special */ |
|
603 | 611 | .gd { color: #A00000 } /* Generic.Deleted */ |
|
604 | 612 | .ge { font-style: italic } /* Generic.Emph */ |
|
605 | 613 | .gr { color: #FF0000 } /* Generic.Error */ |
|
606 | 614 | .gh { color: #000080; font-weight: bold } /* Generic.Heading */ |
|
607 | 615 | .gi { color: #00A000 } /* Generic.Inserted */ |
|
608 | 616 | .go { color: #888888 } /* Generic.Output */ |
|
609 | 617 | .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ |
|
610 | 618 | .gs { font-weight: bold } /* Generic.Strong */ |
|
611 | 619 | .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ |
|
612 | 620 | .gt { color: #0044DD } /* Generic.Traceback */ |
|
613 | 621 | .kc { color: #008000; font-weight: bold } /* Keyword.Constant */ |
|
614 | 622 | .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */ |
|
615 | 623 | .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */ |
|
616 | 624 | .kp { color: #008000 } /* Keyword.Pseudo */ |
|
617 | 625 | .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */ |
|
618 | 626 | .kt { color: #B00040 } /* Keyword.Type */ |
|
619 | 627 | .m { color: #666666 } /* Literal.Number */ |
|
620 | 628 | .s { color: #BA2121 } /* Literal.String */ |
|
621 | 629 | .na { color: #7D9029 } /* Name.Attribute */ |
|
622 | 630 | .nb { color: #008000 } /* Name.Builtin */ |
|
623 | 631 | .nc { color: #0000FF; font-weight: bold } /* Name.Class */ |
|
624 | 632 | .no { color: #880000 } /* Name.Constant */ |
|
625 | 633 | .nd { color: #AA22FF } /* Name.Decorator */ |
|
626 | 634 | .ni { color: #999999; font-weight: bold } /* Name.Entity */ |
|
627 | 635 | .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ |
|
628 | 636 | .nf { color: #0000FF } /* Name.Function */ |
|
629 | 637 | .nl { color: #A0A000 } /* Name.Label */ |
|
630 | 638 | .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ |
|
631 | 639 | .nt { color: #008000; font-weight: bold } /* Name.Tag */ |
|
632 | 640 | .nv { color: #19177C } /* Name.Variable */ |
|
633 | 641 | .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ |
|
634 | 642 | .w { color: #bbbbbb } /* Text.Whitespace */ |
|
635 | 643 | .mb { color: #666666 } /* Literal.Number.Bin */ |
|
636 | 644 | .mf { color: #666666 } /* Literal.Number.Float */ |
|
637 | 645 | .mh { color: #666666 } /* Literal.Number.Hex */ |
|
638 | 646 | .mi { color: #666666 } /* Literal.Number.Integer */ |
|
639 | 647 | .mo { color: #666666 } /* Literal.Number.Oct */ |
|
640 | 648 | .sa { color: #BA2121 } /* Literal.String.Affix */ |
|
641 | 649 | .sb { color: #BA2121 } /* Literal.String.Backtick */ |
|
642 | 650 | .sc { color: #BA2121 } /* Literal.String.Char */ |
|
643 | 651 | .dl { color: #BA2121 } /* Literal.String.Delimiter */ |
|
644 | 652 | .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */ |
|
645 | 653 | .s2 { color: #BA2121 } /* Literal.String.Double */ |
|
646 | 654 | .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ |
|
647 | 655 | .sh { color: #BA2121 } /* Literal.String.Heredoc */ |
|
648 | 656 | .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ |
|
649 | 657 | .sx { color: #008000 } /* Literal.String.Other */ |
|
650 | 658 | .sr { color: #BB6688 } /* Literal.String.Regex */ |
|
651 | 659 | .s1 { color: #BA2121 } /* Literal.String.Single */ |
|
652 | 660 | .ss { color: #19177C } /* Literal.String.Symbol */ |
|
653 | 661 | .bp { color: #008000 } /* Name.Builtin.Pseudo */ |
|
654 | 662 | .fm { color: #0000FF } /* Name.Function.Magic */ |
|
655 | 663 | .vc { color: #19177C } /* Name.Variable.Class */ |
|
656 | 664 | .vg { color: #19177C } /* Name.Variable.Global */ |
|
657 | 665 | .vi { color: #19177C } /* Name.Variable.Instance */ |
|
658 | 666 | .vm { color: #19177C } /* Name.Variable.Magic */ |
|
659 | 667 | .il { color: #666666 } /* Literal.Number.Integer.Long */ |
|
660 | 668 | |
|
661 | 669 | } |
|
662 | 670 | |
|
663 | 671 | /* customized pre blocks for markdown/rst */ |
|
664 | 672 | pre.literal-block, .codehilite pre{ |
|
665 | 673 | padding: @padding; |
|
666 | 674 | border: 1px solid @grey6; |
|
667 | 675 | .border-radius(@border-radius); |
|
668 | 676 | background-color: @grey7; |
|
669 | 677 | } |
|
670 | 678 | |
|
671 | 679 | |
|
672 | 680 | /* START NEW CODE BLOCK CSS */ |
|
673 | 681 | |
|
674 | 682 | @cb-line-height: 18px; |
|
675 | 683 | @cb-line-code-padding: 10px; |
|
676 | 684 | @cb-text-padding: 5px; |
|
677 | 685 | |
|
678 | 686 | @pill-padding: 2px 7px; |
|
679 | 687 | @pill-padding-small: 2px 2px 1px 2px; |
|
680 | 688 | |
|
681 | 689 | input.filediff-collapse-state { |
|
682 | 690 | display: none; |
|
683 | 691 | |
|
684 | 692 | &:checked + .filediff { /* file diff is collapsed */ |
|
685 | 693 | .cb { |
|
686 | 694 | display: none |
|
687 | 695 | } |
|
688 | 696 | .filediff-collapse-indicator { |
|
689 | 697 | float: left; |
|
690 | 698 | cursor: pointer; |
|
691 | 699 | margin: 1px -5px; |
|
692 | 700 | } |
|
693 | 701 | .filediff-collapse-indicator:before { |
|
694 | 702 | content: '\f105'; |
|
695 | 703 | } |
|
696 | 704 | |
|
697 | 705 | .filediff-menu { |
|
698 | 706 | display: none; |
|
699 | 707 | } |
|
700 | 708 | |
|
701 | 709 | } |
|
702 | 710 | |
|
703 | 711 | &+ .filediff { /* file diff is expanded */ |
|
704 | 712 | |
|
705 | 713 | .filediff-collapse-indicator { |
|
706 | 714 | float: left; |
|
707 | 715 | cursor: pointer; |
|
708 | 716 | margin: 1px -5px; |
|
709 | 717 | } |
|
710 | 718 | .filediff-collapse-indicator:before { |
|
711 | 719 | content: '\f107'; |
|
712 | 720 | } |
|
713 | 721 | |
|
714 | 722 | .filediff-menu { |
|
715 | 723 | display: block; |
|
716 | 724 | } |
|
717 | 725 | |
|
718 | 726 | margin: 10px 0; |
|
719 | 727 | &:nth-child(2) { |
|
720 | 728 | margin: 0; |
|
721 | 729 | } |
|
722 | 730 | } |
|
723 | 731 | } |
|
724 | 732 | |
|
725 | 733 | .filediffs .anchor { |
|
726 | 734 | display: block; |
|
727 | 735 | height: 40px; |
|
728 | 736 | margin-top: -40px; |
|
729 | 737 | visibility: hidden; |
|
730 | 738 | } |
|
731 | 739 | |
|
732 | 740 | .filediffs .anchor:nth-of-type(1) { |
|
733 | 741 | display: block; |
|
734 | 742 | height: 80px; |
|
735 | 743 | margin-top: -80px; |
|
736 | 744 | visibility: hidden; |
|
737 | 745 | } |
|
738 | 746 | |
|
739 | 747 | .cs_files { |
|
740 | 748 | clear: both; |
|
741 | 749 | } |
|
742 | 750 | |
|
743 | 751 | #diff-file-sticky{ |
|
744 | 752 | will-change: min-height; |
|
745 | 753 | height: 80px; |
|
746 | 754 | } |
|
747 | 755 | |
|
748 | 756 | .sidebar__inner{ |
|
749 | 757 | transform: translate(0, 0); /* For browsers don't support translate3d. */ |
|
750 | 758 | transform: translate3d(0, 0, 0); |
|
751 | 759 | will-change: position, transform; |
|
752 | 760 | height: 65px; |
|
753 | 761 | background-color: #fff; |
|
754 | 762 | padding: 5px 0px; |
|
755 | 763 | } |
|
756 | 764 | |
|
757 | 765 | .sidebar__bar { |
|
758 | 766 | padding: 5px 0px 0px 0px |
|
759 | 767 | } |
|
760 | 768 | |
|
761 | 769 | .fpath-placeholder { |
|
762 | 770 | clear: both; |
|
763 | 771 | visibility: hidden |
|
764 | 772 | } |
|
765 | 773 | |
|
766 | 774 | .is-affixed { |
|
767 | 775 | |
|
768 | 776 | .sidebar__inner { |
|
769 | 777 | z-index: 30; |
|
770 | 778 | } |
|
771 | 779 | |
|
772 | 780 | .sidebar_inner_shadow { |
|
773 | 781 | position: fixed; |
|
774 | 782 | top: 75px; |
|
775 | 783 | right: -100%; |
|
776 | 784 | left: -100%; |
|
777 | 785 | z-index: 30; |
|
778 | 786 | display: block; |
|
779 | 787 | height: 5px; |
|
780 | 788 | content: ""; |
|
781 | 789 | background: linear-gradient(rgba(0, 0, 0, 0.075), rgba(0, 0, 0, 0.001)) repeat-x 0 0; |
|
782 | 790 | border-top: 1px solid rgba(0, 0, 0, 0.15); |
|
783 | 791 | } |
|
784 | 792 | |
|
785 | 793 | .fpath-placeholder { |
|
786 | 794 | visibility: visible !important; |
|
787 | 795 | } |
|
788 | 796 | } |
|
789 | 797 | |
|
790 | 798 | .diffset-menu { |
|
791 | 799 | |
|
792 | 800 | } |
|
793 | 801 | |
|
794 | 802 | #todo-box { |
|
795 | 803 | clear:both; |
|
796 | 804 | display: none; |
|
797 | 805 | text-align: right |
|
798 | 806 | } |
|
799 | 807 | |
|
800 | 808 | .diffset { |
|
801 | 809 | margin: 0px auto; |
|
802 | 810 | .diffset-heading { |
|
803 | 811 | border: 1px solid @grey5; |
|
804 | 812 | margin-bottom: -1px; |
|
805 | 813 | // margin-top: 20px; |
|
806 | 814 | h2 { |
|
807 | 815 | margin: 0; |
|
808 | 816 | line-height: 38px; |
|
809 | 817 | padding-left: 10px; |
|
810 | 818 | } |
|
811 | 819 | .btn { |
|
812 | 820 | margin: 0; |
|
813 | 821 | } |
|
814 | 822 | background: @grey6; |
|
815 | 823 | display: block; |
|
816 | 824 | padding: 5px; |
|
817 | 825 | } |
|
818 | 826 | .diffset-heading-warning { |
|
819 | 827 | background: @alert3-inner; |
|
820 | 828 | border: 1px solid @alert3; |
|
821 | 829 | } |
|
822 | 830 | &.diffset-comments-disabled { |
|
823 | 831 | .cb-comment-box-opener, .comment-inline-form, .cb-comment-add-button { |
|
824 | 832 | display: none !important; |
|
825 | 833 | } |
|
826 | 834 | } |
|
827 | 835 | } |
|
828 | 836 | |
|
829 | 837 | .filelist { |
|
830 | 838 | .pill { |
|
831 | 839 | display: block; |
|
832 | 840 | float: left; |
|
833 | 841 | padding: @pill-padding-small; |
|
834 | 842 | } |
|
835 | 843 | } |
|
836 | 844 | |
|
837 | 845 | .pill { |
|
838 | 846 | display: block; |
|
839 | 847 | float: left; |
|
840 | 848 | padding: @pill-padding; |
|
841 | 849 | } |
|
842 | 850 | |
|
843 | 851 | .pill-group { |
|
844 | 852 | .pill { |
|
845 | 853 | opacity: .8; |
|
846 | 854 | margin-right: 3px; |
|
847 | 855 | font-size: 12px; |
|
848 | 856 | font-weight: normal; |
|
849 | 857 | min-width: 30px; |
|
850 | 858 | text-align: center; |
|
851 | 859 | |
|
852 | 860 | &:first-child { |
|
853 | 861 | border-radius: @border-radius 0 0 @border-radius; |
|
854 | 862 | } |
|
855 | 863 | &:last-child { |
|
856 | 864 | border-radius: 0 @border-radius @border-radius 0; |
|
857 | 865 | } |
|
858 | 866 | &:only-child { |
|
859 | 867 | border-radius: @border-radius; |
|
860 | 868 | margin-right: 0; |
|
861 | 869 | } |
|
862 | 870 | } |
|
863 | 871 | } |
|
864 | 872 | |
|
865 | 873 | /* Main comments*/ |
|
866 | 874 | #comments { |
|
867 | 875 | .comment-selected { |
|
868 | 876 | border-left: 6px solid @comment-highlight-color; |
|
869 | 877 | padding-left: 3px; |
|
870 | 878 | margin-left: -9px; |
|
871 | 879 | } |
|
872 | 880 | } |
|
873 | 881 | |
|
874 | 882 | .filediff { |
|
875 | 883 | border: 1px solid @grey5; |
|
876 | 884 | |
|
877 | 885 | /* START OVERRIDES */ |
|
878 | 886 | .code-highlight { |
|
879 | 887 | border: none; // TODO: remove this border from the global |
|
880 | 888 | // .code-highlight, it doesn't belong there |
|
881 | 889 | } |
|
882 | 890 | label { |
|
883 | 891 | margin: 0; // TODO: remove this margin definition from global label |
|
884 | 892 | // it doesn't belong there - if margin on labels |
|
885 | 893 | // are needed for a form they should be defined |
|
886 | 894 | // in the form's class |
|
887 | 895 | } |
|
888 | 896 | /* END OVERRIDES */ |
|
889 | 897 | |
|
890 | 898 | * { |
|
891 | 899 | box-sizing: border-box; |
|
892 | 900 | } |
|
893 | 901 | .filediff-anchor { |
|
894 | 902 | visibility: hidden; |
|
895 | 903 | } |
|
896 | 904 | &:hover { |
|
897 | 905 | .filediff-anchor { |
|
898 | 906 | visibility: visible; |
|
899 | 907 | } |
|
900 | 908 | } |
|
901 | 909 | |
|
902 | 910 | .filediff-heading { |
|
903 | 911 | cursor: pointer; |
|
904 | 912 | display: block; |
|
905 | 913 | padding: 10px 10px; |
|
906 | 914 | } |
|
907 | 915 | .filediff-heading:after { |
|
908 | 916 | content: ""; |
|
909 | 917 | display: table; |
|
910 | 918 | clear: both; |
|
911 | 919 | } |
|
912 | 920 | .filediff-heading:hover { |
|
913 | 921 | background: #e1e9f4 !important; |
|
914 | 922 | } |
|
915 | 923 | |
|
916 | 924 | .filediff-menu { |
|
917 | 925 | text-align: right; |
|
918 | 926 | padding: 5px 5px 5px 0px; |
|
919 | 927 | background: @grey7; |
|
920 | 928 | |
|
921 | 929 | &> a, |
|
922 | 930 | &> span { |
|
923 | 931 | padding: 1px; |
|
924 | 932 | } |
|
925 | 933 | } |
|
926 | 934 | |
|
927 | 935 | .filediff-collapse-button, .filediff-expand-button { |
|
928 | 936 | cursor: pointer; |
|
929 | 937 | } |
|
930 | 938 | .filediff-collapse-button { |
|
931 | 939 | display: inline; |
|
932 | 940 | } |
|
933 | 941 | .filediff-expand-button { |
|
934 | 942 | display: none; |
|
935 | 943 | } |
|
936 | 944 | .filediff-collapsed .filediff-collapse-button { |
|
937 | 945 | display: none; |
|
938 | 946 | } |
|
939 | 947 | .filediff-collapsed .filediff-expand-button { |
|
940 | 948 | display: inline; |
|
941 | 949 | } |
|
942 | 950 | |
|
943 | 951 | /**** COMMENTS ****/ |
|
944 | 952 | |
|
945 | 953 | .filediff-menu { |
|
946 | 954 | .show-comment-button { |
|
947 | 955 | display: none; |
|
948 | 956 | } |
|
949 | 957 | } |
|
950 | 958 | &.hide-comments { |
|
951 | 959 | .inline-comments { |
|
952 | 960 | display: none; |
|
953 | 961 | } |
|
954 | 962 | .filediff-menu { |
|
955 | 963 | .show-comment-button { |
|
956 | 964 | display: inline; |
|
957 | 965 | } |
|
958 | 966 | .hide-comment-button { |
|
959 | 967 | display: none; |
|
960 | 968 | } |
|
961 | 969 | } |
|
962 | 970 | } |
|
963 | 971 | |
|
964 | 972 | .hide-line-comments { |
|
965 | 973 | .inline-comments { |
|
966 | 974 | display: none; |
|
967 | 975 | } |
|
968 | 976 | } |
|
969 | 977 | |
|
970 | 978 | /**** END COMMENTS ****/ |
|
971 | 979 | |
|
972 | 980 | } |
|
973 | 981 | |
|
974 | 982 | |
|
975 | 983 | .op-added { |
|
976 | 984 | color: @alert1; |
|
977 | 985 | } |
|
978 | 986 | |
|
979 | 987 | .op-deleted { |
|
980 | 988 | color: @alert2; |
|
981 | 989 | } |
|
982 | 990 | |
|
983 | 991 | .filediff, .filelist { |
|
984 | 992 | |
|
985 | 993 | .pill { |
|
986 | 994 | &[op="name"] { |
|
987 | 995 | background: none; |
|
988 | 996 | opacity: 1; |
|
989 | 997 | color: white; |
|
990 | 998 | } |
|
991 | 999 | &[op="limited"] { |
|
992 | 1000 | background: @grey2; |
|
993 | 1001 | color: white; |
|
994 | 1002 | } |
|
995 | 1003 | &[op="binary"] { |
|
996 | 1004 | background: @color7; |
|
997 | 1005 | color: white; |
|
998 | 1006 | } |
|
999 | 1007 | &[op="modified"] { |
|
1000 | 1008 | background: @alert1; |
|
1001 | 1009 | color: white; |
|
1002 | 1010 | } |
|
1003 | 1011 | &[op="renamed"] { |
|
1004 | 1012 | background: @color4; |
|
1005 | 1013 | color: white; |
|
1006 | 1014 | } |
|
1007 | 1015 | &[op="copied"] { |
|
1008 | 1016 | background: @color4; |
|
1009 | 1017 | color: white; |
|
1010 | 1018 | } |
|
1011 | 1019 | &[op="mode"] { |
|
1012 | 1020 | background: @grey3; |
|
1013 | 1021 | color: white; |
|
1014 | 1022 | } |
|
1015 | 1023 | &[op="symlink"] { |
|
1016 | 1024 | background: @color8; |
|
1017 | 1025 | color: white; |
|
1018 | 1026 | } |
|
1019 | 1027 | |
|
1020 | 1028 | &[op="added"] { /* added lines */ |
|
1021 | 1029 | background: @alert1; |
|
1022 | 1030 | color: white; |
|
1023 | 1031 | } |
|
1024 | 1032 | &[op="deleted"] { /* deleted lines */ |
|
1025 | 1033 | background: @alert2; |
|
1026 | 1034 | color: white; |
|
1027 | 1035 | } |
|
1028 | 1036 | |
|
1029 | 1037 | &[op="created"] { /* created file */ |
|
1030 | 1038 | background: @alert1; |
|
1031 | 1039 | color: white; |
|
1032 | 1040 | } |
|
1033 | 1041 | &[op="removed"] { /* deleted file */ |
|
1034 | 1042 | background: @color5; |
|
1035 | 1043 | color: white; |
|
1036 | 1044 | } |
|
1037 | 1045 | } |
|
1038 | 1046 | } |
|
1039 | 1047 | |
|
1040 | 1048 | |
|
1041 | 1049 | .filediff-outdated { |
|
1042 | 1050 | padding: 8px 0; |
|
1043 | 1051 | |
|
1044 | 1052 | .filediff-heading { |
|
1045 | 1053 | opacity: .5; |
|
1046 | 1054 | } |
|
1047 | 1055 | } |
|
1048 | 1056 | |
|
1049 | 1057 | table.cb { |
|
1050 | 1058 | width: 100%; |
|
1051 | 1059 | border-collapse: collapse; |
|
1052 | 1060 | |
|
1053 | 1061 | .cb-text { |
|
1054 | 1062 | padding: @cb-text-padding; |
|
1055 | 1063 | } |
|
1056 | 1064 | .cb-hunk { |
|
1057 | 1065 | padding: @cb-text-padding; |
|
1058 | 1066 | } |
|
1059 | 1067 | .cb-expand { |
|
1060 | 1068 | display: none; |
|
1061 | 1069 | } |
|
1062 | 1070 | .cb-collapse { |
|
1063 | 1071 | display: inline; |
|
1064 | 1072 | } |
|
1065 | 1073 | &.cb-collapsed { |
|
1066 | 1074 | .cb-line { |
|
1067 | 1075 | display: none; |
|
1068 | 1076 | } |
|
1069 | 1077 | .cb-expand { |
|
1070 | 1078 | display: inline; |
|
1071 | 1079 | } |
|
1072 | 1080 | .cb-collapse { |
|
1073 | 1081 | display: none; |
|
1074 | 1082 | } |
|
1075 | 1083 | .cb-hunk { |
|
1076 | 1084 | display: none; |
|
1077 | 1085 | } |
|
1078 | 1086 | } |
|
1079 | 1087 | |
|
1080 | 1088 | /* intentionally general selector since .cb-line-selected must override it |
|
1081 | 1089 | and they both use !important since the td itself may have a random color |
|
1082 | 1090 | generated by annotation blocks. TLDR: if you change it, make sure |
|
1083 | 1091 | annotated block selection and line selection in file view still work */ |
|
1084 | 1092 | .cb-line-fresh .cb-content { |
|
1085 | 1093 | background: white !important; |
|
1086 | 1094 | } |
|
1087 | 1095 | .cb-warning { |
|
1088 | 1096 | background: #fff4dd; |
|
1089 | 1097 | } |
|
1090 | 1098 | |
|
1091 | 1099 | &.cb-diff-sideside { |
|
1092 | 1100 | td { |
|
1093 | 1101 | &.cb-content { |
|
1094 | 1102 | width: 50%; |
|
1095 | 1103 | } |
|
1096 | 1104 | } |
|
1097 | 1105 | } |
|
1098 | 1106 | |
|
1099 | 1107 | tr { |
|
1100 | 1108 | &.cb-annotate { |
|
1101 | 1109 | border-top: 1px solid #eee; |
|
1102 | 1110 | } |
|
1103 | 1111 | |
|
1104 | 1112 | &.cb-comment-info { |
|
1105 | 1113 | border-top: 1px solid #eee; |
|
1106 | 1114 | color: rgba(0, 0, 0, 0.3); |
|
1107 | 1115 | background: #edf2f9; |
|
1108 | 1116 | |
|
1109 | 1117 | td { |
|
1110 | 1118 | |
|
1111 | 1119 | } |
|
1112 | 1120 | } |
|
1113 | 1121 | |
|
1114 | 1122 | &.cb-hunk { |
|
1115 | 1123 | font-family: @text-monospace; |
|
1116 | 1124 | color: rgba(0, 0, 0, 0.3); |
|
1117 | 1125 | |
|
1118 | 1126 | td { |
|
1119 | 1127 | &:first-child { |
|
1120 | 1128 | background: #edf2f9; |
|
1121 | 1129 | } |
|
1122 | 1130 | &:last-child { |
|
1123 | 1131 | background: #f4f7fb; |
|
1124 | 1132 | } |
|
1125 | 1133 | } |
|
1126 | 1134 | } |
|
1127 | 1135 | } |
|
1128 | 1136 | |
|
1129 | 1137 | |
|
1130 | 1138 | td { |
|
1131 | 1139 | vertical-align: top; |
|
1132 | 1140 | padding: 0; |
|
1133 | 1141 | |
|
1134 | 1142 | &.cb-content { |
|
1135 | 1143 | font-size: 12.35px; |
|
1136 | 1144 | |
|
1137 | 1145 | &.cb-line-selected .cb-code { |
|
1138 | 1146 | background: @comment-highlight-color !important; |
|
1139 | 1147 | } |
|
1140 | 1148 | |
|
1141 | 1149 | span.cb-code { |
|
1142 | 1150 | line-height: @cb-line-height; |
|
1143 | 1151 | padding-left: @cb-line-code-padding; |
|
1144 | 1152 | padding-right: @cb-line-code-padding; |
|
1145 | 1153 | display: block; |
|
1146 | 1154 | white-space: pre-wrap; |
|
1147 | 1155 | font-family: @text-monospace; |
|
1148 | 1156 | word-break: break-all; |
|
1149 | 1157 | .nonl { |
|
1150 | 1158 | color: @color5; |
|
1151 | 1159 | } |
|
1152 | 1160 | .cb-action { |
|
1153 | 1161 | &:before { |
|
1154 | 1162 | content: " "; |
|
1155 | 1163 | } |
|
1156 | 1164 | &.cb-deletion:before { |
|
1157 | 1165 | content: "- "; |
|
1158 | 1166 | } |
|
1159 | 1167 | &.cb-addition:before { |
|
1160 | 1168 | content: "+ "; |
|
1161 | 1169 | } |
|
1162 | 1170 | } |
|
1163 | 1171 | } |
|
1164 | 1172 | |
|
1165 | 1173 | &> button.cb-comment-box-opener { |
|
1166 | 1174 | |
|
1167 | 1175 | padding: 2px 2px 1px 3px; |
|
1168 | 1176 | margin-left: -6px; |
|
1169 | 1177 | margin-top: -1px; |
|
1170 | 1178 | |
|
1171 | 1179 | border-radius: @border-radius; |
|
1172 | 1180 | position: absolute; |
|
1173 | 1181 | display: none; |
|
1174 | 1182 | } |
|
1175 | 1183 | .cb-comment { |
|
1176 | 1184 | margin-top: 10px; |
|
1177 | 1185 | white-space: normal; |
|
1178 | 1186 | } |
|
1179 | 1187 | } |
|
1180 | 1188 | &:hover { |
|
1181 | 1189 | button.cb-comment-box-opener { |
|
1182 | 1190 | display: block; |
|
1183 | 1191 | } |
|
1184 | 1192 | &+ td button.cb-comment-box-opener { |
|
1185 | 1193 | display: block |
|
1186 | 1194 | } |
|
1187 | 1195 | } |
|
1188 | 1196 | |
|
1189 | 1197 | &.cb-data { |
|
1190 | 1198 | text-align: right; |
|
1191 | 1199 | width: 30px; |
|
1192 | 1200 | font-family: @text-monospace; |
|
1193 | 1201 | |
|
1194 | 1202 | .icon-comment { |
|
1195 | 1203 | cursor: pointer; |
|
1196 | 1204 | } |
|
1197 | 1205 | &.cb-line-selected { |
|
1198 | 1206 | background: @comment-highlight-color !important; |
|
1199 | 1207 | } |
|
1200 | 1208 | &.cb-line-selected > div { |
|
1201 | 1209 | display: block; |
|
1202 | 1210 | background: @comment-highlight-color !important; |
|
1203 | 1211 | line-height: @cb-line-height; |
|
1204 | 1212 | color: rgba(0, 0, 0, 0.3); |
|
1205 | 1213 | } |
|
1206 | 1214 | } |
|
1207 | 1215 | |
|
1208 | 1216 | &.cb-lineno { |
|
1209 | 1217 | padding: 0; |
|
1210 | 1218 | width: 50px; |
|
1211 | 1219 | color: rgba(0, 0, 0, 0.3); |
|
1212 | 1220 | text-align: right; |
|
1213 | 1221 | border-right: 1px solid #eee; |
|
1214 | 1222 | font-family: @text-monospace; |
|
1215 | 1223 | -webkit-user-select: none; |
|
1216 | 1224 | -moz-user-select: none; |
|
1217 | 1225 | user-select: none; |
|
1218 | 1226 | |
|
1219 | 1227 | a::before { |
|
1220 | 1228 | content: attr(data-line-no); |
|
1221 | 1229 | } |
|
1222 | 1230 | &.cb-line-selected { |
|
1223 | 1231 | background: @comment-highlight-color !important; |
|
1224 | 1232 | } |
|
1225 | 1233 | |
|
1226 | 1234 | a { |
|
1227 | 1235 | display: block; |
|
1228 | 1236 | padding-right: @cb-line-code-padding; |
|
1229 | 1237 | padding-left: @cb-line-code-padding; |
|
1230 | 1238 | line-height: @cb-line-height; |
|
1231 | 1239 | color: rgba(0, 0, 0, 0.3); |
|
1232 | 1240 | } |
|
1233 | 1241 | } |
|
1234 | 1242 | |
|
1235 | 1243 | &.cb-empty { |
|
1236 | 1244 | background: @grey7; |
|
1237 | 1245 | } |
|
1238 | 1246 | |
|
1239 | 1247 | ins { |
|
1240 | 1248 | color: black; |
|
1241 | 1249 | background: #a6f3a6; |
|
1242 | 1250 | text-decoration: none; |
|
1243 | 1251 | } |
|
1244 | 1252 | del { |
|
1245 | 1253 | color: black; |
|
1246 | 1254 | background: #f8cbcb; |
|
1247 | 1255 | text-decoration: none; |
|
1248 | 1256 | } |
|
1249 | 1257 | &.cb-addition { |
|
1250 | 1258 | background: #ecffec; |
|
1251 | 1259 | |
|
1252 | 1260 | &.blob-lineno { |
|
1253 | 1261 | background: #ddffdd; |
|
1254 | 1262 | } |
|
1255 | 1263 | } |
|
1256 | 1264 | &.cb-deletion { |
|
1257 | 1265 | background: #ffecec; |
|
1258 | 1266 | |
|
1259 | 1267 | &.blob-lineno { |
|
1260 | 1268 | background: #ffdddd; |
|
1261 | 1269 | } |
|
1262 | 1270 | } |
|
1263 | 1271 | &.cb-annotate-message-spacer { |
|
1264 | 1272 | width:8px; |
|
1265 | 1273 | padding: 1px 0px 0px 3px; |
|
1266 | 1274 | } |
|
1267 | 1275 | &.cb-annotate-info { |
|
1268 | 1276 | width: 320px; |
|
1269 | 1277 | min-width: 320px; |
|
1270 | 1278 | max-width: 320px; |
|
1271 | 1279 | padding: 5px 2px; |
|
1272 | 1280 | font-size: 13px; |
|
1273 | 1281 | |
|
1274 | 1282 | .cb-annotate-message { |
|
1275 | 1283 | padding: 2px 0px 0px 0px; |
|
1276 | 1284 | white-space: pre-line; |
|
1277 | 1285 | overflow: hidden; |
|
1278 | 1286 | } |
|
1279 | 1287 | .rc-user { |
|
1280 | 1288 | float: none; |
|
1281 | 1289 | padding: 0 6px 0 17px; |
|
1282 | 1290 | min-width: unset; |
|
1283 | 1291 | min-height: unset; |
|
1284 | 1292 | } |
|
1285 | 1293 | } |
|
1286 | 1294 | |
|
1287 | 1295 | &.cb-annotate-revision { |
|
1288 | 1296 | cursor: pointer; |
|
1289 | 1297 | text-align: right; |
|
1290 | 1298 | padding: 1px 3px 0px 3px; |
|
1291 | 1299 | } |
|
1292 | 1300 | } |
|
1293 | 1301 | } |
@@ -1,141 +1,154 b'' | |||
|
1 | 1 | // tags.less |
|
2 | 2 | // For use in RhodeCode applications; |
|
3 | 3 | // see style guide documentation for guidelines. |
|
4 | 4 | |
|
5 | 5 | // TAGS |
|
6 | 6 | .tag, |
|
7 | 7 | .tagtag { |
|
8 | 8 | display: inline-block; |
|
9 | 9 | min-height: 0; |
|
10 | 10 | margin: 0 auto; |
|
11 | 11 | padding: .25em; |
|
12 | 12 | text-align: center; |
|
13 | 13 | font-size: (-1 + @basefontsize); //fit in tables |
|
14 | 14 | line-height: 1.1em; |
|
15 | 15 | border: none; |
|
16 | 16 | box-shadow: @button-shadow; |
|
17 | 17 | .border-radius(@border-radius); |
|
18 | 18 | font-family: @text-regular; |
|
19 | 19 | background-image: none; |
|
20 | 20 | color: @grey4; |
|
21 | 21 | .border ( @border-thickness-tags, @grey5 ); |
|
22 | 22 | white-space: nowrap; |
|
23 | 23 | a { |
|
24 | 24 | color: inherit; |
|
25 | 25 | |
|
26 | 26 | &:hover { |
|
27 | 27 | color: @grey2; |
|
28 | 28 | } |
|
29 | 29 | |
|
30 | 30 | i, |
|
31 | 31 | [class^="icon-"]:before, |
|
32 | 32 | [class*=" icon-"]:before { |
|
33 | 33 | text-decoration: none; |
|
34 | 34 | } |
|
35 | 35 | } |
|
36 | 36 | |
|
37 | 37 | &:hover { |
|
38 | 38 | border-color: @grey4; |
|
39 | 39 | } |
|
40 | 40 | } |
|
41 | 41 | |
|
42 | 42 | .tag0 { .border ( @border-thickness-tags, @grey4 ); color:@grey4; } |
|
43 | 43 | .tag1 { .border ( @border-thickness-tags, @color1 ); color:@color1; } |
|
44 | 44 | .tag2 { .border ( @border-thickness-tags, @color2 ); color:@color2; } |
|
45 | 45 | .tag3 { .border ( @border-thickness-tags, @color3 ); color:@color3; } |
|
46 | 46 | .tag4 { .border ( @border-thickness-tags, @color4 ); color:@color4; } |
|
47 | 47 | .tag5 { .border ( @border-thickness-tags, @color5 ); color:@color5; } |
|
48 | 48 | .tag6 { .border ( @border-thickness-tags, @color6 ); color:@color6; } |
|
49 | 49 | .tag7 { .border ( @border-thickness-tags, @color7 ); color:@color7; } |
|
50 | 50 | .tag8 { .border ( @border-thickness-tags, @color8 ); color:@color8; } |
|
51 | 51 | |
|
52 | ||
|
53 | .tag-gist-public { | |
|
54 | .border (@border-thickness-tags, @color1); | |
|
55 | color: @color1; | |
|
56 | } | |
|
57 | ||
|
58 | ||
|
59 | .tag-gist-private { | |
|
60 | .border (@border-thickness-tags, @color2); | |
|
61 | color: @color2; | |
|
62 | } | |
|
63 | ||
|
64 | ||
|
52 | 65 | .metatag-list { |
|
53 | 66 | margin: 0; |
|
54 | 67 | padding: 0; |
|
55 | 68 | |
|
56 | 69 | li { |
|
57 | 70 | margin: 0 0 @padding; |
|
58 | 71 | line-height: 1em; |
|
59 | 72 | list-style-type: none; |
|
60 | 73 | } |
|
61 | 74 | } |
|
62 | 75 | |
|
63 | 76 | .branchtag, .booktag { |
|
64 | 77 | &:extend(.tag); |
|
65 | 78 | |
|
66 | 79 | |
|
67 | 80 | a { |
|
68 | 81 | color:inherit; |
|
69 | 82 | } |
|
70 | 83 | } |
|
71 | 84 | |
|
72 | 85 | .metatag { |
|
73 | 86 | &:extend(.tag); |
|
74 | 87 | a { |
|
75 | 88 | color:inherit; |
|
76 | 89 | text-decoration: underline; |
|
77 | 90 | } |
|
78 | 91 | } |
|
79 | 92 | |
|
80 | 93 | [tag="generic"] { &:extend(.tag0); } |
|
81 | 94 | [tag="label"] { &:extend(.tag0); } |
|
82 | 95 | |
|
83 | 96 | [tag="state featured"] { &:extend(.tag1); } |
|
84 | 97 | [tag="state dev"] { &:extend(.tag1); } |
|
85 | 98 | [tag="ref base"] { &:extend(.tag1); } |
|
86 | 99 | |
|
87 | 100 | [tag="state stable"] { &:extend(.tag2); } |
|
88 | 101 | [tag="state stale"] { &:extend(.tag2); } |
|
89 | 102 | |
|
90 | 103 | [tag="ref requires"] { &:extend(.tag3); } |
|
91 | 104 | |
|
92 | 105 | [tag="state dead"] { &:extend(.tag4); } |
|
93 | 106 | [tag="state deprecated"] { &:extend(.tag4); } |
|
94 | 107 | |
|
95 | 108 | [tag="ref conflicts"] { &:extend(.tag4); } |
|
96 | 109 | |
|
97 | 110 | [tag="license"] { &:extend(.tag6); } |
|
98 | 111 | |
|
99 | 112 | [tag="lang"] { &:extend(.tag7); } |
|
100 | 113 | [tag="language"] { &:extend(.tag7); } |
|
101 | 114 | [tag="ref recommends"] { &:extend(.tag7); } |
|
102 | 115 | |
|
103 | 116 | [tag="see"] { &:extend(.tag8); } |
|
104 | 117 | [tag="url"] { &:extend(.tag8); } |
|
105 | 118 | |
|
106 | 119 | |
|
107 | 120 | .perm_overriden { |
|
108 | 121 | text-decoration: line-through; |
|
109 | 122 | opacity: 0.6; |
|
110 | 123 | } |
|
111 | 124 | |
|
112 | 125 | .perm_tag { |
|
113 | 126 | &:extend(.tag); |
|
114 | 127 | |
|
115 | 128 | &.read { |
|
116 | 129 | &:extend(.tag1); |
|
117 | 130 | } |
|
118 | 131 | &.write { |
|
119 | 132 | &:extend(.tag4); |
|
120 | 133 | } |
|
121 | 134 | &.admin { |
|
122 | 135 | &:extend(.tag5); |
|
123 | 136 | } |
|
124 | 137 | &.merge { |
|
125 | 138 | &:extend(.tag1); |
|
126 | 139 | } |
|
127 | 140 | &.push { |
|
128 | 141 | &:extend(.tag4); |
|
129 | 142 | } |
|
130 | 143 | &.push_force { |
|
131 | 144 | &:extend(.tag5); |
|
132 | 145 | } |
|
133 | 146 | } |
|
134 | 147 | |
|
135 | 148 | .phase-draft { |
|
136 | 149 | color: @color3 |
|
137 | 150 | } |
|
138 | 151 | |
|
139 | 152 | .phase-secret { |
|
140 | 153 | color:@grey3 |
|
141 | 154 | } |
@@ -1,111 +1,110 b'' | |||
|
1 | 1 | ## -*- coding: utf-8 -*- |
|
2 | 2 | <%inherit file="/base/base.mako"/> |
|
3 | <%namespace name="dt" file="/data_table/_dt_elements.mako"/> | |
|
3 | 4 | |
|
4 | 5 | <%def name="robots()"> |
|
5 | 6 | %if c.gist.gist_type != 'public': |
|
6 | 7 | <meta name="robots" content="noindex, nofollow"> |
|
7 | 8 | %else: |
|
8 | 9 | ${parent.robots()} |
|
9 | 10 | %endif |
|
10 | 11 | </%def> |
|
11 | 12 | |
|
12 | 13 | <%def name="title()"> |
|
13 | 14 | ${_('Gist')} · ${c.gist.gist_access_id} |
|
14 | 15 | %if c.rhodecode_name: |
|
15 | 16 | · ${h.branding(c.rhodecode_name)} |
|
16 | 17 | %endif |
|
17 | 18 | </%def> |
|
18 | 19 | |
|
19 | 20 | <%def name="breadcrumbs_links()"> |
|
20 | 21 | ${_('Gist')} · ${c.gist.gist_access_id} |
|
21 | 22 | </%def> |
|
22 | 23 | |
|
23 | 24 | <%def name="menu_bar_nav()"> |
|
24 | 25 | ${self.menu_items(active='gists')} |
|
25 | 26 | </%def> |
|
26 | 27 | |
|
27 | 28 | <%def name="main()"> |
|
28 | 29 | <div class="box"> |
|
29 | 30 | <!-- box / title --> |
|
30 | <div class="title"> | |
|
31 | ${self.breadcrumbs()} | |
|
32 | </div> | |
|
33 | 31 | |
|
34 | 32 | <div class="table"> |
|
35 | 33 | <div id="files_data"> |
|
36 | 34 | <div id="codeblock" class="codeblock"> |
|
37 | 35 | <div class="code-header"> |
|
38 | 36 | <div class="gist_url"> |
|
37 | <div class="pull-left"> | |
|
39 | 38 | <code> |
|
39 | ${dt.gist_type(c.gist.gist_type)} | |
|
40 | <span class="tag disabled">${c.gist.gist_access_id}</span> | |
|
40 | 41 | ${c.gist.gist_url()} <span class="icon-clipboard clipboard-action" data-clipboard-text="${c.gist.gist_url()}" title="${_('Copy the url')}"></span> |
|
41 | 42 | </code> |
|
42 | 43 | </div> |
|
43 | <div class="stats"> | |
|
44 | %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id: | |
|
45 | <div class="remove_gist"> | |
|
46 | ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)} | |
|
47 | ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")} | |
|
48 | ${h.end_form()} | |
|
49 | </div> | |
|
50 | %endif | |
|
51 | <div class="buttons"> | |
|
44 | ||
|
45 | <div class="pull-right buttons"> | |
|
52 | 46 | ## only owner should see that |
|
53 | 47 | <a href="#copySource" onclick="return false;" class="btn btn-mini icon-clipboard clipboard-action" data-clipboard-text="${c.files[0].content}">${_('Copy content')}</a> |
|
54 | 48 | |
|
55 | 49 | %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id: |
|
56 | 50 |
|
|
57 | 51 | %endif |
|
58 | 52 | ${h.link_to(_('Show as Raw'), h.route_path('gist_show_formatted', gist_id=c.gist.gist_access_id, revision='tip', format='raw'), class_="btn btn-mini")} |
|
53 | ||
|
54 | %if c.is_super_admin or c.gist.gist_owner == c.rhodecode_user.user_id: | |
|
55 | <div class="pull-right remove_gist"> | |
|
56 | ${h.secure_form(h.route_path('gist_delete', gist_id=c.gist.gist_access_id), request=request)} | |
|
57 | ${h.submit('remove_gist', _('Delete'),class_="btn btn-mini btn-danger",onclick="return confirm('"+_('Confirm to delete this Gist')+"');")} | |
|
58 | ${h.end_form()} | |
|
59 | 59 | </div> |
|
60 | <div class="left" > | |
|
61 | %if c.gist.gist_type != 'public': | |
|
62 | <span class="tag tag-ok disabled">${_('Private Gist')}</span> | |
|
63 | 60 | %endif |
|
64 | <span> ${c.gist.gist_description}</span> | |
|
65 | <span>${_('Expires')}: | |
|
61 | </div> | |
|
62 | </div> | |
|
63 | ||
|
64 | <div class="gist-desc"> | |
|
65 | <code>${c.gist.gist_description}</code> | |
|
66 | </div> | |
|
67 | ||
|
68 | <div class="author"> | |
|
69 | <div title="${h.tooltip(c.file_last_commit.author)}"> | |
|
70 | ${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)}, | |
|
71 | ${_('expires')}: | |
|
66 | 72 | %if c.gist.gist_expires == -1: |
|
67 | 73 | ${_('never')} |
|
68 | 74 | %else: |
|
69 | 75 | ${h.age_component(h.time_to_utcdatetime(c.gist.gist_expires))} |
|
70 | 76 | %endif |
|
71 | 77 | </span> |
|
72 | ||
|
73 | </div> | |
|
74 | </div> | |
|
75 | ||
|
76 | <div class="author"> | |
|
77 | <div title="${h.tooltip(c.file_last_commit.author)}"> | |
|
78 | ${self.gravatar_with_user(c.file_last_commit.author, 16, tooltip=True)} - ${_('created')} ${h.age_component(c.file_last_commit.date)} | |
|
79 | 78 | </div> |
|
80 | 79 | |
|
81 | 80 | </div> |
|
82 | 81 | <div class="commit">${h.urlify_commit_message(c.file_last_commit.message, None)}</div> |
|
83 | 82 | </div> |
|
84 | 83 | |
|
85 | 84 | ## iterate over the files |
|
86 | % for file in c.files: | |
|
87 | <% renderer = c.render and h.renderer_from_filename(file.path, exclude=['.txt', '.TXT'])%> | |
|
85 | % for gist_file in c.files: | |
|
86 | <% renderer = c.render and h.renderer_from_filename(gist_file.path, exclude=['.txt', '.TXT'])%> | |
|
88 | 87 | <!-- |
|
89 | <div id="${h.FID('G', file.path)}" class="stats" > | |
|
88 | <div id="${h.FID('G', gist_file.path)}" class="stats" > | |
|
90 | 89 | <a href="${c.gist.gist_url()}">ΒΆ</a> |
|
91 | <b >${file.path}</b> | |
|
90 | <b >${gist_file.path}</b> | |
|
92 | 91 | <div> |
|
93 | ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=file.commit.raw_id, format='raw', f_path=file.path), class_="btn btn-mini")} | |
|
92 | ${h.link_to(_('Show as raw'), h.route_path('gist_show_formatted_path', gist_id=c.gist.gist_access_id, revision=gist_file.commit.raw_id, format='raw', f_path=gist_file.path), class_="btn btn-mini")} | |
|
94 | 93 | </div> |
|
95 | 94 | </div> |
|
96 | 95 | --> |
|
97 | 96 | <div class="code-body textarea text-area editor"> |
|
98 | 97 | %if renderer: |
|
99 | ${h.render(file.content, renderer=renderer)} | |
|
98 | ${h.render(gist_file.content, renderer=renderer)} | |
|
100 | 99 | %else: |
|
101 | ${h.pygmentize(file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
|
100 | ${h.pygmentize(gist_file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} | |
|
102 | 101 | %endif |
|
103 | 102 | </div> |
|
104 | 103 | %endfor |
|
105 | 104 | </div> |
|
106 | 105 | </div> |
|
107 | 106 | </div> |
|
108 | 107 | |
|
109 | 108 | |
|
110 | 109 | </div> |
|
111 | 110 | </%def> |
@@ -1,469 +1,471 b'' | |||
|
1 | 1 | ## DATA TABLE RE USABLE ELEMENTS |
|
2 | 2 | ## usage: |
|
3 | 3 | ## <%namespace name="dt" file="/data_table/_dt_elements.mako"/> |
|
4 | 4 | <%namespace name="base" file="/base/base.mako"/> |
|
5 | 5 | |
|
6 | 6 | <%def name="metatags_help()"> |
|
7 | 7 | <table> |
|
8 | 8 | <% |
|
9 | 9 | example_tags = [ |
|
10 | 10 | ('state','[stable]'), |
|
11 | 11 | ('state','[stale]'), |
|
12 | 12 | ('state','[featured]'), |
|
13 | 13 | ('state','[dev]'), |
|
14 | 14 | ('state','[dead]'), |
|
15 | 15 | ('state','[deprecated]'), |
|
16 | 16 | |
|
17 | 17 | ('label','[personal]'), |
|
18 | 18 | ('generic','[v2.0.0]'), |
|
19 | 19 | |
|
20 | 20 | ('lang','[lang => JavaScript]'), |
|
21 | 21 | ('license','[license => LicenseName]'), |
|
22 | 22 | |
|
23 | 23 | ('ref','[requires => RepoName]'), |
|
24 | 24 | ('ref','[recommends => GroupName]'), |
|
25 | 25 | ('ref','[conflicts => SomeName]'), |
|
26 | 26 | ('ref','[base => SomeName]'), |
|
27 | 27 | ('url','[url => [linkName](https://rhodecode.com)]'), |
|
28 | 28 | ('see','[see => http://rhodecode.com]'), |
|
29 | 29 | ] |
|
30 | 30 | %> |
|
31 | 31 | % for tag_type, tag in example_tags: |
|
32 | 32 | <tr> |
|
33 | 33 | <td>${tag|n}</td> |
|
34 | 34 | <td>${h.style_metatag(tag_type, tag)|n}</td> |
|
35 | 35 | </tr> |
|
36 | 36 | % endfor |
|
37 | 37 | </table> |
|
38 | 38 | </%def> |
|
39 | 39 | |
|
40 | 40 | <%def name="render_description(description, stylify_metatags)"> |
|
41 | 41 | <% |
|
42 | 42 | tags = [] |
|
43 | 43 | if stylify_metatags: |
|
44 | 44 | tags, description = h.extract_metatags(description) |
|
45 | 45 | %> |
|
46 | 46 | % for tag_type, tag in tags: |
|
47 | 47 | ${h.style_metatag(tag_type, tag)|n,trim} |
|
48 | 48 | % endfor |
|
49 | 49 | <code style="white-space: pre-wrap">${description}</code> |
|
50 | 50 | </%def> |
|
51 | 51 | |
|
52 | 52 | ## REPOSITORY RENDERERS |
|
53 | 53 | <%def name="quick_menu(repo_name)"> |
|
54 | 54 | <i class="icon-more"></i> |
|
55 | 55 | <div class="menu_items_container hidden"> |
|
56 | 56 | <ul class="menu_items"> |
|
57 | 57 | <li> |
|
58 | 58 | <a title="${_('Summary')}" href="${h.route_path('repo_summary',repo_name=repo_name)}"> |
|
59 | 59 | <span>${_('Summary')}</span> |
|
60 | 60 | </a> |
|
61 | 61 | </li> |
|
62 | 62 | <li> |
|
63 | 63 | <a title="${_('Commits')}" href="${h.route_path('repo_commits',repo_name=repo_name)}"> |
|
64 | 64 | <span>${_('Commits')}</span> |
|
65 | 65 | </a> |
|
66 | 66 | </li> |
|
67 | 67 | <li> |
|
68 | 68 | <a title="${_('Files')}" href="${h.route_path('repo_files:default_commit',repo_name=repo_name)}"> |
|
69 | 69 | <span>${_('Files')}</span> |
|
70 | 70 | </a> |
|
71 | 71 | </li> |
|
72 | 72 | <li> |
|
73 | 73 | <a title="${_('Fork')}" href="${h.route_path('repo_fork_new',repo_name=repo_name)}"> |
|
74 | 74 | <span>${_('Fork')}</span> |
|
75 | 75 | </a> |
|
76 | 76 | </li> |
|
77 | 77 | </ul> |
|
78 | 78 | </div> |
|
79 | 79 | </%def> |
|
80 | 80 | |
|
81 | 81 | <%def name="repo_name(name,rtype,rstate,private,archived,fork_of,short_name=False,admin=False)"> |
|
82 | 82 | <% |
|
83 | 83 | def get_name(name,short_name=short_name): |
|
84 | 84 | if short_name: |
|
85 | 85 | return name.split('/')[-1] |
|
86 | 86 | else: |
|
87 | 87 | return name |
|
88 | 88 | %> |
|
89 | 89 | <div class="${'repo_state_pending' if rstate == 'repo_state_pending' else ''} truncate"> |
|
90 | 90 | ##NAME |
|
91 | 91 | <a href="${h.route_path('edit_repo',repo_name=name) if admin else h.route_path('repo_summary',repo_name=name)}"> |
|
92 | 92 | |
|
93 | 93 | ##TYPE OF REPO |
|
94 | 94 | %if h.is_hg(rtype): |
|
95 | 95 | <span title="${_('Mercurial repository')}"><i class="icon-hg" style="font-size: 14px;"></i></span> |
|
96 | 96 | %elif h.is_git(rtype): |
|
97 | 97 | <span title="${_('Git repository')}"><i class="icon-git" style="font-size: 14px"></i></span> |
|
98 | 98 | %elif h.is_svn(rtype): |
|
99 | 99 | <span title="${_('Subversion repository')}"><i class="icon-svn" style="font-size: 14px"></i></span> |
|
100 | 100 | %endif |
|
101 | 101 | |
|
102 | 102 | ##PRIVATE/PUBLIC |
|
103 | 103 | %if private is True and c.visual.show_private_icon: |
|
104 | 104 | <i class="icon-lock" title="${_('Private repository')}"></i> |
|
105 | 105 | %elif private is False and c.visual.show_public_icon: |
|
106 | 106 | <i class="icon-unlock-alt" title="${_('Public repository')}"></i> |
|
107 | 107 | %else: |
|
108 | 108 | <span></span> |
|
109 | 109 | %endif |
|
110 | 110 | ${get_name(name)} |
|
111 | 111 | </a> |
|
112 | 112 | %if fork_of: |
|
113 | 113 | <a href="${h.route_path('repo_summary',repo_name=fork_of.repo_name)}"><i class="icon-code-fork"></i></a> |
|
114 | 114 | %endif |
|
115 | 115 | %if rstate == 'repo_state_pending': |
|
116 | 116 | <span class="creation_in_progress tooltip" title="${_('This repository is being created in a background task')}"> |
|
117 | 117 | (${_('creating...')}) |
|
118 | 118 | </span> |
|
119 | 119 | %endif |
|
120 | 120 | |
|
121 | 121 | </div> |
|
122 | 122 | </%def> |
|
123 | 123 | |
|
124 | 124 | <%def name="repo_desc(description, stylify_metatags)"> |
|
125 | 125 | <% |
|
126 | 126 | tags, description = h.extract_metatags(description) |
|
127 | 127 | %> |
|
128 | 128 | |
|
129 | 129 | <div class="truncate-wrap"> |
|
130 | 130 | % if stylify_metatags: |
|
131 | 131 | % for tag_type, tag in tags: |
|
132 | 132 | ${h.style_metatag(tag_type, tag)|n} |
|
133 | 133 | % endfor |
|
134 | 134 | % endif |
|
135 | 135 | ${description} |
|
136 | 136 | </div> |
|
137 | 137 | |
|
138 | 138 | </%def> |
|
139 | 139 | |
|
140 | 140 | <%def name="last_change(last_change)"> |
|
141 | 141 | ${h.age_component(last_change, time_is_local=True)} |
|
142 | 142 | </%def> |
|
143 | 143 | |
|
144 | 144 | <%def name="revision(repo_name, rev, commit_id, author, last_msg, commit_date)"> |
|
145 | 145 | <div> |
|
146 | 146 | %if rev >= 0: |
|
147 | 147 | <code><a class="tooltip-hovercard" data-hovercard-alt=${h.tooltip(last_msg)} data-hovercard-url="${h.route_path('hovercard_repo_commit', repo_name=repo_name, commit_id=commit_id)}" href="${h.route_path('repo_commit',repo_name=repo_name,commit_id=commit_id)}">${'r{}:{}'.format(rev,h.short_id(commit_id))}</a></code> |
|
148 | 148 | %else: |
|
149 | 149 | ${_('No commits yet')} |
|
150 | 150 | %endif |
|
151 | 151 | </div> |
|
152 | 152 | </%def> |
|
153 | 153 | |
|
154 | 154 | <%def name="rss(name)"> |
|
155 | 155 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
156 | 156 | <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a> |
|
157 | 157 | %else: |
|
158 | 158 | <a title="${h.tooltip(_('Subscribe to %s rss feed')% name)}" href="${h.route_path('rss_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a> |
|
159 | 159 | %endif |
|
160 | 160 | </%def> |
|
161 | 161 | |
|
162 | 162 | <%def name="atom(name)"> |
|
163 | 163 | %if c.rhodecode_user.username != h.DEFAULT_USER: |
|
164 | 164 | <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name, _query=dict(auth_token=c.rhodecode_user.feed_token))}"><i class="icon-rss-sign"></i></a> |
|
165 | 165 | %else: |
|
166 | 166 | <a title="${h.tooltip(_('Subscribe to %s atom feed')% name)}" href="${h.route_path('atom_feed_home', repo_name=name)}"><i class="icon-rss-sign"></i></a> |
|
167 | 167 | %endif |
|
168 | 168 | </%def> |
|
169 | 169 | |
|
170 | 170 | <%def name="repo_actions(repo_name, super_user=True)"> |
|
171 | 171 | <div> |
|
172 | 172 | <div class="grid_edit"> |
|
173 | 173 | <a href="${h.route_path('edit_repo',repo_name=repo_name)}" title="${_('Edit')}"> |
|
174 | 174 | Edit |
|
175 | 175 | </a> |
|
176 | 176 | </div> |
|
177 | 177 | <div class="grid_delete"> |
|
178 | 178 | ${h.secure_form(h.route_path('edit_repo_advanced_delete', repo_name=repo_name), request=request)} |
|
179 | 179 | ${h.submit('remove_%s' % repo_name,_('Delete'),class_="btn btn-link btn-danger", |
|
180 | 180 | onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")} |
|
181 | 181 | ${h.end_form()} |
|
182 | 182 | </div> |
|
183 | 183 | </div> |
|
184 | 184 | </%def> |
|
185 | 185 | |
|
186 | 186 | <%def name="repo_state(repo_state)"> |
|
187 | 187 | <div> |
|
188 | 188 | %if repo_state == 'repo_state_pending': |
|
189 | 189 | <div class="tag tag4">${_('Creating')}</div> |
|
190 | 190 | %elif repo_state == 'repo_state_created': |
|
191 | 191 | <div class="tag tag1">${_('Created')}</div> |
|
192 | 192 | %else: |
|
193 | 193 | <div class="tag alert2" title="${h.tooltip(repo_state)}">invalid</div> |
|
194 | 194 | %endif |
|
195 | 195 | </div> |
|
196 | 196 | </%def> |
|
197 | 197 | |
|
198 | 198 | |
|
199 | 199 | ## REPO GROUP RENDERERS |
|
200 | 200 | <%def name="quick_repo_group_menu(repo_group_name)"> |
|
201 | 201 | <i class="icon-more"></i> |
|
202 | 202 | <div class="menu_items_container hidden"> |
|
203 | 203 | <ul class="menu_items"> |
|
204 | 204 | <li> |
|
205 | 205 | <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}">${_('Summary')}</a> |
|
206 | 206 | </li> |
|
207 | 207 | |
|
208 | 208 | </ul> |
|
209 | 209 | </div> |
|
210 | 210 | </%def> |
|
211 | 211 | |
|
212 | 212 | <%def name="repo_group_name(repo_group_name, children_groups=None)"> |
|
213 | 213 | <div> |
|
214 | 214 | <a href="${h.route_path('repo_group_home', repo_group_name=repo_group_name)}"> |
|
215 | 215 | <i class="icon-repo-group" title="${_('Repository group')}" style="font-size: 14px"></i> |
|
216 | 216 | %if children_groups: |
|
217 | 217 | ${h.literal(' » '.join(children_groups))} |
|
218 | 218 | %else: |
|
219 | 219 | ${repo_group_name} |
|
220 | 220 | %endif |
|
221 | 221 | </a> |
|
222 | 222 | </div> |
|
223 | 223 | </%def> |
|
224 | 224 | |
|
225 | 225 | <%def name="repo_group_desc(description, personal, stylify_metatags)"> |
|
226 | 226 | |
|
227 | 227 | <% |
|
228 | 228 | if stylify_metatags: |
|
229 | 229 | tags, description = h.extract_metatags(description) |
|
230 | 230 | %> |
|
231 | 231 | |
|
232 | 232 | <div class="truncate-wrap"> |
|
233 | 233 | % if personal: |
|
234 | 234 | <div class="metatag" tag="personal">${_('personal')}</div> |
|
235 | 235 | % endif |
|
236 | 236 | |
|
237 | 237 | % if stylify_metatags: |
|
238 | 238 | % for tag_type, tag in tags: |
|
239 | 239 | ${h.style_metatag(tag_type, tag)|n} |
|
240 | 240 | % endfor |
|
241 | 241 | % endif |
|
242 | 242 | ${description} |
|
243 | 243 | </div> |
|
244 | 244 | |
|
245 | 245 | </%def> |
|
246 | 246 | |
|
247 | 247 | <%def name="repo_group_actions(repo_group_id, repo_group_name, gr_count)"> |
|
248 | 248 | <div class="grid_edit"> |
|
249 | 249 | <a href="${h.route_path('edit_repo_group',repo_group_name=repo_group_name)}" title="${_('Edit')}">Edit</a> |
|
250 | 250 | </div> |
|
251 | 251 | <div class="grid_delete"> |
|
252 | 252 | ${h.secure_form(h.route_path('edit_repo_group_advanced_delete', repo_group_name=repo_group_name), request=request)} |
|
253 | 253 | ${h.submit('remove_%s' % repo_group_name,_('Delete'),class_="btn btn-link btn-danger", |
|
254 | 254 | onclick="return confirm('"+_ungettext('Confirm to delete this group: %s with %s repository','Confirm to delete this group: %s with %s repositories',gr_count) % (repo_group_name, gr_count)+"');")} |
|
255 | 255 | ${h.end_form()} |
|
256 | 256 | </div> |
|
257 | 257 | </%def> |
|
258 | 258 | |
|
259 | 259 | |
|
260 | 260 | <%def name="user_actions(user_id, username)"> |
|
261 | 261 | <div class="grid_edit"> |
|
262 | 262 | <a href="${h.route_path('user_edit',user_id=user_id)}" title="${_('Edit')}"> |
|
263 | 263 | ${_('Edit')} |
|
264 | 264 | </a> |
|
265 | 265 | </div> |
|
266 | 266 | <div class="grid_delete"> |
|
267 | 267 | ${h.secure_form(h.route_path('user_delete', user_id=user_id), request=request)} |
|
268 | 268 | ${h.submit('remove_',_('Delete'),id="remove_user_%s" % user_id, class_="btn btn-link btn-danger", |
|
269 | 269 | onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")} |
|
270 | 270 | ${h.end_form()} |
|
271 | 271 | </div> |
|
272 | 272 | </%def> |
|
273 | 273 | |
|
274 | 274 | <%def name="user_group_actions(user_group_id, user_group_name)"> |
|
275 | 275 | <div class="grid_edit"> |
|
276 | 276 | <a href="${h.route_path('edit_user_group', user_group_id=user_group_id)}" title="${_('Edit')}">Edit</a> |
|
277 | 277 | </div> |
|
278 | 278 | <div class="grid_delete"> |
|
279 | 279 | ${h.secure_form(h.route_path('user_groups_delete', user_group_id=user_group_id), request=request)} |
|
280 | 280 | ${h.submit('remove_',_('Delete'),id="remove_group_%s" % user_group_id, class_="btn btn-link btn-danger", |
|
281 | 281 | onclick="return confirm('"+_('Confirm to delete this user group: %s') % user_group_name+"');")} |
|
282 | 282 | ${h.end_form()} |
|
283 | 283 | </div> |
|
284 | 284 | </%def> |
|
285 | 285 | |
|
286 | 286 | |
|
287 | 287 | <%def name="user_name(user_id, username)"> |
|
288 | 288 | ${h.link_to(h.person(username, 'username_or_name_or_email'), h.route_path('user_edit', user_id=user_id))} |
|
289 | 289 | </%def> |
|
290 | 290 | |
|
291 | 291 | <%def name="user_profile(username)"> |
|
292 | 292 | ${base.gravatar_with_user(username, 16, tooltip=True)} |
|
293 | 293 | </%def> |
|
294 | 294 | |
|
295 | 295 | <%def name="user_group_name(user_group_name)"> |
|
296 | 296 | <div> |
|
297 | 297 | <i class="icon-user-group" title="${_('User group')}"></i> |
|
298 | 298 | ${h.link_to_group(user_group_name)} |
|
299 | 299 | </div> |
|
300 | 300 | </%def> |
|
301 | 301 | |
|
302 | 302 | |
|
303 | 303 | ## GISTS |
|
304 | 304 | |
|
305 | 305 | <%def name="gist_gravatar(full_contact)"> |
|
306 | 306 | <div class="gist_gravatar"> |
|
307 | 307 | ${base.gravatar(full_contact, 30)} |
|
308 | 308 | </div> |
|
309 | 309 | </%def> |
|
310 | 310 | |
|
311 | 311 | <%def name="gist_access_id(gist_access_id, full_contact)"> |
|
312 | 312 | <div> |
|
313 | 313 | <b> |
|
314 | 314 | <a href="${h.route_path('gist_show', gist_id=gist_access_id)}">gist: ${gist_access_id}</a> |
|
315 | 315 | </b> |
|
316 | 316 | </div> |
|
317 | 317 | </%def> |
|
318 | 318 | |
|
319 | 319 | <%def name="gist_author(full_contact, created_on, expires)"> |
|
320 | 320 | ${base.gravatar_with_user(full_contact, 16, tooltip=True)} |
|
321 | 321 | </%def> |
|
322 | 322 | |
|
323 | 323 | |
|
324 | 324 | <%def name="gist_created(created_on)"> |
|
325 | 325 | <div class="created"> |
|
326 | 326 | ${h.age_component(created_on, time_is_local=True)} |
|
327 | 327 | </div> |
|
328 | 328 | </%def> |
|
329 | 329 | |
|
330 | 330 | <%def name="gist_expires(expires)"> |
|
331 | 331 | <div class="created"> |
|
332 | 332 | %if expires == -1: |
|
333 | 333 | ${_('never')} |
|
334 | 334 | %else: |
|
335 | 335 | ${h.age_component(h.time_to_utcdatetime(expires))} |
|
336 | 336 | %endif |
|
337 | 337 | </div> |
|
338 | 338 | </%def> |
|
339 | 339 | |
|
340 | 340 | <%def name="gist_type(gist_type)"> |
|
341 |
%if gist_type |
|
|
342 | <div class="tag">${_('Private')}</div> | |
|
341 | %if gist_type == 'public': | |
|
342 | <span class="tag tag-gist-public disabled">${_('Public Gist')}</span> | |
|
343 | %else: | |
|
344 | <span class="tag tag-gist-private disabled">${_('Private Gist')}</span> | |
|
343 | 345 | %endif |
|
344 | 346 | </%def> |
|
345 | 347 | |
|
346 | 348 | <%def name="gist_description(gist_description)"> |
|
347 | 349 | ${gist_description} |
|
348 | 350 | </%def> |
|
349 | 351 | |
|
350 | 352 | |
|
351 | 353 | ## PULL REQUESTS GRID RENDERERS |
|
352 | 354 | |
|
353 | 355 | <%def name="pullrequest_target_repo(repo_name)"> |
|
354 | 356 | <div class="truncate"> |
|
355 | 357 | ${h.link_to(repo_name,h.route_path('repo_summary',repo_name=repo_name))} |
|
356 | 358 | </div> |
|
357 | 359 | </%def> |
|
358 | 360 | |
|
359 | 361 | <%def name="pullrequest_status(status)"> |
|
360 | 362 | <i class="icon-circle review-status-${status}"></i> |
|
361 | 363 | </%def> |
|
362 | 364 | |
|
363 | 365 | <%def name="pullrequest_title(title, description)"> |
|
364 | 366 | ${title} |
|
365 | 367 | </%def> |
|
366 | 368 | |
|
367 | 369 | <%def name="pullrequest_comments(comments_nr)"> |
|
368 | 370 | <i class="icon-comment"></i> ${comments_nr} |
|
369 | 371 | </%def> |
|
370 | 372 | |
|
371 | 373 | <%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)"> |
|
372 | 374 | <a href="${h.route_path('pullrequest_show',repo_name=target_repo_name,pull_request_id=pull_request_id)}"> |
|
373 | 375 | % if short: |
|
374 | 376 | !${pull_request_id} |
|
375 | 377 | % else: |
|
376 | 378 | ${_('Pull request !{}').format(pull_request_id)} |
|
377 | 379 | % endif |
|
378 | 380 | </a> |
|
379 | 381 | </%def> |
|
380 | 382 | |
|
381 | 383 | <%def name="pullrequest_updated_on(updated_on)"> |
|
382 | 384 | ${h.age_component(h.time_to_utcdatetime(updated_on))} |
|
383 | 385 | </%def> |
|
384 | 386 | |
|
385 | 387 | <%def name="pullrequest_author(full_contact)"> |
|
386 | 388 | ${base.gravatar_with_user(full_contact, 16, tooltip=True)} |
|
387 | 389 | </%def> |
|
388 | 390 | |
|
389 | 391 | |
|
390 | 392 | ## ARTIFACT RENDERERS |
|
391 | 393 | <%def name="repo_artifact_name(repo_name, file_uid, artifact_display_name)"> |
|
392 | 394 | <a href="${h.route_path('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}"> |
|
393 | 395 | ${artifact_display_name or '_EMPTY_NAME_'} |
|
394 | 396 | </a> |
|
395 | 397 | </%def> |
|
396 | 398 | |
|
397 | 399 | <%def name="repo_artifact_uid(repo_name, file_uid)"> |
|
398 | 400 | <code>${h.shorter(file_uid, size=24, prefix=True)}</code> |
|
399 | 401 | <i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${h.route_url('repo_artifacts_get', repo_name=repo_name, uid=file_uid)}" title="${_('Copy the full url')}"></i> |
|
400 | 402 | </%def> |
|
401 | 403 | |
|
402 | 404 | <%def name="repo_artifact_sha256(artifact_sha256)"> |
|
403 | 405 | <div class="code">${h.shorter(artifact_sha256, 12)}<i class="tooltip icon-clipboard clipboard-action" data-clipboard-text="${artifact_sha256}" title="${_('Copy the sha256 ({})').format(artifact_sha256)}"></i></div> |
|
404 | 406 | </%def> |
|
405 | 407 | |
|
406 | 408 | <%def name="repo_artifact_actions(repo_name, file_store_id, file_uid)"> |
|
407 | 409 | ## <div class="grid_edit"> |
|
408 | 410 | ## <a href="#Edit" title="${_('Edit')}">${_('Edit')}</a> |
|
409 | 411 | ## </div> |
|
410 | 412 | <div class="grid_edit"> |
|
411 | 413 | <a href="${h.route_path('repo_artifacts_info', repo_name=repo_name, uid=file_store_id)}" title="${_('Info')}">${_('Info')}</a> |
|
412 | 414 | </div> |
|
413 | 415 | % if h.HasRepoPermissionAny('repository.admin')(c.repo_name): |
|
414 | 416 | <div class="grid_delete"> |
|
415 | 417 | ${h.secure_form(h.route_path('repo_artifacts_delete', repo_name=repo_name, uid=file_store_id), request=request)} |
|
416 | 418 | ${h.submit('remove_',_('Delete'),id="remove_artifact_%s" % file_store_id, class_="btn btn-link btn-danger", |
|
417 | 419 | onclick="return confirm('"+_('Confirm to delete this artifact: %s') % file_uid+"');")} |
|
418 | 420 | ${h.end_form()} |
|
419 | 421 | </div> |
|
420 | 422 | % endif |
|
421 | 423 | </%def> |
|
422 | 424 | |
|
423 | 425 | <%def name="markup_form(form_id, form_text='', help_text=None)"> |
|
424 | 426 | |
|
425 | 427 | <div class="markup-form"> |
|
426 | 428 | <div class="markup-form-area"> |
|
427 | 429 | <div class="markup-form-area-header"> |
|
428 | 430 | <ul class="nav-links clearfix"> |
|
429 | 431 | <li class="active"> |
|
430 | 432 | <a href="#edit-text" tabindex="-1" id="edit-btn_${form_id}">${_('Write')}</a> |
|
431 | 433 | </li> |
|
432 | 434 | <li class=""> |
|
433 | 435 | <a href="#preview-text" tabindex="-1" id="preview-btn_${form_id}">${_('Preview')}</a> |
|
434 | 436 | </li> |
|
435 | 437 | </ul> |
|
436 | 438 | </div> |
|
437 | 439 | |
|
438 | 440 | <div class="markup-form-area-write" style="display: block;"> |
|
439 | 441 | <div id="edit-container_${form_id}"> |
|
440 | 442 | <textarea id="${form_id}" name="${form_id}" class="comment-block-ta ac-input">${form_text if form_text else ''}</textarea> |
|
441 | 443 | </div> |
|
442 | 444 | <div id="preview-container_${form_id}" class="clearfix" style="display: none;"> |
|
443 | 445 | <div id="preview-box_${form_id}" class="preview-box"></div> |
|
444 | 446 | </div> |
|
445 | 447 | </div> |
|
446 | 448 | |
|
447 | 449 | <div class="markup-form-area-footer"> |
|
448 | 450 | <div class="toolbar"> |
|
449 | 451 | <div class="toolbar-text"> |
|
450 | 452 | ${(_('Parsed using %s syntax') % ( |
|
451 | 453 | ('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())), |
|
452 | 454 | ) |
|
453 | 455 | )|n} |
|
454 | 456 | </div> |
|
455 | 457 | </div> |
|
456 | 458 | </div> |
|
457 | 459 | </div> |
|
458 | 460 | |
|
459 | 461 | <div class="markup-form-footer"> |
|
460 | 462 | % if help_text: |
|
461 | 463 | <span class="help-block">${help_text}</span> |
|
462 | 464 | % endif |
|
463 | 465 | </div> |
|
464 | 466 | </div> |
|
465 | 467 | <script type="text/javascript"> |
|
466 | 468 | new MarkupForm('${form_id}'); |
|
467 | 469 | </script> |
|
468 | 470 | |
|
469 | 471 | </%def> |
General Comments 0
You need to be logged in to leave comments.
Login now