Skip to content

Commit

Permalink
Fixed protocol rendering #3064
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisala committed Dec 20, 2023
1 parent ffa0f8b commit f3adf90
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 8 additions & 1 deletion grails-app/views/project/meriPlanReadOnly/_arrayAsList.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
<!-- /ko -->

<!-- ko if: ${source} && ${source}.length > 1 -->
<ul class="meriList" data-bind="foreach:${source}">
<ul class="meriList" >
<!-- ko foreach:${source} -->
<!-- ko if:$data != 'Other' -->
<li data-bind="text:$data"></li>
<!-- /ko -->
<!-- /ko -->
<!-- ko if:_.contains(${source}, 'Other') -->
<li data-bind="text:'Other: ' + ${otherSource?:"''"}"></li>
<!-- /ko -->
</ul>
<!-- /ko -->
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@
<g:render template="/project/meriPlanReadOnly/arrayAsList" model="${[source:'$root.targetMeasureLabels(relatedTargetMeasures)']}"/>
</td>
<td class="baseline-method">
<g:render template="/project/meriPlanReadOnly/arrayAsList" model="${[source:'protocols']}"/>
<br/>
<span data-bind="visible:_.contains(protocols(), 'Other'), text: method"></span>
<g:render template="/project/meriPlanReadOnly/arrayAsList" model="${[source:'protocols()', otherSource:'method()']}"/>
</td>
<td class="evidence">
<span class="textarea-view" data-bind="text:evidence"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@
</g:if>
<td class="monitoring-method">
<g:if test="${extendedMonitoring}">
<g:render template="/project/meriPlanReadOnly/arrayAsList" model="${[source:'protocols']}"/>
<br/>
<span data-bind="visible:_.contains(protocols(), 'Other'), text: data2"></span>
<g:render template="/project/meriPlanReadOnly/arrayAsList" model="${[source:'protocols()', otherSource:'data2()']}"/>

</g:if>
<g:else>
Expand Down

0 comments on commit f3adf90

Please sign in to comment.