<h2>{i18n}Dynamic Conditions{/i18n}</h2>

<p class="descriptiveText">{i18n}Dynamic Conditions give the administrator the cability to define what permissions are applied to document within a folder based on a set of rules. These rules may be applied to the document's metadata, contents, or transactional information. Dynamic Conditions are applied on a per folder basis and may be setup from the folder's permissions section.{/i18n}</p>

<form action="{$smarty.server.PHP_SELF}" method="POST">
<fieldset>
<legend>{i18n}Create a new condition{/i18n}</legend>
<div>
<input type="hidden" name="action" value="new" />
<input type="submit" name="submit" value="{i18n}New{/i18n}" />
</div>
</fieldset>
</form>


{if $conditions}
<h2>{i18n}Existing Conditions{/i18n}</h2>

<table class="listing">
<thead>
    <tr>
        <th>{i18n}Condition Name{/i18n}</th>
        <th>{i18n}Edit{/i18n}</th>
        <th>{i18n}Delete{/i18n}</th>
        <th>{i18n}View Results{/i18n}</th>
    </tr>
</thead>
<tbody>
{foreach item=oCondition from=$conditions}
    <tr>
        <td>{$oCondition->getName()}</td>
        <td><a href="{addQS}action=edit&fSavedSearchId={$oCondition->getId()}{/addQS}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td>
        <td><a href="{addQS}action=delete&fSavedSearchId={$oCondition->getId()}{/addQS}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td>
        <td><a href="{"booleanSearch"|generateControllerUrl}&qs[action]=performSearch&qs[fSavedSearchId]={$oCondition->getId()}">{i18n}Run Condition{/i18n}</a></td>
    </tr>
{/foreach}
</tbody>
</table>
{else}
<div class="ktInfoMessage"><span>{i18n}No Conditions have been defined.{/i18n}</span></div>
{/if}
