diff options
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 |