diff --git a/kjvstudy_org/templates/family_tree_person.html b/kjvstudy_org/templates/family_tree_person.html index 84f52f3..5d23973 100644 --- a/kjvstudy_org/templates/family_tree_person.html +++ b/kjvstudy_org/templates/family_tree_person.html @@ -130,6 +130,49 @@ {% endif %} +{# Family Diagram - Minimal Text Version #} +{% if person.parents|length > 0 or person.children|length > 0 or person.spouse %} +
+ {% if person.parents|length > 0 %} +
+ {% for parent_id in person.parents %} + {{ family_tree_data[parent_id].name }}{% if not loop.last %} & {% endif %} + {% endfor %} + +
+ {% endif %} + +
+ {{ person.name }}{% if person.spouse %} + {% set spouse_id = None %} + {% for pid, p in family_tree_data.items() %} + {% if p.name == person.spouse %} + {% set spouse_id = pid %} + {% endif %} + {% endfor %} + & {% if spouse_id %}{{ person.spouse }}{% else %}{{ person.spouse }}{% endif %}{% endif %} +
+ + {% if person.children|length > 0 %} +
+ + {% for child_id in person.children[:8] %} + {{ family_tree_data[child_id].name }}{% if not loop.last %}, {% endif %} + {% endfor %}{% if person.children|length > 8 %}, and {{ person.children|length - 8 }} more{% endif %} +
+ {% endif %} + + {% if person.siblings|length > 0 %} +
+ Siblings: + {% for sibling_id in person.siblings[:8] %} + {{ family_tree_data[sibling_id].name }}{% if not loop.last %}, {% endif %} + {% endfor %}{% if person.siblings|length > 8 %}, and {{ person.siblings|length - 8 }} more{% endif %} +
+ {% endif %} +
+{% endif %} + {% if person.parents|length > 0 %}

Parents