From cfc3833a1a0c18bf38ae866a19704edeebfa0027 Mon Sep 17 00:00:00 2001 From: Raghav Jajodia Date: Wed, 7 Jun 2017 23:38:59 +0530 Subject: [PATCH 1/3] Fix empty OCR bug --- website/templates/issue.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/website/templates/issue.html b/website/templates/issue.html index f92389bf35..3132a39738 100644 --- a/website/templates/issue.html +++ b/website/templates/issue.html @@ -156,10 +156,12 @@

Screenshot:



+ {% if object.get_ocr %}

OCR Results:


{{object.get_ocr}}

+ {% endif %}
From d1300cef05575e18cb8ef5eb166a2fd513f947a6 Mon Sep 17 00:00:00 2001 From: Raghav Jajodia Date: Wed, 7 Jun 2017 23:43:36 +0530 Subject: [PATCH 2/3] Fix empty comments bug --- website/templates/issue.html | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/website/templates/issue.html b/website/templates/issue.html index 3132a39738..929bc0fb5c 100644 --- a/website/templates/issue.html +++ b/website/templates/issue.html @@ -166,24 +166,23 @@

OCR Results:


{% csrf_token %} -
-
-
- -

+ + + + +{% if all_comment %}

Comments:

- {% for comment in all_comment %}
{{ comment.created_date }}
{{ comment.author }} -

{{ comment.text|linebreaks }}

+

{{ comment.text|linebreaks }}

- {% if user.username == comment.author %} + {% if user.username == comment.author %}
{% csrf_token %} @@ -197,15 +196,12 @@

Comments:

- - {% else %} -

- {% endif %}
{% empty %} {% endfor %} +{% endif %} {% endblock %} From 8d9a1245295d9b1c68be0631b3442c86782de1ef Mon Sep 17 00:00:00 2001 From: Raghav Jajodia Date: Wed, 7 Jun 2017 23:49:22 +0530 Subject: [PATCH 3/3] Improve styling of comments section --- website/templates/issue.html | 39 +++++++++++++++++------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/website/templates/issue.html b/website/templates/issue.html index 929bc0fb5c..28e3a3e9cd 100644 --- a/website/templates/issue.html +++ b/website/templates/issue.html @@ -178,27 +178,24 @@

Comments:

{% for comment in all_comment %}
-
{{ comment.created_date }}
- {{ comment.author }} -

{{ comment.text|linebreaks }}

- - {% if user.username == comment.author %} - -
- {% csrf_token %} - -
- - - -
- {% csrf_token %} - -
- - {% endif %} - -
+
+
{{ comment.created_date }}
+ {% if user.username == comment.author %} +
+ {% csrf_token %} + +
+
+ {% csrf_token %} + +
+ {% endif %} +
+
+ {{ comment.author }} +

{{ comment.text|linebreaks }}

+
+ {% empty %} {% endfor %} {% endif %}