table view
This commit is contained in:
@@ -3,9 +3,7 @@
|
||||
{% block content %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
<!--<div class="container">-->
|
||||
<!-- form to input working hours-->
|
||||
<!-- <div class="row">-->
|
||||
<!-- form to input workplace -->
|
||||
<div class="form-hours">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
@@ -13,6 +11,4 @@
|
||||
<button class="btn btn-lg btn-success btn-block" type="submit">Dodaj</button>
|
||||
</form>
|
||||
</div>
|
||||
<!-- </div>-->
|
||||
<!--</div>-->
|
||||
{% endblock %}
|
||||
@@ -52,7 +52,7 @@
|
||||
<a class="nav-link" href="{% url 'sign-up' %}">Dodaj pracownika</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{% url 'addworkplace' %}">Dodaj pracę</a>
|
||||
<a class="nav-link" href="{% url 'workplaces' %}">Prace</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
||||
26
templates/workplaces.html
Normal file
26
templates/workplaces.html
Normal file
@@ -0,0 +1,26 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block content %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
<!-- Show workplaces -->
|
||||
<div class="table-view">
|
||||
<a href="{% url 'addworkplace' %}">+ Dodaj pracę</a> <br><br>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">Miejsca pracy</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for wp in workplaces.all %}
|
||||
<tr>
|
||||
<td>{{ wp.workplace }} <br></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user