List feature
+ implemented list feature + implemented category feature
This commit is contained in:
parent
5877b83424
commit
32d60f51ac
23 changed files with 210 additions and 60 deletions
|
|
@ -57,26 +57,62 @@
|
|||
}
|
||||
|
||||
|
||||
|
||||
.title-wrapper *{
|
||||
.title-wrapper * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#id_img{
|
||||
#id_img {
|
||||
display: inline-block;
|
||||
margin-left: 1.2em;
|
||||
|
||||
}
|
||||
|
||||
.description-wrapper *{
|
||||
.description-wrapper * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.invform *{
|
||||
.invform * {
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
|
||||
#id_description{
|
||||
#id_description {
|
||||
width: 18em;
|
||||
height: 5em;
|
||||
}
|
||||
|
||||
.catform * {
|
||||
margin-top: 0.7em;
|
||||
}
|
||||
|
||||
.btnwrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.newcatlink {
|
||||
margin-left: 2em;
|
||||
}
|
||||
|
||||
.objecttable {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-top: 2em;
|
||||
margin-bottom: 2em;
|
||||
}
|
||||
|
||||
.objecttable-data, .objecttable-head {
|
||||
border: 1px solid #dddddd;
|
||||
text-align: center;
|
||||
padding: 0.4em;
|
||||
}
|
||||
|
||||
.objecttable-row:nth-child(even) {
|
||||
background-color: #dddddd;
|
||||
}
|
||||
|
||||
.objecttable-row:hover {
|
||||
-webkit-box-shadow: 3px 3px 28px -3px rgba(0, 0, 0, 0.1);
|
||||
-moz-box-shadow: 3px 3px 28px -3px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 3px 3px 28px -3px rgba(0, 0, 0, 0.1);
|
||||
border-radius: 10px;
|
||||
transition: 0.1s;
|
||||
}
|
||||
|
|
@ -37,6 +37,7 @@
|
|||
<li><a href="{% url 'index' %}">Home</a></li>
|
||||
{% if user.is_authenticated %}
|
||||
<li><a href="{% url 'add' %}">Objekt inventarisieren</a></li>
|
||||
<li><a href="{% url 'objlist' %}">Inventar</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if user.is_authenticated %}
|
||||
|
|
|
|||
27
invsystem/user_manager/templates/object_adder/category.html
Normal file
27
invsystem/user_manager/templates/object_adder/category.html
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{% extends 'bases/navbar.html' %}
|
||||
<html>
|
||||
{% block content %}
|
||||
|
||||
<body>
|
||||
<div class="container shadow">
|
||||
{% if not cat_name is None %}
|
||||
<div class="alert alert-info alert-dismissible">
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
Die Kategorie <strong>{{ cat_name }}</strong> wurde erstellt!
|
||||
</div>
|
||||
{% endif %}
|
||||
<form method="POST" class="post-form invform">
|
||||
{% csrf_token %}
|
||||
<div class="name-wrapper">
|
||||
{{ form.name.errors }}
|
||||
<label for="{{ form.name.id_for_lable }}">Kategorie:</label>
|
||||
{{ form.name }}
|
||||
</div>
|
||||
|
||||
<button type="submit" class="save btn btn-primary">Kategorie hinzufügen</button>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
|
||||
</html>
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
{% block content %}
|
||||
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="container shadow">
|
||||
{% if not obj_name is None %}
|
||||
<div class="alert alert-info alert-dismissible">
|
||||
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
|
||||
|
|
@ -22,6 +22,11 @@
|
|||
<label for="{{ form.title.id_for_lable }}">Objekt:</label>
|
||||
{{ form.title }}
|
||||
</div>
|
||||
<div class="category-wrapper">
|
||||
{{ form.category.errors }}
|
||||
<label for="{{ form.category.id_for_lable }}">Kategorie:</label>
|
||||
{{ form.category }}
|
||||
</div>
|
||||
<div class="img-wrapper">
|
||||
{{ form.img.errors }}
|
||||
<label for="{{ form.img.id_for_lable }}">Bild:</label>
|
||||
|
|
@ -32,8 +37,10 @@
|
|||
<label for="{{ form.description.id_for_lable }}">Beschreibung:</label>
|
||||
{{ form.description }}
|
||||
</div>
|
||||
|
||||
<button type="submit" class="save btn btn-primary">inventarisieren</button>
|
||||
<div class="btnwrapper">
|
||||
<button type="submit" class="save btn btn-primary">inventarisieren</button>
|
||||
<a href="./kategorie" class="newcatlink">Neue Kategorie hinzufügen</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
|
|
|
|||
29
invsystem/user_manager/templates/object_lister/index.html
Normal file
29
invsystem/user_manager/templates/object_lister/index.html
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{% extends 'bases/navbar.html' %}
|
||||
<html>
|
||||
{% block content %}
|
||||
|
||||
<body>
|
||||
<div class="container shadow">
|
||||
<table class="objecttable">
|
||||
<tr class="objecttable-row">
|
||||
<th class="objecttable-head">Name</th>
|
||||
<th class="objecttable-head">Anzahl</th>
|
||||
<th class="objecttable-head">Kategorie</th>
|
||||
<th class="objecttable-head">Inventarisierungsdatum</th>
|
||||
<th class="objecttable-head">Hinzugefügt von</th>
|
||||
</tr>
|
||||
{% for object in objects %}
|
||||
<tr class="objecttable-row">
|
||||
<td class="objecttable-data">{{ object.title }}</td>
|
||||
<td class="objecttable-data">{{ object.ammout }}</td>
|
||||
<td class="objecttable-data">{{ object.category }}</td>
|
||||
<td class="objecttable-data">{{ object.inventarized_date }}</td>
|
||||
<td class="objecttable-data">{{ object.user_added }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
{% endblock %}
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue