{$d='rewriteurl.bo.default'}
<div class="modules-configure">
    <div id="wrapper" class="container">
        <div class="general-block-decorator">
            <div class="row">
                <div class="col-md-12 title title-without-tabs">
                    {intl d=$d l="Global URL Rewriting"}
                </div>
            </div>

            <div class="row">
                <div class="col-md-12">
                    <div class="panel panel-default">
                        <div class="panel-body">
                            <div>
                                <label>{intl d=$d l="Enable URL rewriting"}</label>
                                <div class="make-switch switch-small js_switch_rewrite_url" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok'></i>" data-off-label="<i class='glyphicon glyphicon-remove'></i>">
                                    <input type="checkbox" {if $isRewritingEnabled}checked="checked"{/if}>
                                </div>
                            </div>
                            <span class="help-block">{intl d=$d l="Set the config variable 'rewriting_enable'"}</span>
                        </div>
                    </div>

                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h3 class="panel-title">
                                {intl d=$d l="Rule management"}
                            </h3>
                        </div>
                        <div class="panel-body">

                            <div class="js_error_rule_management alert alert-danger" style="display:none"></div>

                            <table class="table table-condensed table-striped">
                                <thead>
                                    <tr>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Rule type"}</label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Condition"} <a href="#" data-toggle="tooltip" title="{intl d=$d l="For the regex, your input is compare to URL without the domain name and without any GET params. Ex : for 'www.mysite.com/one/two?three=four', your regex will be compare to '/one/two'."}"><span class="glyphicon glyphicon-question-sign"></span></a></label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="404 only"}</label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Redirect to"} <a href="#" data-toggle="tooltip" title="{intl d=$d l="Enter a URL with a leading '/' and no domain name. Ex : for 'www.mysite.com/one/two', enter '/one/two'."}"><span class="glyphicon glyphicon-question-sign"></span></a></label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Position"}</label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Actions"}</label></th>
                                    </tr>
                                </thead>


                                <tbody>
                                    <tr data-idrule="new">
                                        <td class="text-center">
                                            <select class="js_rule_type form-control" data-idrule="new" required>
                                                <option value="regex">{intl d=$d l="Regex"}</option>
                                                <option value="params">{intl d=$d l="GET params"}</option>
                                                <option value="regex-params">{intl d=$d l="Regex and GET params"}</option>
                                                <option value="text">{intl d=$d l="Text"}</option>
                                            </select>
                                        </td>
                                        <td>
                                            <div class="js_regex_group input-group">
                                                <span class="input-group-addon">/</span>
                                                <input class="js_regex form-control" type="text" placeholder="{literal}^[a-z0-9_-]{3,16}${/literal}"/>
                                                <span class="input-group-addon">/</span>
                                            </div>
                                            <div class="js_text_group input-group">
                                                <span class="input-group-addon">/</span>
                                                <input class="js_text form-control" type="text" placeholder=""/>
                                                <span class="input-group-addon"></span>
                                            </div>
                                            <div class="js_param_rule_group"></div>
                                        </td>
                                        <td class="text-center">
                                            <input class="js_only404 form-control" type="checkbox" checked="checked"/>
                                        </td>
                                        <td class="text-center">
                                            <input class="js_url_to_redirect form-control" type="text" placeholder="/path/mypage.html"/>
                                        </td>
                                        <td class="text-center">
                                        </td>
                                        <td class="text-center">
                                            <a href="#" class="js_btn_add_rule btn btn-primary"><span class="glyphicon glyphicon-plus-sign"></span></a>
                                        </td>
                                    </tr>

                                    <tr>
                                        <td colspan="6" class="text-center"><hr><h2 class="text-center">{intl d=$d l="Currently enabled rules"}</h2><hr></td>
                                    </tr>
                                </tbody>
                            </table>

                            <table class="table table-condensed table-striped" id="redirection-table">
                                <thead>
                                    <tr>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Rule type"}</label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Condition"} <a href="#" data-toggle="tooltip" title="{intl d=$d l="For the regex, your input is compare to URL without the domain name and without any GET params. Ex : for 'www.mysite.com/one/two?three=four', your regex will be compare to '/one/two'."}"><span class="glyphicon glyphicon-question-sign"></span></a></label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="404 only"}</label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Redirect to"} <a href="#" data-toggle="tooltip" title="{intl d=$d l="Enter a URL with a leading '/' and no domain name. Ex : for 'www.mysite.com/one/two', enter '/one/two'."}"><span class="glyphicon glyphicon-question-sign"></span></a></label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Position"}</label></th>
                                        <th class="text-center"><label class="control-label">{intl d=$d l="Actions"}</label></th>
                                    </tr>
                                </thead>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="js_param_rule" data-idparamrule="new_hidden" data-idrule="new_hidden" style="display:none">
        <form class="form-inline text-nowrap">
            <div class="form-group text-center">
                <input class="js_param_name form-control" type="text" placeholder="Param name"/>
            </div>

            <div class="form-group text-center">
                <select class="js_param_condition form-control" data-idparamrule="1" data-idrule="new">
                    <option value="equals">=</option>
                    <option value="not_equals">≠</option>
                    <option value="exists">{intl d=$d l="exists"}</option>
                    <option value="missing">{intl d=$d l="is missing"}</option>
                    <option value="empty">{intl d=$d l="is empty"}</option>
                    <option value="not_empty">{intl d=$d l="is not empty"}</option>
                </select>
            </div>

            <div class="form-group text-center">
                <input class="js_param_value form-control" type="text" placeholder="Param value"/>
            </div>
            <a href="#" class="js_btn_remove_param_rule btn btn-default" data-idparamrule="1" data-idrule="new">
                <span class="glyphicon glyphicon-remove"></span>
            </a>
            <a href="#" class="js_btn_add_param_rule btn btn-primary" data-idrule="new">
                <span class="glyphicon glyphicon-plus"></span>
            </a>
        </form>
    </div>
</div>

{include file="RewriteUrl/module-configuration-js.html"}

