From e24c3fbc0c4b0a7053beb27f527b751efe975e9f Mon Sep 17 00:00:00 2001 From: Rinkit Adhana Date: Sat, 15 Mar 2025 14:31:05 +0530 Subject: [PATCH 1/6] issue-page changes - 1 --- website/templates/comments2.html | 448 +++++++++++------- .../templates/includes/issue_left_info.html | 66 ++- .../templates/includes/issue_right_info.html | 238 +++++++--- website/templates/issue.html | 156 ++++-- 4 files changed, 582 insertions(+), 326 deletions(-) diff --git a/website/templates/comments2.html b/website/templates/comments2.html index 5211a942c7..a6af394999 100644 --- a/website/templates/comments2.html +++ b/website/templates/comments2.html @@ -1,191 +1,205 @@ {% load static %} -
+
-

Comments ({{ all_comment | length }})

+

Comments ({{ all_comment | length }})

+ {% if user.is_authenticated %} -
+ {% csrf_token %} -
+
- -
-
+ + +
+
+
- +
+ +
{% else %} -
To comment, please sign in.
+
+

To comment, please sign in.

+
{% endif %} -
+ +
{% for comment in all_comment %} {% if comment.parent is None %} -
-
-
-

- {% if comment.author_fk.user_avatar %} - {{ comment.author }} profile - {% else %} - User profile - {% endif %} - {{ comment.author }} -

-

- -

- +
+
+
+ {% if comment.author_fk.user_avatar %} + {{ comment.author }} profile + {% else %} + User profile + {% endif %} +
+

{{ comment.author }}

+

+ +

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

{{ comment.text | safe }}

-
+
+ +

{{ comment.text | safe }}

+ +
+ +
- {% endif %} {% empty %} +
+

No comments yet. Be the first to share your thoughts!

+
{% endfor %}
+ @@ -207,18 +165,11 @@

Liked By:

url: '/flag_issue/' + issue_pk + '/', data: {}, success: function (data) { - // Test this behaviour window.location.reload(); - // $('#flag-unflag').remove(); - // $('#flag-container').append(data); }, }); - // Later, when you want to "destroy" the event handler: - // Remove destroy - // $('body').off('click', '#flag-unflag', flag_unflag_handler); } - // Attach the click event handler $('body').on('click', '#flag-unflag', flag_unflag_handler); @@ -231,24 +182,7 @@

Liked By:

url: '/save_issue/' + issue_pk + '/', data: {}, success: function (data) { - // Test this behaviour window.location.reload(); - //if (data === "REMOVED"){ - // $('.bookmark i').removeClass('fa-solid'); - // $('.bookmark i').addClass('fa-regular'); - // $.notify("Bookmark Removed!", { - // style: "custom", - // className: "success" - // }); - //} - //else{ - // $('.bookmark i').removeClass('fa-regular'); - // $('.bookmark i').addClass('fa-solid'); - // $.notify("Bookmark Added!", { - // style: "custom", - // className: "success" - // }); - //} }, error: function (e) { $.notify("Some error occurred!", { @@ -259,11 +193,9 @@

Liked By:

}); } - // Attach the click event handler $('body').on('click', '#bookmark', bookmark_handler); diff --git a/website/templates/includes/_like_dislike_widget.html b/website/templates/includes/_like_dislike_widget.html index 20c1554e85..297439823f 100644 --- a/website/templates/includes/_like_dislike_widget.html +++ b/website/templates/includes/_like_dislike_widget.html @@ -1,243 +1,154 @@ {% load gravatar %} {% load custom_tags %} - - - - - + + + + - -Tweet   - - {% if github_link != "empty" %} - GitHub Link - {% else %} - Create Issue - {% endif %} -  - -{% if request.user.is_superuser or request.user == object.user %} - {% if object.user %} -
- {% csrf_token %} - - -
- {% endif %} - -{% endif %} -{% if request.user.is_superuser or request.user == object.user %} - -{% endif %} -{% if request.user.is_superuser or request.user == object.user %} - -{% endif %} - +
diff --git a/website/templates/includes/issue_left_info.html b/website/templates/includes/issue_left_info.html index ef1e819b30..3bb88de943 100644 --- a/website/templates/includes/issue_left_info.html +++ b/website/templates/includes/issue_left_info.html @@ -1,32 +1,17 @@ -
-

Screenshots:

-
-
- +
-
+{% endif %} diff --git a/website/templates/issue.html b/website/templates/issue.html index 2d4744dc41..3b7c547caa 100644 --- a/website/templates/issue.html +++ b/website/templates/issue.html @@ -39,126 +39,180 @@ {% load gravatar %} {% block content %} {% include "includes/sidenav.html" %} -
- -
- -
- - - -
- -
-

- {{ object.description|escapejs }} -

- - {% if object.markdown_description %} -

{{ object.markdown_description }}

- {% endif %} -
- - Organization Logo -

- {{ object.url }} -

-
- -
- User Profile Logo -
-
- {% if object.user.username %} - @{{ object.user.username }} - {% else %} - Anonymous + + {{ object.views }} + Views + + + +
+
+

{{ object.description|escapejs }}

+ {% if object.markdown_description %} +

{{ object.markdown_description }}

{% endif %} - found this issue on {{ object.created }}
+ + Organization Logo +

{{ object.url }}

+
+
+ User Profile Logo +
+
+ {% if object.user.username %} + @{{ object.user.username }} + {% else %} + Anonymous + {% endif %} + found this issue on {{ object.created }} +
+
+
+ {% include "includes/_like_dislike_share.html" %} + {% include "./includes/issue_left_info.html" %}
- - {% include "./includes/issue_left_info.html" %} - - {% include "includes/_like_dislike_share.html" %} - - - -
- - - -
- -
- {% include "./includes/issue_right_info.html" %} +
+ {% if request.user.is_superuser or request.user == object.user %} +
+ {% if request.user.is_superuser or request.user == object.user %} + {% if object.user %} +
+ {% csrf_token %} + + +
+ {% endif %} + + {% endif %} + {% if request.user.is_superuser or request.user == object.user %} + + {% endif %} + {% if request.user.is_superuser or request.user == object.user %} + + {% endif %} +
+ {% endif %} +
{% include "./includes/issue_right_info.html" %}
+
- -
- -
{% include "comments2.html" %}
- +
{% include "comments2.html" %}
- - - - - - - +