Skip to content

Commit 1d86f16

Browse files
authored
Merge pull request #1479 from haohangyan/search_page
Search page template update and depmap analysis fix
2 parents 4c8c055 + 8e59159 commit 1d86f16

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
The file template.html in this directory is template base for several files. See
2+
the diagram below for the inheritance structure. If you make changes to
3+
template.html, be sure to check all the files that inherit from it to make sure
4+
they still work as expected.
5+
6+
These files are currently in active use, however there are more files that
7+
inherit from template.html that are not currently in use.
8+
- search.html is the template used for https://db.indra.bio
9+
- search_statements.html is the template used for https://db.indra.bio/statements
10+
- statements_view.html is the template used in the HtmlAssembler class in indra.
11+
- idbr_statements_view.html is the template used for https://db.indra.bio/statements/from...
12+
13+
```mermaid
14+
graph LR
15+
A[indra: template.html] --> B[indra_db: idbr_template.html]
16+
A --> C[indra: statements_view.html - serves HtmlAssembler]
17+
C --> D[indra_db: idbr_statements_view.html - serves db.indra.bio/statements/from...]
18+
B --> E[indra_db: search.html - serves db.indra.bio]
19+
B --> F[indra_db: search_statements.html - serves db.indra.bio/statements search]
20+
```

indra/assemblers/html/templates/indra/template.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@
103103
margin-bottom: 0;
104104
}
105105

106+
{% block mid_right_styles %}
107+
{% endblock %}
108+
106109
.right {
107110
width: 20em; /* Sidebar width */
108111
right: 0;
@@ -160,6 +163,7 @@
160163
padding-bottom: 65px
161164
}
162165

166+
{% block layout_media_queries %}
163167
@media (max-width: 1800px) {
164168
.right {
165169
width: 15%;
@@ -191,6 +195,8 @@
191195
.footer {
192196
right: 0em;
193197
}
198+
}
199+
{% endblock %}
194200
{% endif %}
195201
</style>
196202

@@ -230,7 +236,7 @@
230236
{% endif %}
231237

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

235241
{% if simple %}
236242
<!-- THE SIMPLE HEADING -->
@@ -259,6 +265,8 @@ <h2>{{ title }}</h2>
259265
</div>
260266
</footer>
261267

268+
{% block mid_right_panel %}
269+
{% endblock %}
262270

263271
<!-- THE RIGHT SIDEBAR -->
264272
<div class="side-info right bg-white" id="right-side-panel">
@@ -301,6 +309,8 @@ <h4>{{ category|capitalize }}</h4>
301309
{% endfor %}
302310
</div>
303311
{% endfor %}
312+
{% block right_sidebar_extra %}
313+
{% endblock %}
304314
</div>
305315
{% endif %}
306316
</body>

indra/assemblers/indranet/assembler.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -592,10 +592,10 @@ def statement_to_rows(stmt, exclude_stmts=None, complex_members=3,
592592
pos = None
593593
# Create a simple flat list of just the values instead
594594
# of a dict with keys
595-
statemet_hash = stmt.get_hash(refresh=True)
595+
statement_hash = stmt.get_hash(refresh=True)
596596
if source_counts:
597-
evidence_count = sum(source_counts.get(statemet_hash, {}).values())
598-
source_count = source_counts.get(statemet_hash, {})
597+
evidence_count = sum(source_counts.get(statement_hash, {}).values())
598+
source_count = source_counts.get(statement_hash, {})
599599
else:
600600
evidence_count = len(stmt.evidence)
601601
source_count = _get_source_counts(stmt)
@@ -610,7 +610,7 @@ def statement_to_rows(stmt, exclude_stmts=None, complex_members=3,
610610
pos,
611611
stmt_type,
612612
evidence_count,
613-
statemet_hash,
613+
statement_hash,
614614
stmt.belief,
615615
source_count,
616616
sign

0 commit comments

Comments
 (0)