You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
4.4 KiB
HTML

{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Osina</title>
<link rel="stylesheet" type="text/css" href='{% static "dist/output.css" %}'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
</head>
<body>
<div id="hiddenContent">
<h1 class="text-slate-800 text-2xl font-semibold text-center mb-1">Points</h1>
<div class="w-full pr-4">
{% for point in points %}
{% if point.status == 'Not Completed' %}
<div class="w-full flex justify-between items-center py-2 border-b border-gray-200">
<div class="w-[380px]">
<p class="text-slate-800">{{point.text}}</p>
</div>
<div class="flex justify-end items-center gap-2">
<form method="post" action="{% url 'mark_point_working_on' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-[120px] px-2 py-1 bg-transparent border border-yellow-500 rounded-md text-yellow-500 hover:bg-yellow-500 hover:text-white">Working
On</button>
</form>
<form method="post" action="{% url 'mark_point_completed' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-[120px] px-2 py-1 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button>
</form>
<form method="post" action="{% url 'deletepointmodal' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-fit px-2 py-1 bg-white border border-red-500 rounded-md text-red-500 hover:bg-red-500 hover:text-white cursor-pointer">
<i class="fa fa-trash"></i>
</button>
</form>
</div>
</div>
{% endif %}
{% if point.status == 'Completed' %}
<div class="w-full flex justify-between items-center py-2 border-b border-gray-200">
<div class="w-[380px]">
<p class="text-slate-800 line-through">{{point.text}}</p>
</div>
<div class="w-[150px]">
<button class="w-full px-2 py-1 bg-blue-500 border border-blue-500 rounded-md text-white opacity-40"
value="Completed" disabled>Completed</button>
</div>
</div>
{% endif %}
{% if point.status == 'Working On' %}
<div class="w-full flex justify-between items-center py-2 border-b border-gray-200">
<div class="w-[380px]">
<p class="text-slate-800">{{point.text}}</p>
</div>
<div class="flex justify-end items-center gap-2">
<button
class="w-[120px] px-2 py-1 border border-yellow-500 rounded-md bg-yellow-500 text-white opacity-40"
disabled>Working On</button>
<form method="post" action="{% url 'mark_point_completed' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-[120px] px-2 py-1 bg-transparent border border-blue-500 rounded-md text-blue-500 hover:bg-blue-500 hover:text-white">Complete</button>
</form>
<form method="post" action="{% url 'deletepointmodal' point.id task.id %}">
{% csrf_token %}
<button type="submit"
class="w-fit px-2 py-1 bg-white border border-red-500 rounded-md text-red-500 hover:bg-red-500 hover:text-white cursor-pointer">
<i class="fa fa-trash"></i>
</button>
</form>
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</body>
</html>