{extends file="admin-layout.tpl"}

{block name="page-title"}{intl l='Configuration'}{/block}

{block name="check-resource"}admin.configuration{/block}
{block name="check-access"}view{/block}

{block name="main-content"}
    <div class="configuration">

        <div id="wrapper" class="container">

            {module_include location='configuration_top'}

            <h2>{intl l="Thelia configuration"}</h2>

            <div class="row">

                <div class="col-md-4">
                    <div class="menu-list-table general-block-decorator">
                        <div class="table-responsive">
                            <table class="table table-striped table-condensed">
                                <caption>{intl l='Product catalog configuration'}</caption>

                                {module_include location='catalog_configuration_top'}

                                {loop type="auth" name="pcc1" role="ADMIN" resource="admin.configuration.template" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/templates'}">{intl l='Product templates'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/templates'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.attribute" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/attributes'}">{intl l='Product attributes'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/attributes'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.feature" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/features'}">{intl l='Product features'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/features'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc4" role="ADMIN" resource="admin.configuration.message" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/messages'}">{intl l='Mailing templates'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/messages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc5" role="ADMIN" resource="admin.configuration.currency" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/currencies'}">{intl l='Currencies'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/currencies'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.tax-rule" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/taxes_rules'}">{intl l='Tax rules'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/taxes_rules'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {module_include location='catalog_configuration_bottom'}
                            </table>
                        </div>
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="menu-list-table general-block-decorator">
                        <div class="table-responsive">
                            <table class="table table-striped table-condensed">
                                <caption>{intl l='Shipping configuration'}</caption>

                                {module_include location='shipping_configuration_top'}

                                {loop type="auth" name="pcc1" role="ADMIN" resource="admin.configuration.contry" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/countries'}">{intl l='Countries'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/countries'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.shipping-zone" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/shipping_zones'}">{intl l='Shipping configuration'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/shipping_zones'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.shipping-configuration" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/shipping_configuration'}">{intl l='Shipping zones management'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/shipping_configuration'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {module_include location='shipping_configuration_bottom'}

                            </table>
                        </div>
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="menu-list-table general-block-decorator">
                        <div class="table-responsive">
                            <table class="table table-striped table-condensed">
                                <caption>{intl l='System parameters'}</caption>

                                {module_include location='system_configuration_top'}

                                {loop type="auth" name="pcc-store" role="ADMIN" resource="admin.configuration.store" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/store'}">{intl l='Store'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/store'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc2" role="ADMIN" resource="admin.configuration.variable" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/variables'}">{intl l='System variables'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/variables'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc3" role="ADMIN" resource="admin.configuration.profile" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/profiles'}">{intl l='Administration profiles'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/profiles'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc4" role="ADMIN" resource="admin.configuration.administrator" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/administrators'}">{intl l='Administrators'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/administrators'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc5" role="ADMIN" resource="admin.configuration.language" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/languages'}">{intl l='Languages &amp; URLs'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/languages'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc5.1" role="ADMIN" resource="admin.configuration.translations" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/translations'}">{intl l='Translations'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/translations'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc6" role="ADMIN" resource="admin.configuration.mailing-system" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/mailingSystem'}">{intl l='Mailing system'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/mailingSystem'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc7" role="ADMIN" resource="admin.configuration.admin-logs" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/adminLogs'}">{intl l='Administration logs'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/adminLogs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}

                                {loop type="auth" name="pcc8" role="ADMIN" resource="admin.configuration.system-logs" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/system-logs'}">{intl l='System logs'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/system-logs'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}
                                {loop type="auth" name="pcc9" role="ADMIN" resource="admin.configuration.advanced" access="VIEW"}
                                    <tr>
                                        <td><a href="{url path='/admin/configuration/advanced'}">{intl l='Advanced configuration'}</a></td>
                                        <td><a class="btn btn-default btn-xs" href="{url path='/admin/configuration/advanced'}"><i class="glyphicon glyphicon-edit"></i></a></td>
                                    </tr>
                                {/loop}
                                {module_include location='system_configuration_bottom'}
                            </table>
                        </div>
                    </div>
                </div>

                {module_include location='configuration_bottom'}
            </div>
        </div>
    </div>
{/block}

{block name="javascript-last-call"}
    {module_include location='configuration-js'}
{/block}