diff options
Diffstat (limited to 'src/ee/order/templates/order.rst.j2')
-rw-r--r-- | src/ee/order/templates/order.rst.j2 | 28 |
1 files changed, 20 insertions, 8 deletions
diff --git a/src/ee/order/templates/order.rst.j2 b/src/ee/order/templates/order.rst.j2 index bc382a2..8dad217 100644 --- a/src/ee/order/templates/order.rst.j2 +++ b/src/ee/order/templates/order.rst.j2 @@ -1,3 +1,4 @@ +{% set order_part_uri_idx = order_parts.index("partUri") -%} Order ===== @@ -6,6 +7,8 @@ Has unresolved parts: {{ "yes" if has_unresolved_parts else "no" }}. Parts for Order =============== {% for op in order_parts %} +.. _ref-{{ op.ref }}: + {{ op.ref | subsection }} {% if op.available_from|length == 0 %} Part not resolved. @@ -23,30 +26,39 @@ MANY Part details ============ -{% for supplier, parts in parts_by_supplier.items() %} +{%- set part_by_uri=supplier_parts.index("uri") %} +{% for supplier, partUris in order_parts.index("supplier,part").items() %} {{ ("From " + supplier) | subsection }} -{% for part in parts %} +{% for partUri in partUris %} +{%- set part=part_by_uri.get_single(partUri) %} {%- set pn=part|first_pn %} {%- set spn=part|first_spn %} {%- set title=pn.valueProp if pn else (spn.valueProp if spn else "???") %} -{%- set links=part.linksProp.link %} .. _part-{{title}}: {{ title|subsubsection }} -{#- +=========== === +{%- if part.description %} +Description {{ part.description }} +{%- endif %} +MPN {{ pn.value }} +SPN {{ spn.value }} +Used by: {% for op in order_part_uri_idx.get(part.uriProp) %}`{{ op.ref }} <ref-{{ op.ref }}_>`_{{ ", " if not loop.last }}{% endfor %} +=========== === +{# Facts ..... {% for f in part.facts.fact %} f={{f}} {% endfor %} -#} -Media -..... +#} +Documentation +............. -{% for l in links %} +{% for l in part.get_links() %} {%- if l.relationProp == "http://purl.org/ee/link-relation#documentation" %} * `{{ l.title }} <{{ l.url }}>`__ {%- endif %} |