Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions indra/assemblers/html/templates/indra/inheritence.md
Original file line number Diff line number Diff line change
@@ -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]
```
12 changes: 11 additions & 1 deletion indra/assemblers/html/templates/indra/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@
margin-bottom: 0;
}

{% block mid_right_styles %}
{% endblock %}

.right {
width: 20em; /* Sidebar width */
right: 0;
Expand Down Expand Up @@ -160,6 +163,7 @@
padding-bottom: 65px
}

{% block layout_media_queries %}
@media (max-width: 1800px) {
.right {
width: 15%;
Expand Down Expand Up @@ -191,6 +195,8 @@
.footer {
right: 0em;
}
}
{% endblock %}
{% endif %}
</style>

Expand Down Expand Up @@ -230,7 +236,7 @@
{% endif %}

<!-- THE MAIN BODY -->
<main role="main" class="container">
<main role="main" class="{{ main_tag_class|default('container') }}">

{% if simple %}
<!-- THE SIMPLE HEADING -->
Expand Down Expand Up @@ -259,6 +265,8 @@ <h2>{{ title }}</h2>
</div>
</footer>

{% block mid_right_panel %}
{% endblock %}

<!-- THE RIGHT SIDEBAR -->
<div class="side-info right bg-white" id="right-side-panel">
Expand Down Expand Up @@ -301,6 +309,8 @@ <h4>{{ category|capitalize }}</h4>
{% endfor %}
</div>
{% endfor %}
{% block right_sidebar_extra %}
{% endblock %}
</div>
{% endif %}
</body>
Expand Down
8 changes: 4 additions & 4 deletions indra/assemblers/indranet/assembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down