ui: updated comments box with latest styling.
marcink -
r4130:97ab7b84 default
Not Reviewed
Show More
Add another comment
TODOs: 0 unresolved 0 Resolved
COMMENTS: 0 General 0 Inline
@@ -391,8 +391,12
391 display: inline-block;
391 display: inline-block;
392 }
392 }
393
393
394 .status_box {
395 margin-left: 10px;
396 }
397
394 .action-buttons {
398 .action-buttons {
395 float: right;
399 float: left;
396 display: inline-block;
400 display: inline-block;
397 }
401 }
398
402
@@ -521,7 +525,7
521 }
525 }
522
526
523 .comment-area {
527 .comment-area {
524 padding: 8px 12px;
528 padding: 6px 8px;
525 border: 1px solid @grey5;
529 border: 1px solid @grey5;
526 .border-radius(@border-radius);
530 .border-radius(@border-radius);
527
531
@@ -531,6 +535,14
531
535
532 }
536 }
533
537
538 comment-area-text {
539 color: @grey3;
540 }
541
542 .comment-area-header {
543 height: 35px;
544 }
545
534 .comment-area-header .nav-links {
546 .comment-area-header .nav-links {
535 display: flex;
547 display: flex;
536 flex-flow: row wrap;
548 flex-flow: row wrap;
@@ -550,7 +562,7
550 border: 1px dashed white;
562 border: 1px dashed white;
551 border-radius: @border-radius;
563 border-radius: @border-radius;
552 margin-top: -10px;
564 margin-top: -10px;
553
565 line-height: 30px;
554 &.dz-drag-hover {
566 &.dz-drag-hover {
555 border-color: @grey3;
567 border-color: @grey3;
556 }
568 }
@@ -605,7 +617,13
605 }
617 }
606
618
607 .toolbar-text {
619 .toolbar-text {
608 float: left;
620 float: right;
609 font-size: 12px;
621 font-size: 11px;
622 color: @grey4;
623 text-align: right;
624
625 a {
626 color: @grey4;
627 }
610 }
628 }
611
629
@@ -309,25 +309,28
309 <%def name="comment_form(form_type, form_id='', lineno_id='{1}', review_statuses=None, form_extras=None)">
309 <%def name="comment_form(form_type, form_id='', lineno_id='{1}', review_statuses=None, form_extras=None)">
310
310
311 ## comment injected based on assumption that user is logged in
311 ## comment injected based on assumption that user is logged in
312 <form ${'id="{}"'.format(form_id) if form_id else '' |n} action="#" method="GET">
312 <form ${('id="{}"'.format(form_id) if form_id else '') |n} action="#" method="GET">
313
313
314 <div class="comment-area">
314 <div class="comment-area">
315 <div class="comment-area-header">
315 <div class="comment-area-header">
316 <ul class="nav-links clearfix">
316 <div class="pull-left">
317 <li class="active">
317 <ul class="nav-links clearfix">
318 <a href="#edit-btn" tabindex="-1" id="edit-btn_${lineno_id}">${_('Write')}</a>
318 <li class="active">
319 </li>
319 <a href="#edit-btn" tabindex="-1" id="edit-btn_${lineno_id}">${_('Write')}</a>
320 <li class="">
320 </li>
321 <a href="#preview-btn" tabindex="-1" id="preview-btn_${lineno_id}">${_('Preview')}</a>
321 <li class="">
322 </li>
322 <a href="#preview-btn" tabindex="-1" id="preview-btn_${lineno_id}">${_('Preview')}</a>
323 <li class="pull-right">
323 </li>
324 <select class="comment-type" id="comment_type_${lineno_id}" name="comment_type">
324 </ul>
325 % for val in c.visual.comment_types:
325 </div>
326 <option value="${val}">${val.upper()}</option>
326 <div class="pull-right">
327 % endfor
327 <span class="comment-area-text">${_('Mark as')}:</span>
328 </select>
328 <select class="comment-type" id="comment_type_${lineno_id}" name="comment_type">
329 </li>
329 % for val in c.visual.comment_types:
330 </ul>
330 <option value="${val}">${val.upper()}</option>
331 % endfor
332 </select>
333 </div>
331 </div>
334 </div>
332
335
333 <div class="comment-area-write" style="display: block;">
336 <div class="comment-area-write" style="display: block;">
@@ -341,14 +344,6
341
344
342 <div class="comment-area-footer comment-attachment-uploader">
345 <div class="comment-area-footer comment-attachment-uploader">
343 <div class="toolbar">
346 <div class="toolbar">
344 <div class="toolbar-text">
345 ${(_('Comments parsed using %s syntax with %s, and %s actions support.') % (
346 ('<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
347 ('<span class="tooltip" title="%s">@mention</span>' % _('Use @username inside this text to send notification to this RhodeCode user')),
348 ('<span class="tooltip" title="%s">`/`</span>' % _('Start typing with / for certain actions to be triggered via text box.'))
349 )
350 )|n}
351 </div>
352
347
353 <div class="comment-attachment-text">
348 <div class="comment-attachment-text">
354 <div class="dropzone-text">
349 <div class="dropzone-text">
@@ -372,6 +367,32
372
367
373 <div class="comment-footer">
368 <div class="comment-footer">
374
369
370 ## inject extra inputs into the form
371 % if form_extras and isinstance(form_extras, (list, tuple)):
372 <div id="comment_form_extras">
373 % for form_ex_el in form_extras:
374 ${form_ex_el|n}
375 % endfor
376 </div>
377 % endif
378
379 <div class="action-buttons">
380 % if form_type != 'inline':
381 <div class="action-buttons-extra"></div>
382 % endif
383
384 <input class="btn btn-success comment-button-input" id="save_${lineno_id}" name="save" type="submit" value="${_('Comment')}">
385
386 ## inline for has a file, and line-number together with cancel hide button.
387 % if form_type == 'inline':
388 <input type="hidden" name="f_path" value="{0}">
389 <input type="hidden" name="line" value="${lineno_id}">
390 <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);">
391 ${_('Cancel')}
392 </button>
393 % endif
394 </div>
395
375 % if review_statuses:
396 % if review_statuses:
376 <div class="status_box">
397 <div class="status_box">
377 <select id="change_status_${lineno_id}" name="changeset_status">
398 <select id="change_status_${lineno_id}" name="changeset_status">
@@ -386,31 +407,13
386 </div>
407 </div>
387 % endif
408 % endif
388
409
389 ## inject extra inputs into the form
410 <div class="toolbar-text">
390 % if form_extras and isinstance(form_extras, (list, tuple)):
411 <% renderer_url = '<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper()) %>
391 <div id="comment_form_extras">
412 ${_('Comments parsed using {} syntax.').format(renderer_url)|n} <br/>
392 % for form_ex_el in form_extras:
413 <span class="tooltip" title="${_('Use @username inside this text to send notification to this RhodeCode user')}">@mention</span>
393 ${form_ex_el|n}
414 ${_('and')}
394 % endfor
415 <span class="tooltip" title="${_('Start typing with / for certain actions to be triggered via text box.')}">`/` autocomplete</span>
395 </div>
416 ${_('actions supported.')}
396 % endif
397
398 <div class="action-buttons">
399 ## inline for has a file, and line-number together with cancel hide button.
400 % if form_type == 'inline':
401 <input type="hidden" name="f_path" value="{0}">
402 <input type="hidden" name="line" value="${lineno_id}">
403 <button type="button" class="cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);">
404 ${_('Cancel')}
405 </button>
406 % endif
407
408 % if form_type != 'inline':
409 <div class="action-buttons-extra"></div>
410 % endif
411
412 ${h.submit('save', _('Comment'), class_='btn btn-success comment-button-input')}
413
414 </div>
417 </div>
415 </div>
418 </div>
416
419
Comments 0
You need to be logged in to leave comments. Login now