forked from mne-tools/mne-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
make HTML repr for Forward match others (mne-tools#12883)
- Loading branch information
Showing
4 changed files
with
37 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,29 @@ | ||
{%include '_js_and_css.html.jinja' %} | ||
|
||
{% set section = "Forward" %} | ||
{% set section_class_name = section | lower | append_uuid %} | ||
|
||
{# Collapse content during documentation build. #} | ||
{% if collapsed %} | ||
{% set collapsed_row_class = "mne-repr-collapsed" %} | ||
{% else %} | ||
{% set collapsed_row_class = "" %} | ||
{% endif %} | ||
|
||
<table class="table mne-repr-table"> | ||
{%include 'static/_section_header_row.html.jinja' %} | ||
{% for channel_type, channels in (info | format_channels).items() %} | ||
{% set channel_names_good = channels["good"] | map(attribute='name_html') | join(', ') %} | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<th>{{ channel_type }}</th> | ||
<td> | ||
<button class="mne-ch-names-btn sd-sphinx-override sd-button sd-btn-info sd-text-wrap sd-shadow-sm" | ||
onclick="alert('Good {{ channel_type}}:\n\n{{ channel_names_good | safe }}')" | ||
title="Show good channel names"> | ||
{{ channels["good"] | length}} | ||
</button> | ||
|
||
{% if channels["bad"] %} | ||
{% set channel_names_bad = channels["bad"] | map(attribute='name_html') | join(', ') %} | ||
and <button class="mne-ch-names-btn sd-sphinx-override sd-button sd-btn-info sd-text-wrap sd-shadow-sm" | ||
onclick="alert('Bad {{ channel_type}}:\n\n{{ channel_names_bad | safe }}')" | ||
title="Show bad channel names"> | ||
{{ channels["bad"] | length}} bad | ||
</button> | ||
{% endif %} | ||
</td> | ||
</tr> | ||
{% include 'static/_channels.html.jinja' %} | ||
{% endfor %} | ||
|
||
<tr> | ||
<th>Source space</th> | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Source space</td> | ||
<td>{{ source_space_descr }}</td> | ||
</tr> | ||
<tr> | ||
<th>Source orientation</th> | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>Source orientation</td> | ||
<td>{{ source_orientation }}</td> | ||
</tr> | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{% set channel_names_good = channels["good"] | map(attribute='name_html') | join(', ') %} | ||
<tr class="repr-element {{ section_class_name }} {{ collapsed_row_class }}"> | ||
<td class="mne-repr-section-toggle"></td> | ||
<td>{{ channel_type }}</td> | ||
<td> | ||
<button class="mne-ch-names-btn sd-sphinx-override sd-btn sd-btn-info sd-text-wrap sd-shadow-sm" onclick="alert('Good {{ channel_type}}:\n\n{{ channel_names_good | safe }}')" title="(Click to open in popup) {{ channel_names_good | safe }}"> | ||
{{ channels["good"] | length}} | ||
</button> | ||
|
||
{% if channels["bad"] %} | ||
{% set channel_names_bad = channels["bad"] | map(attribute='name_html') | join(', ') %} | ||
and <button class="mne-ch-names-btn sd-sphinx-override sd-btn sd-btn-info sd-text-wrap sd-shadow-sm" onclick="alert('Bad {{ channel_type}}:\n\n{{ channel_names_bad | safe }}')" title="(Click to open in popup) {{ channel_names_bad | safe }}"> | ||
{{ channels["bad"] | length}} bad | ||
</button> | ||
{% endif %} | ||
</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters