Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions website/templates/comments2.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
{% load static %}

<section id="comment_root" class="not-format mt-10">
<div class="flex justify-between items-center mb-6">
<h2 class="text-xl lg:text-3xl font-bold text-gray-900 ">Comments ({{ all_comment | length }})</h2>
</div>

{% if user.is_authenticated %}
<form class="mb-6" id="comments">
{% csrf_token %}
<div class="py-2 px-4 mb-4 bg-white rounded-lg rounded-t-lg border border-gray-200 ">
Expand All @@ -24,33 +23,35 @@ <h2 class="text-xl lg:text-3xl font-bold text-gray-900 ">Comments ({{ all_commen
Post comment
</button>
</form>

{% else %}
<div class="items-center text-3xl text-gray-900 mb-6">To comment, please sign in.</div>
{% endif %}
<div class="comment_group">
{% for comment in all_comment %}
{% if comment.parent == None %}
<article class="p-6 mb-6 text-base bg-white rounded-lg ">
<footer class="flex justify-between items-center mb-2">
<div class="flex items-center">
<p class="inline-flex items-center mr-3 text-3xl text-gray-900 ">
<div class="grid grid-cols-9 items-center justify-between">
<p class="sm:col-start-1 sm:col-span-4 col-span-5 sm:order-1 items-center inline-flex sm:text-3xl text-2xl text-gray-900 ">
{% if comment.author_fk %}

<img
class="mr-2 w-12 h-12 rounded-full"
class="sm:mr-2 mr-1 sm:w-12 w-10 sm:h-12 h-10 rounded-full"
src="{{ MEDIA_URL }}{{ comment.author_fk.user_avatar }}"
alt="{{ comment.author }} profile">

{% else %}
<img
class="mr-2 w-12 h-12 rounded-full"
class="sm:mr-2 mr-1 sm:w-12 w-10 sm:h-12 h-10 rounded-full"
src="{% static 'images/dummy-user.png' %}"
alt="User profile">
{% endif %}
{{ comment.author }}
</p>
<p class="text-2xl text-gray-600 "><time pubdate datetime="2022-02-08"
<p class="sm:col-start-5 col-start-1 sm:col-span-3 col-span-9 sm:order-2 order-3 text-xl sm:text-2xl text-gray-600 mr-2"><time pubdate datetime="2022-02-08"
title="February 8th, 2022">commented {{ comment.created_date | timesince }} ago</time></p>

<button onclick="add_reply('{{ comment.id }}','{{ comment.author }}')" class="ml-5 w-[70px] h-10 text-xl rounded-lg border-[1px] border-gray-400">
<button onclick="add_reply('{{ comment.id }}','{{ comment.author }}')" class="sm:col-start-8 col-start-7 sm:col-span-3 col-span-4 sm:order-3 order-2 w-[70px] h-10 sm:text-xl text-lg rounded-lg border-[1px] border-gray-400 sm:ml-0 ml-[2.3rem]">
<i class="fa-solid fa-reply text-gray-500"></i>
Reply
</button>
Expand Down
2 changes: 1 addition & 1 deletion website/templates/issue2.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<p class="text-3xl font-bold">Status:</p>
<div class="w-1/2 flex {% if request.user == object.user %} justify-between {% else %} justify-end {% endif %}">
{% if request.user == object.user or request.is_staff or request.is_superuser%}
<a class="edit-issue-status font-bold bg-gray-600 px-5 py-1 text-white rounded-xl" id="issue_stat">
<a class="edit-issue-status font-bold bg-gray-600 px-5 py-1 text-white rounded-xl mr-2" id="issue_stat">
Click
to
{% if object.status == "open" %}Close{% else %}Open{% endif %}
Expand Down