summaryrefslogtreecommitdiff
path: root/coverage/htmlfiles/pyfile.html
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2019-10-12 19:37:58 -0400
committerNed Batchelder <ned@nedbatchelder.com>2019-10-13 12:30:25 -0400
commiteba18707241a052419d54cdc304aea346aa0605c (patch)
tree2e8a9c1391aa7d293bebacf5ea86169319eafda9 /coverage/htmlfiles/pyfile.html
parentbcbdf41c6bb9d4ee30842bd14d45c7d48c2c6d01 (diff)
downloadpython-coveragepy-git-eba18707241a052419d54cdc304aea346aa0605c.tar.gz
Better presentation of contexts. #855
Diffstat (limited to 'coverage/htmlfiles/pyfile.html')
-rw-r--r--coverage/htmlfiles/pyfile.html17
1 files changed, 12 insertions, 5 deletions
diff --git a/coverage/htmlfiles/pyfile.html b/coverage/htmlfiles/pyfile.html
index 2154c06c..85f79f18 100644
--- a/coverage/htmlfiles/pyfile.html
+++ b/coverage/htmlfiles/pyfile.html
@@ -79,11 +79,18 @@
<span class="annotate long">{{line.annotate_long}}</span>{#-#}
{% endif -%}
{% if line.contexts -%}
- <span class="context-button">{{ line.contexts|len }} ctx</span>{#-#}
- <span class="context-list">
- {% for context in line.contexts -%}
- <span class="context-line">{{context}}</span>{#-#}
- {% endfor -%}
+ <span class="ctx">
+ {% if line.context_list -%}
+ <input type="checkbox" id="ctxs{{line.number}}" />
+ {% endif -%}
+ <label for="ctxs{{line.number}}">{{ line.contexts_label }}</label>{#-#}
+ {% if line.context_list -%}
+ <span class="ctxs">
+ {% for context in line.context_list -%}
+ <span>{{context}}</span>{#-#}
+ {% endfor -%}
+ </span>{#-#}
+ {% endif -%}
</span>{#-#}
{% endif -%}
</p>