summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/views/merge_requests/show.html.erb9
-rw-r--r--public/javascripts/application.js8
-rw-r--r--public/stylesheets/base.css9
3 files changed, 24 insertions, 2 deletions
diff --git a/app/views/merge_requests/show.html.erb b/app/views/merge_requests/show.html.erb
index cf15f4e..3f8b763 100644
--- a/app/views/merge_requests/show.html.erb
+++ b/app/views/merge_requests/show.html.erb
@@ -73,7 +73,14 @@
:locals => {:version => @merge_request.versions.last} -%>
</div>
-<h2 id="comments">Comments</h2>
+<h2 id="comments">Comments
+
+<form action="#">
+ <label for="toggle_inline_comments">Include comments entered inline</label>
+ <input type="checkbox" id="toggle_inline_comments" checked="checked" />
+</form>
+</h2>
+
<div class="comments" id="merge_request_comments">
<%= render :partial => @merge_request.comments -%>
</div>
diff --git a/public/javascripts/application.js b/public/javascripts/application.js
index 0ebd927..0ba6142 100644
--- a/public/javascripts/application.js
+++ b/public/javascripts/application.js
@@ -481,6 +481,14 @@ $(document).ready(function() {
$($(this).attr("href")).addClass("highlighted");
return true;
})
+
+ $("#toggle_inline_comments").live("change", function(){
+ if ($(this).is(":checked")) {
+ $(".comment.inline").show();
+ } else {
+ $(".comment.inline").hide();
+ }
+ });
});
var Gitorious = {};
diff --git a/public/stylesheets/base.css b/public/stylesheets/base.css
index ba836a0..61c824f 100644
--- a/public/stylesheets/base.css
+++ b/public/stylesheets/base.css
@@ -1734,7 +1734,14 @@ ul.diff_stats small.deletions { color: #DC0000; }
.comment .body blockquote p:last-child, .comment .body blockquote p:last-child {
margin-bottom: 0;
}
-
+h2#comments form {
+ float: right;
+}
+h2#comments form label {
+ font-size: 11px;
+ font-weight: normal;
+ color: #000;
+}
/* inline diff comments */
.diff-comment .body p {