Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement djlint for templates #1834

Merged
merged 44 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d71dd98
testing djlint work or not
JisanAR03 Feb 25, 2024
8516013
testing djlint work or not
JisanAR03 Feb 25, 2024
692eee5
testing djlint work or not
JisanAR03 Feb 25, 2024
343b05c
testing djlint work or not
JisanAR03 Feb 25, 2024
dca3062
testing djlint work or not
JisanAR03 Feb 25, 2024
a0dbcbf
fix invite
JisanAR03 Feb 26, 2024
0fc3e2b
update for check
JisanAR03 Feb 26, 2024
b26d951
update for check
JisanAR03 Feb 26, 2024
ca60235
update for check
JisanAR03 Feb 26, 2024
30cef9b
Merge branch 'main' into issue_1825
JisanAR03 Feb 26, 2024
8bf35a7
update for check
JisanAR03 Feb 26, 2024
cc6bbc5
Merge branch 'issue_1825' of github.com:JisanAR03/BLT into issue_1825
JisanAR03 Feb 26, 2024
442db55
update for check
JisanAR03 Feb 26, 2024
7a50a20
update for check
JisanAR03 Feb 26, 2024
dc80b88
update for check
JisanAR03 Feb 26, 2024
e9db0d0
update for check
JisanAR03 Feb 26, 2024
d0aa67c
update for check
JisanAR03 Feb 27, 2024
aa2f8c4
update for check
JisanAR03 Feb 27, 2024
cc5d262
update for check
JisanAR03 Feb 27, 2024
432931e
update for check
JisanAR03 Feb 27, 2024
2ea6764
update for check
JisanAR03 Feb 27, 2024
80228d2
update for check
JisanAR03 Feb 27, 2024
3609a79
update for check
JisanAR03 Feb 27, 2024
4327920
update for check
JisanAR03 Feb 27, 2024
226f840
update for check
JisanAR03 Feb 27, 2024
265c7cb
update for check
JisanAR03 Feb 27, 2024
9fbaa07
update for check
JisanAR03 Feb 27, 2024
29e941d
update for check
JisanAR03 Feb 27, 2024
f04148d
update for check
JisanAR03 Feb 27, 2024
8b6067d
update for check
JisanAR03 Feb 27, 2024
5cadb31
update for check
JisanAR03 Feb 27, 2024
69befd0
update for check
JisanAR03 Feb 27, 2024
3a2c580
update for check
JisanAR03 Feb 27, 2024
fffaaa3
update for check
JisanAR03 Feb 27, 2024
583ac23
update for check
JisanAR03 Feb 27, 2024
480c784
update for check
JisanAR03 Feb 27, 2024
f16c60d
update for check
JisanAR03 Feb 27, 2024
90ccf1f
update for check
JisanAR03 Feb 27, 2024
2e4b89c
update for check
JisanAR03 Feb 27, 2024
bd18e7a
update for check
JisanAR03 Feb 27, 2024
a8c8c80
update for check
JisanAR03 Feb 27, 2024
ccea346
update for check
JisanAR03 Feb 27, 2024
443b3f3
update for check
JisanAR03 Feb 27, 2024
ae50de7
update for check
JisanAR03 Feb 27, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ jobs:
cache: 'poetry'
- name: Install dependencies
run: poetry install
- name: Install djlint
JisanAR03 marked this conversation as resolved.
Show resolved Hide resolved
run: pip install djlint
- name: Linting company templates directory
run: djlint --lint company/templates/
- name: Linting website templates directory
run: djlint --lint website/templates/
- name: Collect static files
run: poetry run python manage.py collectstatic --noinput
- name: Run tests
Expand Down
431 changes: 157 additions & 274 deletions company/templates/company/add_domain.html

Large diffs are not rendered by default.

461 changes: 211 additions & 250 deletions company/templates/company/bughunt/add_bughunt.html

Large diffs are not rendered by default.

112 changes: 52 additions & 60 deletions company/templates/company/bughunt/company_manage_bughunts.html
Original file line number Diff line number Diff line change
@@ -1,72 +1,69 @@
{% extends 'company/company_dashboard_base.html' %}

{% block title %}
Manage Bugs
{% endblock title %}


{% block body %}

<div class="bg-[#F3F5F7] w-full h-full flex flex-col items-center">

<div class="flex items-center md:justify-between w-full md:h-max mt-5 flex-col md:flex-row">
<p class="text-red-700 font-satoshi font-bold text-[35px] px-8">Manage Bughunts</p>

<div class="w-full md:w-[15%] flex justify-center md:justify-end mr-10">
<a href="{% url 'add_bughunt' company %}" class="flex items-center justify-center md:justify-center px-16 py-7 bg-[#DC4654] rounded-xl hover:bg-red-600 transition-all">
<i class="fa-sharp fa-solid fa-plus fa-xl text-white"></i>
<a href="{% url 'add_bughunt' company %}"
class="flex items-center justify-center md:justify-center px-16 py-7 bg-[#DC4654] rounded-xl hover:bg-red-600 transition-all">
<i class="fa-sharp fa-solid fa-plus fa-xl text-white"></i>
</a>
</div>
</div>

<div class="w-[96%] h-[70vh] overflow-y-scroll flow-root my-10">
<div class="relative overflow-x-auto shadow-md sm:rounded-lg h-full bg-white">
<table class="w-full text-sm text-left text-gray-500">
<caption class="p-5 text-xl font-semibold text-left text-gray-900 bg-white">
<div class="flex w-full justify-between">
<h2 class="mt-1 text-xl font-extrabold text-gray-500">Bughunts</h2>


