mirror of
https://github.com/inventree/inventree-docs.git
synced 2025-04-28 05:36:46 +00:00
Added Related Parts information to 0.1.4 new feature list
Improved img template to take in direct URLs
This commit is contained in:
parent
3c3f520986
commit
277e0bfac0
@ -4,27 +4,33 @@
|
||||
{% set assets = '/assets' %}
|
||||
{% endif %}
|
||||
|
||||
{% if 'http' in url %}
|
||||
{% set doc_url = url %}
|
||||
{% else %}
|
||||
{% set doc_url = '{{ assets }}/images/{{ url }}' %}
|
||||
{% endif %}
|
||||
|
||||
<figure class='image'>
|
||||
{% if id %}
|
||||
<!-- The link that, when clicked, will display the image in full screen -->
|
||||
<a href="#{{ id }}">
|
||||
{% elif url %}
|
||||
<a href="{{ assets }}/images/{{ url }}">
|
||||
{% elif doc_url %}
|
||||
<a href="{{ doc_url }}">
|
||||
{% endif %}
|
||||
<img class='img-inline' src='{{ assets }}/images/{{ url }}' alt='{{ description }}' title='{{ description }}'
|
||||
<img class='img-inline' src='{{ doc_url }}' alt='{{ description }}' title='{{ description }}'
|
||||
{% if maxwidth or maxheight %}style='
|
||||
{% if maxwidth %} max-width:{{ maxwidth }};{% endif %}
|
||||
{% if maxheight %} max-height: {{ maxheight }};{% endif %}
|
||||
'{% endif %}
|
||||
>
|
||||
{% if id or url %}
|
||||
{% if id or doc_url %}
|
||||
</a>
|
||||
{% endif %}
|
||||
|
||||
{% if id %}
|
||||
<!-- The full screen image, hidden by default -->
|
||||
<a href="#_" class="overlay" id="{{ id }}">
|
||||
<img src="{{ assets }}/images/{{ url }}" alt="{{ description }}" />
|
||||
<img src="{{ doc_url }}" alt="{{ description }}" />
|
||||
</a>
|
||||
{% endif %}
|
||||
</figure>
|
||||
|
18
docs/new.md
18
docs/new.md
@ -16,6 +16,24 @@ Improved build management system:
|
||||
!!! TODO
|
||||
More information to come soon
|
||||
|
||||
#### Related Parts
|
||||
##### Definition
|
||||
|
||||
Related Part denotes a relationship between two parts, when users want to show their usage is "related" to another part or simply emphasize a link between two parts.
|
||||
|
||||
##### Implementation
|
||||
|
||||
- New PartRelated model/table to store relationships between parts (requires migration)
|
||||
- New Related tab shown in Part detail page
|
||||
- Ability to add relationships between parts through both main and admin interfaces
|
||||
- Can only manage relationship if user has "change" permission on Part ruleset
|
||||
|
||||
##### Example View
|
||||
|
||||
{% with id="related_parts_example", url="https://user-images.githubusercontent.com/4020546/96306587-8f2d0b80-0fc5-11eb-8fdb-20cb2dabfcc6.png", description="Related Parts Example View" %}
|
||||
{% include 'img.html' %}
|
||||
{% endwith %}
|
||||
|
||||
#### InvenTree Settings
|
||||
##### Dedicated sections
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user