Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 521fb07

Browse files
authored
Add files via upload
1 parent 8589a8c commit 521fb07

File tree

1 file changed

+72
-0
lines changed

1 file changed

+72
-0
lines changed
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{% extends 'base.html' %}
2+
{% block content %}
3+
<a href="{% url 'jobs:adauga' %}" class="btn btn-success">Add job</a>
4+
<br>
5+
<table class="table">
6+
<thead>
7+
<tr>
8+
<th>Index</th>
9+
<th>Type</th>
10+
<th>url</th>
11+
<th>Title</th>
12+
<th>Description</th>
13+
<th>How to apply</th>
14+
<th>Stare</th>
15+
<th>Actions</th>
16+
</tr>
17+
</thead>
18+
<tbody>
19+
{% for item in jobs_list %}
20+
<tr>
21+
<td>{{ forloop.counter0|add:page_obj.start_index }}</td>
22+
<td>{{ item.type }}</td>
23+
24+
<td>{{ item.url }}</td>
25+
<td>{{ item.title }}</td>
26+
<td>{{ item.description }}</td>
27+
<td>{{ item.how_to_apply }}</td>
28+
<td>{% if item.active == 1 %}
29+
<span>Activ</span>
30+
{% else %}
31+
<span>Inactiv</span>
32+
{% endif %}
33+
</td>
34+
<td>
35+
<a href="{% url 'jobs:modifica' item.id %}" class="btn btn-success">Change</a>
36+
{% if item.active == 1 %}
37+
<a href="{% url 'jobs:sterge' item.id %}" class="btn btn-danger">Delete</a>
38+
{% else %}
39+
<a href="{% url 'jobs:activeaza' item.id %}" class="btn btn-info">On</a>
40+
{% endif %}
41+
</td>
42+
</tr>
43+
{% endfor %}
44+
</tbody>
45+
</table>
46+
<div class="d-flex align-items-center">
47+
{% if is_paginated %}
48+
<ul class="pagination">
49+
{% if page_obj.has_previous %}
50+
<li><a class="btn" href="?page={{ page_obj.previous_page_number }}"><<</a></li>
51+
{% else %}
52+
<li class="disabled btn"><span><<</span></li>
53+
{% endif %}
54+
{% for i in paginator.page_range %}
55+
{% if page_obj.number == i %}
56+
<li class="active btn btn-info"><span>{{ i }}<span class="sr-only">(curent)</span></span></li>
57+
{% else %}
58+
<li><a class="btn" href="?page={{ i }}">{{ i }}</a></li>
59+
{% endif %}
60+
{% endfor %}
61+
{% if page_obj.has_next %}
62+
<li><a class="btn" href="?page={{ page_obj.next_page_number }}">>></a></li>
63+
{% else %}
64+
<li class="disabled btn"><span>>></span></li>
65+
{% endif %}
66+
<span class="align-right">Showing {{ page_obj.start_index }} - {{ page_obj.end_index }} of
67+
{{ page_obj.paginator.count }}
68+
</span>
69+
</ul>
70+
{% endif %}
71+
</div>
72+
{% endblock %}

0 commit comments

Comments
 (0)