Roll back changelist 180942763

*** Reason for rollback ***

Breaks the FOSS build.

We'll reincorporate this change once Closure Rules is properly updated to accommodate it.

*** Original change description ***

Change all foreach loops in Soy templates to use the for loop syntax

Soy supports 2 kinds of loops:
foreach- for iterating over items in a collection  e.g. {foreach $item in $list}...{/foreach}
for - for indexed iteration  e.g. {for $i in range(0, 10)}...{/for}

The reason Soy has 2 different loops is an accident of history, Soy didn’t use to have a proper grammar for expressions and so the alternate ‘for...range’ syntax was added to make it possible to write indexed loops.  As the gramma...

***

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=180961695
This commit is contained in:
mcilwain
2018-01-19 14:17:58 -05:00
committed by Ben McIlwain
parent d52a701f50
commit ffcfa283f6
24 changed files with 103 additions and 109 deletions
@@ -113,7 +113,7 @@
</th>
</tr>
{if isNonnull($item['domain:ns'] and isNonnull($item['domain:ns']['domain:hostObj']))}
{for $hostObj in $item['domain:ns']['domain:hostObj']}
{foreach $hostObj in $item['domain:ns']['domain:hostObj']}
{let $hostIdx: index($hostObj) /}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: 'Host ' + $hostIdx /}
@@ -121,7 +121,7 @@
{param value: $hostObj /}
{param clazz kind="text"}{css('domain-hostObj')}{/param}
{/call}
{/for}
{/foreach}
{/if}
<tr id="domain-hosts-footer"></tr>
@@ -165,7 +165,7 @@
{template .showContact_ visibility="private"}
{@param contacts: list<map<string, ?>>} /** List of EPP domain:contacts. */
{@param type: string} /** Type of contact (e.g. admin, tech) */
{for $contact in $contacts}
{foreach $contact in $contacts}
{if $type == $contact['@type']}
{call registry.soy.forms.inputFieldRowWithValue data="all"}
{param label: $contact['@type'] + ' contact' /}
@@ -177,7 +177,7 @@
type="hidden"
value="{$contact['@type']}">
{/if}
{/for}
{/foreach}
{/template}