##// END OF EJS Templates
ui: updated comments box with latest styling.
marcink -
r4130:97ab7b84 default
parent child Browse files
Show More
@@ -391,8 +391,12 b' form.comment-form {'
391 391 display: inline-block;
392 392 }
393 393
394 .status_box {
395 margin-left: 10px;
396 }
397
394 398 .action-buttons {
395 float: right;
399 float: left;
396 400 display: inline-block;
397 401 }
398 402
@@ -521,7 +525,7 b' form.comment-form {'
521 525 }
522 526
523 527 .comment-area {
524 padding: 8px 12px;
528 padding: 6px 8px;
525 529 border: 1px solid @grey5;
526 530 .border-radius(@border-radius);
527 531
@@ -531,6 +535,14 b' form.comment-form {'
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 546 .comment-area-header .nav-links {
535 547 display: flex;
536 548 flex-flow: row wrap;
@@ -550,7 +562,7 b' form.comment-form {'
550 562 border: 1px dashed white;
551 563 border-radius: @border-radius;
552 564 margin-top: -10px;
553
565 line-height: 30px;
554 566 &.dz-drag-hover {
555 567 border-color: @grey3;
556 568 }
@@ -605,7 +617,13 b' form.comment-form {'
605 617 }
606 618
607 619 .toolbar-text {
608 float: left;
609 font-size: 12px;
620 float: right;
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 b''
309 309 <%def name="comment_form(form_type, form_id='', lineno_id='{1}', review_statuses=None, form_extras=None)">
310 310
311 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 314 <div class="comment-area">
315 315 <div class="comment-area-header">
316 <ul class="nav-links clearfix">
317 <li class="active">
318 <a href="#edit-btn" tabindex="-1" id="edit-btn_${lineno_id}">${_('Write')}</a>
319 </li>
320 <li class="">
321 <a href="#preview-btn" tabindex="-1" id="preview-btn_${lineno_id}">${_('Preview')}</a>
322 </li>
323 <li class="pull-right">
324 <select class="comment-type" id="comment_type_${lineno_id}" name="comment_type">
325 % for val in c.visual.comment_types:
326 <option value="${val}">${val.upper()}</option>
327 % endfor
328 </select>
329 </li>
330 </ul>
316 <div class="pull-left">
317 <ul class="nav-links clearfix">
318 <li class="active">
319 <a href="#edit-btn" tabindex="-1" id="edit-btn_${lineno_id}">${_('Write')}</a>
320 </li>
321 <li class="">
322 <a href="#preview-btn" tabindex="-1" id="preview-btn_${lineno_id}">${_('Preview')}</a>
323 </li>
324 </ul>
325 </div>
326 <div class="pull-right">
327 <span class="comment-area-text">${_('Mark as')}:</span>
328 <select class="comment-type" id="comment_type_${lineno_id}" name="comment_type">
329 % for val in c.visual.comment_types:
330 <option value="${val}">${val.upper()}</option>
331 % endfor
332 </select>
333 </div>
331 334 </div>
332 335
333 336 <div class="comment-area-write" style="display: block;">
@@ -341,14 +344,6 b''
341 344
342 345 <div class="comment-area-footer comment-attachment-uploader">
343 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 348 <div class="comment-attachment-text">
354 349 <div class="dropzone-text">
@@ -372,6 +367,32 b''
372 367
373 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 396 % if review_statuses:
376 397 <div class="status_box">
377 398 <select id="change_status_${lineno_id}" name="changeset_status">
@@ -386,31 +407,13 b''
386 407 </div>
387 408 % endif
388 409
389 ## inject extra inputs into the form
390 % if form_extras and isinstance(form_extras, (list, tuple)):
391 <div id="comment_form_extras">
392 % for form_ex_el in form_extras:
393 ${form_ex_el|n}
394 % endfor
395 </div>
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
410 <div class="toolbar-text">
411 <% renderer_url = '<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper()) %>
412 ${_('Comments parsed using {} syntax.').format(renderer_url)|n} <br/>
413 <span class="tooltip" title="${_('Use @username inside this text to send notification to this RhodeCode user')}">@mention</span>
414 ${_('and')}
415 <span class="tooltip" title="${_('Start typing with / for certain actions to be triggered via text box.')}">`/` autocomplete</span>
416 ${_('actions supported.')}
414 417 </div>
415 418 </div>
416 419
General Comments 0
You need to be logged in to leave comments. Login now