Skip to content

Commit

Permalink
Fix analysis template view shows hidden subfields for sample partitio…
Browse files Browse the repository at this point in the history
…ns (#2439)

* Fix analysis template view shows hidden subfields

* Changelog updated
  • Loading branch information
ramonski authored Dec 5, 2023
1 parent 61dfe43 commit b3b2d31
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
2.5.0 (unreleased)
------------------

- #2439 Fix analysis template view shows hidden subfields for sample partitions
- #2437 Fix DX types imported from tarball do not have valid ids
- #2431 Fix AttributeError when creating AnalysisSpec with results range via JSONAPI
- #2436 Fix instrument locations not displayed in listing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,21 @@
id string:parent-fieldname-$fieldName">
<tal:block metal:define-slot="inside"
tal:repeat="idx python:range(field.getSize(here))"
tal:define="outerJoin field/outerJoin;
innerJoin field/innerJoin;">
<span
tal:define="subfieldValues python:[field.getViewFor(here,idx,key,innerJoin) for key in field.getSubfields()];"
tal:replace="structure python:innerJoin.join(subfieldValues)" />
<span
tal:replace="structure outerJoin"
tal:condition="not: repeat/idx/end" />
tal:define="subfields python:field.getSubfields();
hidden python:getattr(field, 'subfield_hidden', {});
outerJoin field/outerJoin;
innerJoin field/innerJoin;">
<ul class="list-inline m-0">
<tal:loop tal:repeat="subfield subfields">
<li tal:define="value python:field.getViewFor(context, idx, subfield, innerJoin)"
tal:condition="python:hidden.get(subfield, False) is False"
class="list-inline-item mr-0 mb-2">
<span class="p-1 bg-light border rounded">
<span tal:content="structure value"/>
</span>
</li>
</tal:loop>
</ul>
</tal:block>
</span>
</metal:view_macro>
Expand Down

0 comments on commit b3b2d31

Please sign in to comment.