{section show=$forward_info}
    {section show=$forward_info.error}
        <div class="message-error">
        <h2><span class="time">[{currentdate()|l10n( shortdatetime )}]</span> {'The requested URL forwarding could not be created.'|i18( 'design/admin/content/urltranslator' )}<span class="time">{currentdate()|l10n(shortdatetime)}</span></h2>
         <ul>
             <li>
                {'The destination URL <%destination_url> does not exist in the system.'|i18n( 'design/admin/content/urltranslator',, hash( '%destination_url', $forward_info.destination ) )|wash}
            </li>
         </ul>
    </div>
{/section}
{/section}

<form name="urltranslator" action={concat( 'content/urltranslator/' )|ezurl} method="post" >

{* New URL translation *}
<div class="context-block">
{* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr">
<h2 class="context-title">{'New system URL forwarding'|i18n( 'design/admin/content/urltranslator' )}</h2>

{* DESIGN: Mainline *}<div class="header-subline"></div>

{* DESIGN: Header END *}</div></div></div></div></div></div>

{* DESIGN: Content START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-bl"><div class="box-br"><div class="box-content">

<table class="list" cellspacing="0">
<tr>
<th width="40%">{'New virtual URL'|i18n( 'design/admin/content/urltranslator' )}</th>
<th>{'System URL'|i18n( 'design/admin/content/urltranslator' )}</th>

<th class="tight">&nbsp;</th>
</tr>
<tr>
<td>
{'Example: /services'|i18n( 'design/admin/content/urltranslator' )}
</td>
<td>
{'Example: /content/view/full/42'|i18n( 'design/admin/content/urltranslator' )}
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td>
<input type="text" name="NewURLAliasSource" value="{cond(and($translation_info,$translation_info.error),$translation_info.source, '')|wash}" title="{'Use this field to enter an address relative to the root of the system that should be translated into another URL. This address does not have to exist in your current system.'|i18n( 'design/admin/content/urltranslator'  )}" />
</td>
<td>
<input type="text" name="NewURLAliasDestination" value="{cond(and($translation_info,$translation_info.error),$translation_info.destination, '')|wash}" title="{'Use this field to enter a valid system URL. A system URL is easily recognized since it consists of several parts separated by a "/".'|i18n( 'design/admin/content/urltranslator' )|wash}" />
</td>
<td>
<input class="button" type="submit" name="NewURLAliasButton" value="{'Add'|i18n( 'design/admin/content/urltranslator' )}" title="{'Click this button to add a new system URL forwarding. System URL forwarding is used to forward any URL to a system URL in eZ publish.'|i18n( 'design/admin/content/urltranslator' )}" />
</td>
</tr>
</table>
{* DESIGN: Content END *}</div></div></div></div></div></div>
</div>



{* New URL forwarding *}
<div class="context-block">
{* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr">
<h2 class="context-title">{'New virtual URL forwarding'|i18n( 'design/admin/content/urltranslator' )}</h2>

{* DESIGN: Mainline *}<div class="header-subline"></div>

{* DESIGN: Header END *}</div></div></div></div></div></div>

{* DESIGN: Content START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-bl"><div class="box-br"><div class="box-content">

<table class="list" cellspacing="0">
<tr>
<th width="40%">{'New virtual URL'|i18n( 'design/admin/content/urltranslator' )}</th>
<th>{'Existing virtual URL'|i18n( 'design/admin/content/urltranslator' )}</th>
<th class="tight">&nbsp;</th>
</tr>
<tr>
<td>
{'Example: /services'|i18n( 'design/admin/content/urltranslator' )}
</td>
<td>
{'Example: /about/service'|i18n( 'design/admin/content/urltranslator' )}
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<input type="text" name="NewForwardURLAliasSource" value="{cond(and($forward_info,$forward_info.error),$forward_info.source, '')|wash}" title="{'Use this field to enter an address relative to the root of the system that should be translated into another URL. This address does not have to exist in your current system.'|i18n( 'design/admin/content/urltranslator'  )}" />
</td>
<td>
<input type="text" name="NewForwardURLAliasDestination" value="{cond(and($forward_info,$forward_info.error),$forward_info.destination, '')|wash}" title="{'Use this field to enter a valid existing virtual URL in the system. A virtual URL is generated by the system and usually contains part of the content of an object.'|i18n( 'design/admin/content/urltranslator' )}" />
</td>
<td>
<input class="button" type="submit" name="NewForwardURLAliasButton" value="{'Add'|i18n( 'design/admin/content/urltranslator' )}" title="{'Click this button to add a new virtual URL forwarding. Virtual URL forwarding is used to forward any URL to an existing virtual URL in eZ publish.'|i18n( 'design/admin/content/urltranslator' )}" />
</td>
</tr>
</table>
{* DESIGN: Content END *}</div></div></div></div></div></div>
</div>


{* New URL wildcard *}
<div class="context-block">
{* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr">
<h2 class="context-title">{'New virtual URL forwarding with wildcard'|i18n( 'design/admin/content/urltranslator' )}</h2>

{* DESIGN: Mainline *}<div class="header-subline"></div>

{* DESIGN: Header END *}</div></div></div></div></div></div>

{* DESIGN: Content START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-bl"><div class="box-br"><div class="box-content">

<table class="list" cellspacing="0">
<tr>
<th width="40%">{'New virtual URL wildcard'|i18n( 'design/admin/content/urltranslator' )}</th>
<th>{'Existing virtual URL'|i18n( 'design/admin/content/urltranslator' )}</th>
<th class="tight">{'Redirecting URL'|i18n( 'design/admin/content/urltranslator' )}</th>
<th class="tight">&nbsp;</th>
</tr>
<tr>
<td>
{'Example: /developer/*'|i18n( 'design/admin/content/urltranslator' )}
</td>
<td>
{'Example'|i18n( 'design/admin/content/urltranslator' )}:&nbsp;{literal}/dev/{1}{/literal}
</td>
<td>
&nbsp;
</td>
<td>
&nbsp;
</td>
</tr>
<tr>
<td>
<input type="text" name="NewWildcardURLAliasSource" value="{cond(and($wildcard_info,$wildcard_info.error),$wildcard_info.destination, '')|wash}" title="{'Use this field to enter an address relative to the root of the system that should be translated into another URL. This address does not have to exist in your current system. You can place a star anywhere in the URL which will match an arbitrary number of characters.'|i18n( 'design/admin/content/urltranslator'  )}" />
</td>
<td>
<input type="text" name="NewWildcardURLAliasDestination" value="{cond(and($wildcard_info,$wildcard_info.error),$wildcard_info.source, '')|wash}" title="{'Use this field to enter a valid existing virtual URL in the system. A virtual URL is generated by the system and usually contains part of the content of an object. Any characters matched by a star in the source URL can be transfered to the destination URL by inserting {1\} where appropriate.'|i18n( 'design/admin/content/urltranslator' )|wash}" />
</td>
<td>
<input type="checkbox" name="NewWildcardURLAliasIsForwarding" value="1" checked="checked" title="{'Use this checkbox to select if eZ publish should perform an internal redirect or a browser redirect. An internal redirect simply redirects the old URL to the new one without notifying the browser. A browser redirect makes the browser abort the current request and reload with the new URL. A browser redirect can be useful if you want the browser URL field to be updated.'|i18n( 'design/admin/content/urltranslator' )}" />
</td>
<td>
<input class="button" type="submit" name="NewWildcardURLAliasButton" value="{'Add'|i18n( 'design/admin/content/urltranslator' )}" title="{'Click this button to add a new virtual URL forwarding with wildcard match. Virtual URL forwarding is used to forward any URL to an existing virtual URL in eZ publish. The wildcard match is useful if you have moved a complete tree from one place to another.'|i18n( 'design/admin/content/urltranslator' )}" />
</td>
</tr>
</table>
{* DESIGN: Content END *}</div></div></div></div></div></div>
</div>




{* Custom URL translations  *}
<div class="context-block">
{* DESIGN: Header START *}<div class="box-header"><div class="box-tc"><div class="box-ml"><div class="box-mr"><div class="box-tl"><div class="box-tr">
<h2 class="context-title">{'Custom URL translations [%alias_count]'|i18n( 'design/admin/content/urltranslator' ,, hash( '%alias_count', $alias_list|count ) )}</h2>

{* DESIGN: Mainline *}<div class="header-subline"></div>

{* DESIGN: Header END *}</div></div></div></div></div></div>

{* DESIGN: Content START *}<div class="box-ml"><div class="box-mr"><div class="box-content">

{section show=$alias_list}
<table class="list" cellspacing="0">
<tr>
    <th class="tight"><img src={'toggle-button-16x16.gif'|ezimage} alt="{'Invert selection.'|i18n( 'design/admin/content/urltranslator' )}" onclick="ezjs_toggleCheckboxes( document.urltranslator, 'URLAliasSelection[]' ); return false;" title="{'Invert selection.'|i18n( 'design/admin/content/urltranslator' )}" /></th>
    <th>{'Source URL'|i18n( 'design/admin/content/urltranslator' )}</th>
    <th>{'Destination URL'|i18n( 'design/admin/content/urltranslator' )}</th>
    <th>{'Type'|i18n( 'design/admin/content/urltranslator' )}</th>
</tr>
{section name=Alias loop=$alias_list show=$alias_list sequence=array( bglight, bgdark )}
<tr class="{$Alias:sequence}">
    <td><input type="checkbox" name="URLAliasSelection[]" value="{$Alias:item.id}" title="{'Select URL translation for removal.'|i18n( 'design/admin/content/urltranslator' )}"/></td>
    <td>
        <input type="text" name="URLAliasSourceValue[{$Alias:item.id}]" value="{$Alias:item.source_url|wash}" />
    </td>
    <td>
    {section show=$Alias:item.forward_to_id|eq(0)}
        <input type="text" name="URLAliasDestinationValue[{$Alias:item.id}]" value="{$Alias:item.destination_url|wash}" />
    {section-else}
        {section show=$Alias:item.forward_to_id|eq( -1 )}
            {'Forwards to'|i18n( 'design/admin/content/urltranslator' )}&nbsp;<a href={$Alias:item.destination_url|ezurl}>{$Alias:item.destination_url|wash}</a><br/>
        {section-else}
            {'Forwards to'|i18n( 'design/admin/content/urltranslator' )}&nbsp;<a href={$Alias:item.forward_url.destination_url|ezurl}>{$Alias:item.forward_url.source_url|wash}</a><br/>
        {/section}
    {/section}
    </td>
    <td>
    {section show=$Alias:item.is_wildcard|gt(0)}
        {'Wildcard forwarding'|i18n( 'design/admin/content/urltranslator' )}
    {section-else}
        {section show=$Alias:item.forward_to_id|eq(0)}
            {'System forwarding'|i18n( 'design/admin/content/urltranslator' )}
        {section-else}
            {'Virtual forwarding'|i18n( 'design/admin/content/urltranslator' )}
        {/section}
    {/section}
    </td>
</tr>
{/section}
</table>

<div class="context-toolbar">
{include name=navigator
         uri='design:navigator/google.tpl'
         page_uri='/content/urltranslator'
         item_count=$alias_count
         view_parameters=$view_parameters
         item_limit=$alias_limit}
</div>
{section-else}
<div class="block">
<p>{'There are no custom URL translations.'|i18n( 'design/admin/content/urltranslator' )}</p>
</div>
{/section}

{* DESIGN: Content END *}</div></div></div>

<div class="controlbar">
{* DESIGN: Control bar START *}<div class="box-bc"><div class="box-ml"><div class="box-mr"><div class="box-tc"><div class="box-bl"><div class="box-br">
<div class="block">
{section show=$alias_list}
<input class="button" type="submit" name="RemoveURLAliasButton" value="{'Remove selected'|i18n( 'design/admin/content/urltranslator' )}" title="{'Remove selected URL translations.'|i18n( 'design/admin/content/urltranslator' )}" />
<input class="button" type="submit" name="StoreURLAliasButton"  value="{'Apply changes'|i18n( 'design/admin/content/urltranslator' )}" title="{'Click this button to store changes if you have modified any of the fields in the list above.'|i18n( 'design/admin/content/urltranslator' )}" />
{section-else}
<input class="button-disabled" type="submit" name="RemoveURLAliasButton" value="{'Remove selected'|i18n( 'design/admin/content/urltranslator' )}" disabled="disabled" />
<input class="button-disabled" type="submit" name="StoreURLAliasButton"  value="{'Apply changes'|i18n( 'design/admin/content/urltranslator' )}" disabled="disabled" />
{/section}


</div>
{* DESIGN: Control bar END *}</div></div></div></div></div></div>
</div>

</div>

</form>
