diff --git a/indra/assemblers/html/templates/indra/inheritence.md b/indra/assemblers/html/templates/indra/inheritence.md new file mode 100644 index 0000000000..f7008f5871 --- /dev/null +++ b/indra/assemblers/html/templates/indra/inheritence.md @@ -0,0 +1,20 @@ +The file template.html in this directory is template base for several files. See +the diagram below for the inheritance structure. If you make changes to +template.html, be sure to check all the files that inherit from it to make sure +they still work as expected. + +These files are currently in active use, however there are more files that +inherit from template.html that are not currently in use. +- search.html is the template used for https://db.indra.bio +- search_statements.html is the template used for https://db.indra.bio/statements +- statements_view.html is the template used in the HtmlAssembler class in indra. +- idbr_statements_view.html is the template used for https://db.indra.bio/statements/from... + +```mermaid +graph LR + A[indra: template.html] --> B[indra_db: idbr_template.html] + A --> C[indra: statements_view.html - serves HtmlAssembler] + C --> D[indra_db: idbr_statements_view.html - serves db.indra.bio/statements/from...] + B --> E[indra_db: search.html - serves db.indra.bio] + B --> F[indra_db: search_statements.html - serves db.indra.bio/statements search] +``` diff --git a/indra/assemblers/html/templates/indra/template.html b/indra/assemblers/html/templates/indra/template.html index ad62ca5cce..145c5222de 100644 --- a/indra/assemblers/html/templates/indra/template.html +++ b/indra/assemblers/html/templates/indra/template.html @@ -103,6 +103,9 @@ margin-bottom: 0; } + {% block mid_right_styles %} + {% endblock %} + .right { width: 20em; /* Sidebar width */ right: 0; @@ -160,6 +163,7 @@ padding-bottom: 65px } + {% block layout_media_queries %} @media (max-width: 1800px) { .right { width: 15%; @@ -191,6 +195,8 @@ .footer { right: 0em; } + } + {% endblock %} {% endif %} @@ -230,7 +236,7 @@ {% endif %} -
+
{% if simple %} @@ -259,6 +265,8 @@

{{ title }}

+{% block mid_right_panel %} +{% endblock %}
@@ -301,6 +309,8 @@

{{ category|capitalize }}

{% endfor %}
{% endfor %} + {% block right_sidebar_extra %} + {% endblock %} {% endif %} diff --git a/indra/assemblers/indranet/assembler.py b/indra/assemblers/indranet/assembler.py index 66f13d1b1e..3502260568 100644 --- a/indra/assemblers/indranet/assembler.py +++ b/indra/assemblers/indranet/assembler.py @@ -592,10 +592,10 @@ def statement_to_rows(stmt, exclude_stmts=None, complex_members=3, pos = None # Create a simple flat list of just the values instead # of a dict with keys - statemet_hash = stmt.get_hash(refresh=True) + statement_hash = stmt.get_hash(refresh=True) if source_counts: - evidence_count = sum(source_counts.get(statemet_hash, {}).values()) - source_count = source_counts.get(statemet_hash, {}) + evidence_count = sum(source_counts.get(statement_hash, {}).values()) + source_count = source_counts.get(statement_hash, {}) else: evidence_count = len(stmt.evidence) source_count = _get_source_counts(stmt) @@ -610,7 +610,7 @@ def statement_to_rows(stmt, exclude_stmts=None, complex_members=3, pos, stmt_type, evidence_count, - statemet_hash, + statement_hash, stmt.belief, source_count, sign