{include file="mobile/templates/index_top.tpl"}

<div id="menu">
    <p class="mob_head botton_line">
        <a href="{if $back_url}
                        {$back_url}
                      {else}
                        fields.php?table={$table_id}{if $filter_id}&filter={$filter_id}{/if}
                     {/if}" title="{$lang.Return}">
            {if $sel_on and $all_forms}
                {if $mode=="send"}{$lang.select_mail_template}{elseif $mode=="sms"}{$lang.select_sms_template}{else}{$lang.select_print_template}{/if}:
            {else}
                {if $mode=="send"}{$lang.Mail_templates}{elseif $mode=="sms"}{$lang.SMS_templates}{else}{$lang.Print_templates}{/if}
            {/if}
        </a>
    </p>

    <ul>
        {foreach from=$all_forms item=one_form}
            {if $one_form.read}
                <li>
                    {if $sel_on}
                    <a href="forms.php?table={$table_id}{if $filter_id}&filter={$filter_id}{/if}&mode={$mode}&form={$one_form.id}{$back_url_prm}"
                       {if $mode=="send" and !$smtp_ready}onclick="alert('{$lang.alert_no_smtp_servers}'.replace(/<\/?[^>]+>/gi, '')); return false;"
                       {elseif $mode=="print" and $one_form.type_form<3}onclick="window.open('forms.php?table={$table_id}&mode={$mode}&form={$one_form.id}','','width=1000,height=700,left=150,top=100,menubar=1,scrollbars=1,resizable=1,status=1');return false;"{/if}>{/if}{$one_form.name_form}{if $sel_on}</a>
                    {/if}
                </li>
            {/if}
            {foreachelse}
            <li style="text-align:center; padding:1em; border:none;">{$lang.For_current_table} {$lang.No_templates|lower}</li>
        {/foreach}

    </ul>
</div>


<input type=hidden name=csrf value='{$csrf}'>

{include file="mobile/templates/footer.tpl" set_bt=4}