mirror of
https://github.com/inventree/InvenTree.git
synced 2025-08-07 04:12:11 +00:00
Improved list and detail views for supplier
Huzzah for bootstrap
This commit is contained in:
20
InvenTree/part/migrations/0015_auto_20180415_0302.py
Normal file
20
InvenTree/part/migrations/0015_auto_20180415_0302.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2018-04-15 03:02
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('part', '0014_auto_20180415_0107'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='partcategory',
|
||||
name='description',
|
||||
field=models.CharField(max_length=250),
|
||||
),
|
||||
]
|
20
InvenTree/part/migrations/0016_auto_20180415_0316.py
Normal file
20
InvenTree/part/migrations/0016_auto_20180415_0316.py
Normal file
@@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.11 on 2018-04-15 03:16
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('part', '0015_auto_20180415_0302'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='part',
|
||||
name='description',
|
||||
field=models.CharField(max_length=250),
|
||||
),
|
||||
]
|
@@ -88,7 +88,7 @@ class Part(models.Model):
|
||||
name = models.CharField(max_length=100, unique=True)
|
||||
|
||||
# Longer description of the part (optional)
|
||||
description = models.CharField(max_length=250, blank=True)
|
||||
description = models.CharField(max_length=250)
|
||||
|
||||
# Internal Part Number (optional)
|
||||
# Potentially multiple parts map to the same internal IPN (variants?)
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<a class="navbar-brand" href="/"><img src="{% static 'img/inventree.png' %}" width="40" height="40"/></a>
|
||||
</div>
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="active"><a href="/part/">Parts</a></li>
|
||||
<li><a href="/part/">Parts</a></li>
|
||||
<li><a href="/stock/">Stock</a></li>
|
||||
<li><a href="/supplier/">Suppliers</a></li>
|
||||
<li><a href="/track/">Tracking</a></li>
|
||||
|
@@ -6,6 +6,11 @@
|
||||
|
||||
{% include "part/cat_link.html" with category=category %}
|
||||
|
||||
<p>
|
||||
<b>{{ category.name }}</b><br>
|
||||
<i>{{ category.description }}</i>
|
||||
</p>
|
||||
|
||||
{% include "part/category_subcategories.html" with children=category.children.all %}
|
||||
|
||||
{% include "part/category_parts.html" with parts=category.parts.all %}
|
||||
|
@@ -1,10 +1,15 @@
|
||||
{% if parts|length > 0 %}
|
||||
Parts:
|
||||
<ul class="list-group">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Part</th>
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
{% for part in parts %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'part-detail' part.id %}">{{ part.name }}</a> - {{ part.description }}
|
||||
</li>
|
||||
<tr>
|
||||
<td><a href="{% url 'part-detail' part.id %}">{{ part.name }}</a></td>
|
||||
<td>{{ part.description }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</table>
|
||||
{% endif %}
|
@@ -3,7 +3,10 @@ Subcategories:
|
||||
<ul class="list-group">
|
||||
{% for child in children %}
|
||||
<li class="list-group-item">
|
||||
<a href="{% url 'category-detail' child.id %}">{{ child.name }}</a> - {{ child.description }}
|
||||
<b><a href="{% url 'category-detail' child.id %}">{{ child.name }}</a></b>
|
||||
{% if child.description %}
|
||||
<i> - {{ child.description }}</i>
|
||||
{% endif %}
|
||||
<span class='badge'>{{ child.partcount }}</span>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
@@ -16,7 +16,7 @@
|
||||
{% endif %}/>
|
||||
</div>
|
||||
<div class="media-body">
|
||||
<h5>{{ part.name }}</h5>
|
||||
<h4>{{ part.name }}</h4>
|
||||
{% if part.description %}
|
||||
<p><i>{{ part.description }}</i></p>
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user