Show More
@@ -187,6 +187,7 b' Check if we should use full-topic or min' | |||||
187 | I think something like this would be better |
|
187 | I think something like this would be better | |
188 |
|
188 | |||
189 | ```py |
|
189 | ```py | |
|
190 | // markdown renderer | |||
190 |
|
191 | |||
191 | def db(): |
|
192 | def db(): | |
192 | global connection |
|
193 | global connection | |
@@ -226,10 +227,26 b' def db():' | |||||
226 | 'comment_body': ''' |
|
227 | 'comment_body': ''' | |
227 | I like this ! |
|
228 | I like this ! | |
228 |
|
229 | |||
229 |
But please check this code |
|
230 | But please check this code | |
230 |
|
231 | |||
231 | def main(): |
|
232 | .. code-block:: javascript | |
232 | print 'ok' |
|
233 | ||
|
234 | // THIS IS RST CODE | |||
|
235 | ||||
|
236 | this.createResolutionComment = function(commentId) { | |||
|
237 | // hide the trigger text | |||
|
238 | $('#resolve-comment-{0}'.format(commentId)).hide(); | |||
|
239 | ||||
|
240 | var comment = $('#comment-'+commentId); | |||
|
241 | var commentData = comment.data(); | |||
|
242 | if (commentData.commentInline) { | |||
|
243 | this.createComment(comment, commentId) | |||
|
244 | } else { | |||
|
245 | Rhodecode.comments.createGeneralComment('general', "$placeholder", commentId) | |||
|
246 | } | |||
|
247 | ||||
|
248 | return false; | |||
|
249 | }; | |||
233 |
|
250 | |||
234 | This should work better ! |
|
251 | This should work better ! | |
235 | ''', |
|
252 | ''', |
@@ -101,6 +101,7 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
101 | margin: 0; |
|
101 | margin: 0; | |
102 | padding: 0; |
|
102 | padding: 0; | |
103 | font-family: ${text_regular|n}; |
|
103 | font-family: ${text_regular|n}; | |
|
104 | color: #000000; | |||
104 | } |
|
105 | } | |
105 |
|
106 | |||
106 | /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/ |
|
107 | /* Prevent Webkit and Windows Mobile platforms from changing default font sizes.*/ | |
@@ -211,6 +212,20 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
211 |
|
212 | |||
212 | code { |
|
213 | code { | |
213 | font-family: ${text_monospace|n}; |
|
214 | font-family: ${text_monospace|n}; | |
|
215 | white-space: pre-line !important; | |||
|
216 | color: #000000; | |||
|
217 | } | |||
|
218 | ||||
|
219 | ul.changes-ul { | |||
|
220 | list-style: none; | |||
|
221 | list-style-type: none; | |||
|
222 | padding: 0; | |||
|
223 | margin: 10px 0; | |||
|
224 | } | |||
|
225 | ul.changes-ul li { | |||
|
226 | list-style: none; | |||
|
227 | list-style-type: none; | |||
|
228 | margin: 2px 0; | |||
214 | } |
|
229 | } | |
215 |
|
230 | |||
216 | @media only screen and (-webkit-min-device-pixel-ratio: 2) { |
|
231 | @media only screen and (-webkit-min-device-pixel-ratio: 2) { | |
@@ -237,13 +252,19 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
237 | padding: 3px 5px 3px |
|
252 | padding: 3px 5px 3px | |
238 | } |
|
253 | } | |
239 |
|
254 | |||
240 | div.markdown-block h1, div.markdown-block h2, div.markdown-block h3, div.markdown-block h4, div.markdown-block h5, div.markdown-block h6 { |
|
255 | div.markdown-block h1, | |
|
256 | div.markdown-block h2, | |||
|
257 | div.markdown-block h3, | |||
|
258 | div.markdown-block h4, | |||
|
259 | div.markdown-block h5, | |||
|
260 | div.markdown-block h6 { | |||
241 | border-bottom: none !important; |
|
261 | border-bottom: none !important; | |
242 | padding: 0 !important; |
|
262 | padding: 0 !important; | |
243 | overflow: visible !important |
|
263 | overflow: visible !important | |
244 | } |
|
264 | } | |
245 |
|
265 | |||
246 |
div.markdown-block h1, |
|
266 | div.markdown-block h1, | |
|
267 | div.markdown-block h2 { | |||
247 | border-bottom: 1px #e6e5e5 solid !important |
|
268 | border-bottom: 1px #e6e5e5 solid !important | |
248 | } |
|
269 | } | |
249 |
|
270 | |||
@@ -290,7 +311,13 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
290 | margin-bottom: 13px |
|
311 | margin-bottom: 13px | |
291 | } |
|
312 | } | |
292 |
|
313 | |||
293 | div.markdown-block ol, div.markdown-block ul, div.markdown-block p, div.markdown-block blockquote, div.markdown-block dl, div.markdown-block li, div.markdown-block table { |
|
314 | div.markdown-block ol, | |
|
315 | div.markdown-block ul, | |||
|
316 | div.markdown-block p, | |||
|
317 | div.markdown-block blockquote, | |||
|
318 | div.markdown-block dl, | |||
|
319 | div.markdown-block li, | |||
|
320 | div.markdown-block table { | |||
294 | margin: 3px 0 13px 0 !important; |
|
321 | margin: 3px 0 13px 0 !important; | |
295 | color: #424242 !important; |
|
322 | color: #424242 !important; | |
296 | font-size: 13px !important; |
|
323 | font-size: 13px !important; | |
@@ -371,27 +398,30 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
371 | background-color: #eeeeee |
|
398 | background-color: #eeeeee | |
372 | } |
|
399 | } | |
373 |
|
400 | |||
374 | div.markdown-block code, div.markdown-block pre, div.markdown-block #ws, div.markdown-block #message { |
|
401 | div.markdown-block code, | |
|
402 | div.markdown-block pre, | |||
|
403 | div.markdown-block #ws, | |||
|
404 | div.markdown-block #message { | |||
375 | font-family: ${text_monospace|n}; |
|
405 | font-family: ${text_monospace|n}; | |
376 | font-size: 11px; |
|
406 | font-size: 11px; | |
377 | -webkit-border-radius: 2px; |
|
407 | -webkit-border-radius: 2px; | |
378 | -moz-border-radius: 2px; |
|
408 | -moz-border-radius: 2px; | |
379 | border-radius: 2px; |
|
409 | border-radius: 2px; | |
380 |
background-color: |
|
410 | background-color: #FFFFFF; | |
381 | color: #7E7F7F |
|
411 | color: #7E7F7F | |
382 | } |
|
412 | } | |
383 |
|
413 | |||
384 | div.markdown-block code { |
|
414 | div.markdown-block code { | |
385 |
border: 1px solid # |
|
415 | border: 1px solid #7E7F7F; | |
386 | margin: 0 2px; |
|
416 | margin: 0 2px; | |
387 | padding: 0 5px |
|
417 | padding: 0 5px | |
388 | } |
|
418 | } | |
389 |
|
419 | |||
390 | div.markdown-block pre { |
|
420 | div.markdown-block pre { | |
391 |
border: 1px solid # |
|
421 | border: 1px solid #7E7F7F; | |
392 | overflow: auto; |
|
422 | overflow: auto; | |
393 | padding: .5em; |
|
423 | padding: .5em; | |
394 |
background-color: #F |
|
424 | background-color: #FFFFFF; | |
395 | } |
|
425 | } | |
396 |
|
426 | |||
397 | div.markdown-block pre > code { |
|
427 | div.markdown-block pre > code { | |
@@ -411,7 +441,12 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
411 | font-weight: normal |
|
441 | font-weight: normal | |
412 | } |
|
442 | } | |
413 |
|
443 | |||
414 | div.rst-block h1, div.rst-block h2, div.rst-block h3, div.rst-block h4, div.rst-block h5, div.rst-block h6 { |
|
444 | div.rst-block h1, | |
|
445 | div.rst-block h2, | |||
|
446 | div.rst-block h3, | |||
|
447 | div.rst-block h4, | |||
|
448 | div.rst-block h5, | |||
|
449 | div.rst-block h6 { | |||
415 | border-bottom: 0 !important; |
|
450 | border-bottom: 0 !important; | |
416 | margin: 0 !important; |
|
451 | margin: 0 !important; | |
417 | padding: 0 !important; |
|
452 | padding: 0 !important; | |
@@ -461,7 +496,7 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
461 | background-color: ghostWhite !important; |
|
496 | background-color: ghostWhite !important; | |
462 | color: #444 !important; |
|
497 | color: #444 !important; | |
463 | padding: 0 .2em !important; |
|
498 | padding: 0 .2em !important; | |
464 |
border: 1px solid # |
|
499 | border: 1px solid #7E7F7F !important | |
465 | } |
|
500 | } | |
466 |
|
501 | |||
467 | div.rst-block pre code { |
|
502 | div.rst-block pre code { | |
@@ -474,20 +509,24 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
474 | div.rst-block pre { |
|
509 | div.rst-block pre { | |
475 | margin: 1em 0; |
|
510 | margin: 1em 0; | |
476 | padding: 15px; |
|
511 | padding: 15px; | |
477 |
border: 1px solid # |
|
512 | border: 1px solid #7E7F7F; | |
478 | -webkit-border-radius: 2px; |
|
513 | -webkit-border-radius: 2px; | |
479 | -moz-border-radius: 2px; |
|
514 | -moz-border-radius: 2px; | |
480 | border-radius: 2px; |
|
515 | border-radius: 2px; | |
481 | overflow: auto; |
|
516 | overflow: auto; | |
482 | font-size: 12px; |
|
517 | font-size: 12px; | |
483 | color: #444; |
|
518 | color: #444; | |
484 |
background-color: #F |
|
519 | background-color: #FFFFFF; | |
|
520 | } | |||
|
521 | ||||
|
522 | .clear-both { | |||
|
523 | clear:both; | |||
485 | } |
|
524 | } | |
486 |
|
525 | |||
487 | /*elasticmatch is custom rhodecode tag*/ |
|
526 | /*elasticmatch is custom rhodecode tag*/ | |
488 | .codehilite .c-ElasticMatch { |
|
527 | .codehilite .c-ElasticMatch { | |
489 |
|
|
528 | background-color: #faffa6; | |
490 |
|
|
529 | padding: 0.2em; | |
491 | } |
|
530 | } | |
492 |
|
531 | |||
493 | .codehilite .c-ElasticMatch { background-color: #faffa6; padding: 0.2em;} |
|
532 | .codehilite .c-ElasticMatch { background-color: #faffa6; padding: 0.2em;} | |
@@ -581,7 +620,7 b' text_monospace = "\'Menlo\', \'Liberation M' | |||||
581 | </a> |
|
620 | </a> | |
582 | </td> |
|
621 | </td> | |
583 | </tr> |
|
622 | </tr> | |
584 | <tr> |
|
623 | <tr style="background-color: #fff"> | |
585 | <td style="padding:15px;" valign="top">${self.body()}</td> |
|
624 | <td style="padding:15px;" valign="top">${self.body()}</td> | |
586 | </tr> |
|
625 | </tr> | |
587 | </table> |
|
626 | </table> |
@@ -89,12 +89,13 b' data = {' | |||||
89 | } |
|
89 | } | |
90 | %> |
|
90 | %> | |
91 |
|
91 | |||
|
92 | ## header | |||
92 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
93 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
93 | <tr> |
|
94 | <tr> | |
94 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> |
|
95 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> | |
95 |
|
96 | |||
96 |
< |
|
97 | <div style="margin: 0; font-weight: bold"> | |
97 | <div style="margin-bottom: 4px"> |
|
98 | <div class="clear-both" style="margin-bottom: 4px"> | |
98 | <span style="color:#7E7F7F">@${h.person(user.username)}</span> |
|
99 | <span style="color:#7E7F7F">@${h.person(user.username)}</span> | |
99 | ${_('left a')} |
|
100 | ${_('left a')} | |
100 | <a href="${commit_comment_url}" style="${base.link_css()}"> |
|
101 | <a href="${commit_comment_url}" style="${base.link_css()}"> | |
@@ -107,13 +108,14 b' data = {' | |||||
107 | </div> |
|
108 | </div> | |
108 | <div style="margin-top: 10px"></div> |
|
109 | <div style="margin-top: 10px"></div> | |
109 | ${_('Commit')} <code>${data['commit_id']}</code> ${_('of repository')}: ${data['repo_name']} |
|
110 | ${_('Commit')} <code>${data['commit_id']}</code> ${_('of repository')}: ${data['repo_name']} | |
110 |
</ |
|
111 | </div> | |
111 |
|
112 | |||
112 | </td> |
|
113 | </td> | |
113 | </tr> |
|
114 | </tr> | |
114 |
|
115 | |||
115 | </table> |
|
116 | </table> | |
116 |
|
117 | <div class="clear-both"></div> | ||
|
118 | ## main body | |||
117 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
119 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
118 |
|
120 | |||
119 | ## spacing def |
|
121 | ## spacing def |
@@ -110,12 +110,13 b' data = {' | |||||
110 | } |
|
110 | } | |
111 | %> |
|
111 | %> | |
112 |
|
112 | |||
|
113 | ## header | |||
113 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
114 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
114 | <tr> |
|
115 | <tr> | |
115 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> |
|
116 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> | |
116 |
|
117 | |||
117 |
< |
|
118 | <div style="margin: 0; font-weight: bold"> | |
118 | <div style="margin-bottom: 4px"> |
|
119 | <div class="clear-both" style="margin-bottom: 4px"> | |
119 | <span style="color:#7E7F7F">@${h.person(user.username)}</span> |
|
120 | <span style="color:#7E7F7F">@${h.person(user.username)}</span> | |
120 | ${_('left a')} |
|
121 | ${_('left a')} | |
121 | <a href="${pr_comment_url}" style="${base.link_css()}"> |
|
122 | <a href="${pr_comment_url}" style="${base.link_css()}"> | |
@@ -128,13 +129,14 b' data = {' | |||||
128 | </div> |
|
129 | </div> | |
129 | <div style="margin-top: 10px"></div> |
|
130 | <div style="margin-top: 10px"></div> | |
130 | ${_('Pull request')} <code>!${data['pr_id']}: ${data['pr_title']}</code> |
|
131 | ${_('Pull request')} <code>!${data['pr_id']}: ${data['pr_title']}</code> | |
131 |
</ |
|
132 | </div> | |
132 |
|
133 | |||
133 | </td> |
|
134 | </td> | |
134 | </tr> |
|
135 | </tr> | |
135 |
|
136 | |||
136 | </table> |
|
137 | </table> | |
137 |
|
138 | <div class="clear-both"></div> | ||
|
139 | ## main body | |||
138 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
140 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
139 |
|
141 | |||
140 | ## spacing def |
|
142 | ## spacing def |
@@ -72,13 +72,13 b' data = {' | |||||
72 | 'target_repo_url': h.link_to(pull_request_target_repo.repo_name, pull_request_target_repo_url), |
|
72 | 'target_repo_url': h.link_to(pull_request_target_repo.repo_name, pull_request_target_repo_url), | |
73 | } |
|
73 | } | |
74 | %> |
|
74 | %> | |
75 |
|
75 | ## header | ||
76 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
76 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
77 | <tr> |
|
77 | <tr> | |
78 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> |
|
78 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> | |
79 |
|
79 | |||
80 |
< |
|
80 | <div style="margin: 0; font-weight: bold"> | |
81 | <div style="margin-bottom: 4px"> |
|
81 | <div class="clear-both" class="clear-both" style="margin-bottom: 4px"> | |
82 | <span style="color:#7E7F7F">@${h.person(user.username)}</span> |
|
82 | <span style="color:#7E7F7F">@${h.person(user.username)}</span> | |
83 | ${_('requested a')} |
|
83 | ${_('requested a')} | |
84 | <a href="${pull_request_url}" style="${base.link_css()}"> |
|
84 | <a href="${pull_request_url}" style="${base.link_css()}"> | |
@@ -87,13 +87,14 b' data = {' | |||||
87 | </div> |
|
87 | </div> | |
88 | <div style="margin-top: 10px"></div> |
|
88 | <div style="margin-top: 10px"></div> | |
89 | ${_('Pull request')} <code>!${data['pr_id']}: ${data['pr_title']}</code> |
|
89 | ${_('Pull request')} <code>!${data['pr_id']}: ${data['pr_title']}</code> | |
90 |
</ |
|
90 | </div> | |
91 |
|
91 | |||
92 | </td> |
|
92 | </td> | |
93 | </tr> |
|
93 | </tr> | |
94 |
|
94 | |||
95 | </table> |
|
95 | </table> | |
96 |
|
96 | <div class="clear-both"></div> | ||
|
97 | ## main body | |||
97 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
98 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
98 | ## spacing def |
|
99 | ## spacing def | |
99 | <tr> |
|
100 | <tr> |
@@ -85,12 +85,13 b' data = {' | |||||
85 | } |
|
85 | } | |
86 | %> |
|
86 | %> | |
87 |
|
87 | |||
|
88 | ## header | |||
88 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
89 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
89 | <tr> |
|
90 | <tr> | |
90 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> |
|
91 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> | |
91 |
|
92 | |||
92 |
< |
|
93 | <div style="margin: 0; font-weight: bold"> | |
93 | <div style="margin-bottom: 4px"> |
|
94 | <div class="clear-both" style="margin-bottom: 4px"> | |
94 | <span style="color:#7E7F7F">@${h.person(updating_user.username)}</span> |
|
95 | <span style="color:#7E7F7F">@${h.person(updating_user.username)}</span> | |
95 | ${_('updated')} |
|
96 | ${_('updated')} | |
96 | <a href="${pull_request_url}" style="${base.link_css()}"> |
|
97 | <a href="${pull_request_url}" style="${base.link_css()}"> | |
@@ -99,13 +100,14 b' data = {' | |||||
99 | </div> |
|
100 | </div> | |
100 | <div style="margin-top: 10px"></div> |
|
101 | <div style="margin-top: 10px"></div> | |
101 | ${_('Pull request')} <code>!${data['pr_id']}: ${data['pr_title']}</code> |
|
102 | ${_('Pull request')} <code>!${data['pr_id']}: ${data['pr_title']}</code> | |
102 |
</ |
|
103 | </div> | |
103 |
|
104 | |||
104 | </td> |
|
105 | </td> | |
105 | </tr> |
|
106 | </tr> | |
106 |
|
107 | |||
107 | </table> |
|
108 | </table> | |
108 |
|
109 | <div class="clear-both"></div> | ||
|
110 | ## main body | |||
109 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
111 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
110 | ## spacing def |
|
112 | ## spacing def | |
111 | <tr> |
|
113 | <tr> | |
@@ -137,27 +139,31 b' data = {' | |||||
137 | </tr> |
|
139 | </tr> | |
138 | <tr> |
|
140 | <tr> | |
139 | <td style="padding-right:20px;">${_('Changes')}:</td> |
|
141 | <td style="padding-right:20px;">${_('Changes')}:</td> | |
140 | <td style="white-space:pre-line">\ |
|
142 | <td> | |
141 |
|
|
143 | <strong>Changed commits:</strong> | |
142 |
|
144 | <ul class="changes-ul"> | ||
143 | - Added: ${len(added_commits)} |
|
145 | <li>- Added: ${len(added_commits)}</li> | |
144 | - Removed: ${len(removed_commits)} |
|
146 | <li>- Removed: ${len(removed_commits)}</li> | |
|
147 | </ul> | |||
145 |
|
148 | |||
146 | <strong>Changed files:</strong> |
|
149 | <strong>Changed files:</strong> | |
|
150 | <ul class="changes-ul"> | |||
147 |
|
151 | |||
148 | %if not changed_files: |
|
152 | %if not changed_files: | |
149 | No file changes found |
|
153 | <li>No file changes found</li> | |
150 | %else: |
|
154 | %else: | |
151 | %for file_name in added_files: |
|
155 | %for file_name in added_files: | |
152 | - A <a href="${pull_request_url + '#a_' + h.FID(ancestor_commit_id, file_name)}">${file_name}</a> |
|
156 | <li>- A <a href="${pull_request_url + '#a_' + h.FID(ancestor_commit_id, file_name)}">${file_name}</a></li> | |
153 | %endfor |
|
157 | %endfor | |
154 | %for file_name in modified_files: |
|
158 | %for file_name in modified_files: | |
155 | - M <a href="${pull_request_url + '#a_' + h.FID(ancestor_commit_id, file_name)}">${file_name}</a> |
|
159 | <li>- M <a href="${pull_request_url + '#a_' + h.FID(ancestor_commit_id, file_name)}">${file_name}</a></li> | |
156 | %endfor |
|
160 | %endfor | |
157 | %for file_name in removed_files: |
|
161 | %for file_name in removed_files: | |
158 | - R <a href="${pull_request_url + '#a_' + h.FID(ancestor_commit_id, file_name)}">${file_name}</a> |
|
162 | <li>- R <a href="${pull_request_url + '#a_' + h.FID(ancestor_commit_id, file_name)}">${file_name}</a></li> | |
159 | %endfor |
|
163 | %endfor | |
160 | %endif |
|
164 | %endif | |
|
165 | ||||
|
166 | </ul> | |||
161 | </td> |
|
167 | </td> | |
162 | </tr> |
|
168 | </tr> | |
163 |
|
169 |
@@ -19,7 +19,7 b' A new user `${user.username}` has regist' | |||||
19 | ${self.plaintext_footer()} |
|
19 | ${self.plaintext_footer()} | |
20 | </%def> |
|
20 | </%def> | |
21 |
|
21 | |||
22 |
|
22 | ## header | ||
23 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
23 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
24 | <tr> |
|
24 | <tr> | |
25 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> |
|
25 | <td style="width:100%;border-bottom:1px solid #dbd9da;"> | |
@@ -31,7 +31,8 b' A new user `${user.username}` has regist' | |||||
31 | </td> |
|
31 | </td> | |
32 | </tr> |
|
32 | </tr> | |
33 | </table> |
|
33 | </table> | |
34 |
|
34 | <div class="clear-both"></div> | ||
|
35 | ## main body | |||
35 | <table style="text-align:left;vertical-align:middle;width: 100%"> |
|
36 | <table style="text-align:left;vertical-align:middle;width: 100%"> | |
36 | ## spacing def |
|
37 | ## spacing def | |
37 | <tr> |
|
38 | <tr> |
General Comments 0
You need to be logged in to leave comments.
Login now