diff --git a/sourcing/templates/view.html b/sourcing/templates/view.html index 88aa193..33f2474 100644 --- a/sourcing/templates/view.html +++ b/sourcing/templates/view.html @@ -89,7 +89,7 @@ {%- for start, line in iter_lines(text) if line != '\r\n' -%} {#

{% if line != "\n" and line != "\r\n" %}{{ line }}{% else %} {% endif %}

#} -

{{ nbsp_at_start(line) }}

+

{{ nbsp_at_start(line) }}

{%- endfor -%} {% endif %} @@ -103,9 +103,40 @@
-

references

- +

References

+ {% set subject_count = doc.subjects.count() %} + {% if subject_count %} +

There are {{ subject_count }} documents that refer to this {{ doc.type }}.

+ +{% else %} +

There are no documents that refer to this {{ doc.type }}.

+{% endif %} + + {% if doc.type == 'xanalink' %} +

Documents referred to

+ {% set object_count = doc.objects.count() %} + {% if object_count %} +

There are {{ object_count }} document(s) referred to by this {{ doc.type }}.

+ + {% else %} +

This link doesn't refer to any documents.

+ {% endif %} + {% endif %} + + +