mirror of
https://github.com/google/nomulus
synced 2026-02-07 05:21:15 +00:00
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:
@@ -42,40 +42,40 @@
|
||||
<domain:add>
|
||||
{if length($addNameservers) > 0}
|
||||
<domain:ns>
|
||||
{for $s in $addNameservers}
|
||||
{foreach $s in $addNameservers}
|
||||
<domain:hostObj>{$s}</domain:hostObj>
|
||||
{/for}
|
||||
{/foreach}
|
||||
</domain:ns>
|
||||
{/if}
|
||||
{for $admin in $addAdmins}
|
||||
{foreach $admin in $addAdmins}
|
||||
<domain:contact type="admin">{$admin}</domain:contact>
|
||||
{/for}
|
||||
{for $tech in $addTechs}
|
||||
{/foreach}
|
||||
{foreach $tech in $addTechs}
|
||||
<domain:contact type="tech">{$tech}</domain:contact>
|
||||
{/for}
|
||||
{for $status in $addStatuses}
|
||||
{/foreach}
|
||||
{foreach $status in $addStatuses}
|
||||
<domain:status s="{$status}"/>
|
||||
{/for}
|
||||
{/foreach}
|
||||
</domain:add>
|
||||
{/if}
|
||||
{if $remove}
|
||||
<domain:rem>
|
||||
{if length($removeNameservers) > 0}
|
||||
<domain:ns>
|
||||
{for $s in $removeNameservers}
|
||||
{foreach $s in $removeNameservers}
|
||||
<domain:hostObj>{$s}</domain:hostObj>
|
||||
{/for}
|
||||
{/foreach}
|
||||
</domain:ns>
|
||||
{/if}
|
||||
{for $admin in $removeAdmins}
|
||||
{foreach $admin in $removeAdmins}
|
||||
<domain:contact type="admin">{$admin}</domain:contact>
|
||||
{/for}
|
||||
{for $tech in $removeTechs}
|
||||
{/foreach}
|
||||
{foreach $tech in $removeTechs}
|
||||
<domain:contact type="tech">{$tech}</domain:contact>
|
||||
{/for}
|
||||
{for $status in $removeStatuses}
|
||||
{/foreach}
|
||||
{foreach $status in $removeStatuses}
|
||||
<domain:status s="{$status}"/>
|
||||
{/for}
|
||||
{/foreach}
|
||||
</domain:rem>
|
||||
{/if}
|
||||
{if $change}
|
||||
|
||||
Reference in New Issue
Block a user