All checks were successful
Deploy on webserver / Build site and deploy on success (push) Successful in 2m14s
This is a saner approach than self-referencing on term pages.
43 lines
1.9 KiB
Django/Jinja
43 lines
1.9 KiB
Django/Jinja
{% extends "page.md.j2" %}
|
|
{% block frontmatter -%}
|
|
title: "{{ title }}"
|
|
{{ taxonomy_terms('projects', 'xyzri:XYZProject', parts, typeattr='schema_type', pidattr='pid') -}}
|
|
{{ taxonomy_terms('objectives', 'xyzri:XYZObjective', influenced_by) -}}
|
|
{{ taxonomy_terms('persons', 'xyzri:XYZPerson', associated_with) -}}
|
|
{{ taxonomy_terms('instruments', 'xyzri:XYZInstrument', generated, typeattr='schema_type', pidattr='pid') -}}
|
|
{% endblock -%}
|
|
|
|
{% block content -%}
|
|
{{ description }}
|
|
|
|
{% if part_of %}## Part of
|
|
{% for item in part_of -%}
|
|
- [{{ item.title }}](/{{ item.pid.replace('xyzrins:', '') }})
|
|
{% endfor %}
|
|
{% endif -%}
|
|
|
|
## Objectives
|
|
|
|
{% for inf in influenced_by if inf.object.schema_type == "xyzri:XYZObjective" and not inf.ended -%}
|
|
- [{{ inf.object.title }}](/{{ inf.object.pid|replace('xyzrins:', '') }}) ({%for role in inf.roles %}{{ ', ' if not loop.first }}{{ role.display_label|default(role.name) }}{% endfor -%})
|
|
{% endfor -%}
|
|
|
|
## People
|
|
|
|
### Currently associated
|
|
|
|
{% for ass in associated_with if ass.object.schema_type == "xyzri:XYZPerson" and not ass.ended -%}
|
|
- [{{ ass.object.given_name }} {{ ass.object.family_name }}](/{{ ass.object.pid|replace('xyzrins:', '') }}) ({% for role in ass.roles %}{{ ', ' if not loop.first }}{{ role.display_label|default(role.name) }}{% endfor -%}){{ (" \n " ~ ass.description).rstrip() }}
|
|
{% endfor -%}
|
|
|
|
{% with prev_associated = associated_with | selectattr("object.schema_type", "eq", "xyzri:XYZPerson") | selectattr("ended", "defined") -%}
|
|
{% for ass in prev_associated | sort(attribute="ended.at_time", reverse=True) -%}
|
|
{% if loop.first %}
|
|
### Previously associated
|
|
|
|
{% endif -%}
|
|
- [{{ ass.object.given_name }} {{ ass.object.family_name }}](/{{ ass.object.pid|replace('xyzrins:', '') }}) ({% for role in ass.roles %}{{ ', ' if not loop.first }}{{ role.display_label|default(role.name) }}{% endfor -%} {{ assoc_period(ass, "; ") }}){{ (" \n " ~ ass.description).rstrip() }}
|
|
{% endfor -%}
|
|
{% endwith -%}
|
|
|
|
{% endblock %}
|