diff options
author | Steve Losh <steve@stevelosh.com> | 2009-02-01 16:09:50 -0500 |
---|---|---|
committer | Steve Losh <steve@stevelosh.com> | 2009-02-01 16:09:50 -0500 |
commit | 122b5aef8aaa94e71ea91facb156a26607575575 (patch) | |
tree | 93e64173e7e80a2d2ce2a4cfd03df9216657732f /templates | |
parent | 59c742611d77ce59414d073e98782014dfb70d8f (diff) | |
download | bugseverywhere-122b5aef8aaa94e71ea91facb156a26607575575.tar.gz |
I can has commenting!
Diffstat (limited to 'templates')
-rw-r--r-- | templates/base.html | 6 | ||||
-rw-r--r-- | templates/bug.html | 15 |
2 files changed, 20 insertions, 1 deletions
diff --git a/templates/base.html b/templates/base.html index 40ec10f..c860e65 100644 --- a/templates/base.html +++ b/templates/base.html @@ -36,6 +36,12 @@ e.preventDefault(); }); + $('#add-comment').click(function(e) { + $('#add-comment-link').hide(); + $('#add-comment-form').fadeIn('fast'); + e.preventDefault(); + }); + $('table tr:odd').addClass('stripe'); }); </script> diff --git a/templates/bug.html b/templates/bug.html index ee359f7..2cdbb28 100644 --- a/templates/bug.html +++ b/templates/bug.html @@ -33,9 +33,22 @@ <h3>Comments</h3> {% for comment in bug.comments() %} <div class="bug-comment"> - <h4 class="bug-comment-header">{{ comment.From|e }} said:</h4> + <h4 class="bug-comment-header">{{ comment.From|striptags|e }} said:</h4> <p class="bug-comment-body">{{ comment.body|trim|e }}</p> <p class="bug-comment-footer">on {{ comment.time|datetimeformat }}</p> </div> {% endfor %} + <form id="add-comment-form" class="vertical" action="/comment" method="post"> + <fieldset> + <input type="hidden" name="id" value="{{ bug.uuid }}" /> + <div class="field"> + <label for="add-comment-body">Comment</label> + <textarea cols="60" rows="6" id="add-comment-body" name="body"></textarea> + </div> + <div class="buttons"> + <button type="submit">Submit</button> + </div> + </fieldset> + </form> + <p id="add-comment-link"><a href="" id="add-comment">+ Add a comment</a></p> {% endblock %}
\ No newline at end of file |