{* * $Revision: 17380 $ * Read this before changing templates! http://codex.gallery2.org/Gallery2:Editing_Templates *}

{g->text text="URL Rewrite Administration"}

{if !empty($status)}

{if isset($status.saved)} {g->text text="Successfully saved settings"} {/if}

{/if} {if !empty($form.error)}

{g->text text="An error occured while trying to save your settings"}

{if isset($AdminRewrite.errors)} {foreach from=$AdminRewrite.errors item=errstr} {$errstr}
{/foreach} {/if} {if isset($form.error.dupe)} {g->text text="Duplicate URL patterns."} {/if} {if isset($form.error.empty)} {g->text text="Empty URL pattern."} {/if}
{/if}
{if ($AdminRewrite.mode == 'rules')} {g->text text="Rules"} {else} {g->text text="Rules"} {/if} {if ($AdminRewrite.mode == 'setup')} {g->text text="Setup"} {else} {g->text text="Setup"} {/if} {if ($AdminRewrite.mode == 'test')} {g->text text="Test"} {else} {g->text text="Test"} {/if}
{* BEGIN Rules Tab *} {if $AdminRewrite.mode == 'rules'}

{g->text text="Short URLs are compiled out of predefined keywords. Modules may provide additional keywords. Keywords are escaped with % (eg: %itemId%)."}

{if $AdminRewrite.parserId == 'pathinfo'}

{g->text text="It is recomended that you don't activate the 'Download Item' URL since it will slow down Gallery."}

{elseif $AdminRewrite.parserId == 'isapirewrite'}

{g->text text="A pattern may not begin with a keyword."}

{/if} {assign var="group" value=""} {foreach from=$form.rules item=rules key=moduleId} {if !empty($group)} {/if} {assign var="group" value=$moduleId} {foreach from=$rules item=rule key=ruleId} {cycle values="gbEven,gbOdd" assign="rowClass"} {/foreach} {* END Rule *} {/foreach} {* END Module *}
 

{$AdminRewrite.modules.$moduleId}

{g->text text="Active"} {g->text text="Help"} {g->text text="View"} {g->text text="URL Pattern"} {g->text text="Additional Keywords"}
{assign var="match" value=$AdminRewrite.info.$moduleId.$ruleId.match} {if isset($form.error.conditions.dupe.$moduleId.$ruleId) || isset($form.error.pattern.dupe.$moduleId.$ruleId) || isset($form.error.pattern.empty.$moduleId.$ruleId) || isset($form.error.1.$moduleId.$ruleId) || isset($form.error.3.$match) || isset($form.error.4.$moduleId.$ruleId)}
{elseif isset($rule.active)}
{else}
{/if}
+ {$AdminRewrite.info.$moduleId.$ruleId.comment} {if !isset($rule.pattern)} {g->text text="No URL Pattern"} {else} {if isset($AdminRewrite.info.$moduleId.$ruleId.locked)} {else} {/if} {/if} {foreach from=$AdminRewrite.info.$moduleId.$ruleId.keywords key=keyword item=tmp} %{$keyword}% {/foreach}
{/if} {* END Rules Tab *} {* BEGIN Setup Tab *} {if $AdminRewrite.mode == 'setup'} {if $AdminRewrite.parserType == 'preGallery'}

{g->text text="Approved referers"}

{g->text text="Some rules only apply if the referer (the site that linked to the item) is something other than Gallery itself. Hosts in the list below will be treated as friendly referers."}

{g->text text="Warning: If you don't allow empty referer users won't be able to download nor play movies."}

{g->text text="Allow empty referer?"}

{counter start=0 assign="i"} {foreach from=$form.accessList item=host} {counter print=false} {/foreach}
{else}

{g->text text="Approved referers"}

{g->text text="The parser you have selected does not support a referer check."}

{/if} {if isset($AdminParser.template)} {include file="gallery:`$AdminParser.template`"} {if isset($AdminParser.action)}
{/if} {/if} {/if} {* END Rules Tab *} {* BEGIN Test Tab *} {if $AdminRewrite.mode == 'test'}

{g->text text="Test the Rewrite Parser Configuration"}

{if isset($TestResults.template)} {include file="gallery:`$TestResults.template`"} {if isset($TestResults.action)}
{/if} {if isset($TestResults.refresh)} {/if} {else}

{g->text text="The selected URL Rewrite Parser does not provide any tests."}

{/if} {/if} {* END Test Tab*}