<button id="dropdownDefaultButton" data-dropdown-toggle="dropdown" class="text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800" type="button">Filter Bughunts <svg class="w-2.5 h-2.5 ml-2.5" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 10 6">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4"/>
</svg></button>
<button id="dropdownDefaultButton"
data-dropdown-toggle="dropdown"
class="text-white bg-red-700 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center inline-flex items-center dark:bg-red-600 dark:hover:bg-red-700 dark:focus:ring-red-800"
type="button">
Filter Bughunts
<svg class="w-2.5 h-2.5 ml-2.5"
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 10 6">
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 1 4 4 4-4" />
</svg>
</button>
<!-- Dropdown menu -->
<div id="dropdown" class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700">
<ul class="py-2 text-sm text-gray-700 dark:text-gray-200" aria-labelledby="dropdownDefaultButton">
<li>
<a href="{% url 'company_manage_bughunts' company %}" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">All</a>
</li>
<li>
<a href="{% url 'company_manage_bughunts' company %}?filter=ongoing" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Ongoing</a>
</li>
<li>
<a href="{% url 'company_manage_bughunts' company %}?filter=draft" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Draft</a>
</li>
<li>
<a href="{% url 'company_manage_bughunts' company %}?filter=ended" class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Ended</a>
</li>
<div id="dropdown"
class="z-10 hidden bg-white divide-y divide-gray-100 rounded-lg shadow w-44 dark:bg-gray-700">
<ul class="py-2 text-sm text-gray-700 dark:text-gray-200"
aria-labelledby="dropdownDefaultButton">
<li>
<a href="{% url 'company_manage_bughunts' company %}"
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">All</a>
</li>
<li>
<a href="{% url 'company_manage_bughunts' company %}?filter=ongoing"
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Ongoing</a>
</li>
<li>
<a href="{% url 'company_manage_bughunts' company %}?filter=draft"
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Draft</a>
</li>
<li>
<a href="{% url 'company_manage_bughunts' company %}?filter=ended"
class="block px-4 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white">Ended</a>
</li>
</ul>
</div>



</div>
<p class="mt-1 text-sm font-normal text-gray-500">Filter, view, edit or delete. Manage your bughunts easily</p>
</caption>
<thead class="text-gray-700 uppercase bg-gray-50">
<tr>
<th scope="col" class="px-6 py-3 text-[1rem]">
Hunt
</th>
<th scope="col" class="px-6 py-3 text-[1rem]">
Start Date
</th>
<th scope="col" class="px-6 py-3 text-[1rem]">
End Date
</th>
<th scope="col" class="px-6 py-3 text-[1rem]">
Status
</th>
<th scope="col" class="px-6 py-3 text-[1rem]">Hunt</th>
<th scope="col" class="px-6 py-3 text-[1rem]">Start Date</th>
<th scope="col" class="px-6 py-3 text-[1rem]">End Date</th>
<th scope="col" class="px-6 py-3 text-[1rem]">Status</th>
<th scope="col" class="px-6 py-3 text-[1rem]">
<span class="sr-only">View</span>
</th>
Expand All @@ -77,17 +74,14 @@ <h2 class="mt-1 text-xl font-extrabold text-gray-500">Bughunts</h2>
</thead>
<tbody>
{% if bughunts %}
{% for hunt in bughunts%}
{% for hunt in bughunts %}
<tr class="bg-white border-b">
<th scope="row" class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap">
<th scope="row"
class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap">
{{ hunt.name }}
</th>
<td class="px-6 py-4">
{{ hunt.starts_on__day }}/{{ hunt.starts_on__month }}/{{ hunt.starts_on__year }}
</td>
<td class="px-6 py-4">
{{ hunt.end_on__day }}/{{ hunt.end_on__month }}/{{ hunt.end_on__year }}
</td>
<td class="px-6 py-4">{{ hunt.starts_on__day }}/{{ hunt.starts_on__month }}/{{ hunt.starts_on__year }}</td>
<td class="px-6 py-4">{{ hunt.end_on__day }}/{{ hunt.end_on__month }}/{{ hunt.end_on__year }}</td>
<td class="px-6 py-4">
{% if not hunt.is_published %}
<p class="text-gray-500">Draft</p>
Expand All @@ -98,35 +92,33 @@ <h2 class="mt-1 text-xl font-extrabold text-gray-500">Bughunts</h2>
{% endif %}
</td>
<td class="px-6 py-4 text-right">
<a href="{% url 'show_bughunt' hunt.id %}" class="font-medium text-blue-600 hover:underline">View</a>
<a href="{% url 'show_bughunt' hunt.id %}"
class="font-medium text-blue-600 hover:underline">View</a>
</td>
{% if hunt.result_published %}
<td class="px-6 py-4 text-right">
<a class="font-medium text-gray-600 hover:underline cursor-pointer">Edit</a>
</td>
{% else %}
<td class="px-6 py-4 text-right">
<a href="{% url 'add_bughunt' company %}?hunt={{ hunt.id }}" class="font-medium text-blue-600 hover:underline">Edit</a>
<a href="{% url 'add_bughunt' company %}?hunt={{ hunt.id }}"
class="font-medium text-blue-600 hover:underline">Edit</a>
</td>
{% endif %}
</tr>
{% endfor %}
{% else %}
<tr class="bg-white border-b">
<th scope="row" class="px-6 py-4 font-medium text-red-500 whitespace-nowrap">
No Bughunts found
</th>
<th scope="row"
class="px-6 py-4 font-medium text-red-500 whitespace-nowrap">No Bughunts found</th>
</tr>
{% endif %}
</tbody>
</table>
</div>
</div>

</div>
</div>

{% endblock %}

{% block js %}
<script src="https://unpkg.com/@themesberg/flowbite@latest/dist/flowbite.bundle.js"></script>
{% endblock %}
Loading
Loading