diff --git a/pagure/static/pagure.css b/pagure/static/pagure.css index b34d36c..8ad1ded 100644 --- a/pagure/static/pagure.css +++ b/pagure/static/pagure.css @@ -449,3 +449,14 @@ pre.softwrap white-space: pre-wrap; word-wrap: break-word; } + +.inline-comments { + padding: 1rem 1rem; + background-color: white; + text-indent:4px; + border-radius: 0.25rem 0.25rem 0 0; +} + +.inline-btn { + cursor: pointer; +} diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 2b4f225..8b9eb05 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -323,12 +323,17 @@
{{comment.user.user}} commented on line - {{ - comment.line}} of {{comment.filename}} + {{ + comment.line}} of {{comment.filename}}.
{{ comment.date_created | humanize}}
+ (Show) +
+ {{ comment.comment }} +
{% elif comment.notification %} @@ -603,6 +608,17 @@ function setup_reply_btns() { $(document).ready(function() { + $(".inline-comments").hide(); + $( ".inline-btn" ).click(function() { + var msgid = $( this ).attr('data-id'); + if ($( this ).html() == 'Show') { + $( this ).html('Hide'); + } else { + $( this ).html('Show'); + } + $( '#inline-comment-' + msgid).toggle(); + }); + $( ".commit_msg_txt" ).hide(); $( ".commit_msg_btn" ).click(function() { var msgid = $( this ).attr('data-id');