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

{block name="no-return-functions"}
    {$admin_current_location = 'configuration'}
{/block}

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

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

{block name="main-content"}
    <div class="variables edit-variable">

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

            <ul class="breadcrumb">
                <li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
                <li><a href="{url path='/admin/configuration'}">{intl l="Configuration"}</a></li>
                <li>{intl l="Advanced configuration and tools"}</li>
            </ul>

            <div class="row">

                <div class="col-md-12 general-block-decorator">

                    <div class="row vertical-row-space">
                        <div class="col-md-12 title title-without-tabs">
                            {intl l='Thelia caches flushing'}
                        </div>
                    </div>

                    <div class="row">
                        <div class="col-md-4">
                            {form name="thelia.cache.flush"}
                                <form method="post" action="{url path="/admin/configuration/advanced/flush-cache"}">
                                    {form_hidden_fields}

                                    <div class="form-group">
                                        <button type="submit" class="btn btn-warning btn-sm btn-block">{intl l="Flush the Thelia internal cache"}</button>
                                    </div>
                                </form>
                            {/form}
                        </div>

                        <div class="col-md-4">

                            {form name="thelia.assets.flush"}
                                <form method="post" action="{url path="/admin/configuration/advanced/flush-assets"}">
                                    {form_hidden_fields}

                                    <div class="form-group">
                                        <button type="submit" class="btn btn-warning btn-sm btn-block">{intl l="Flush the assets cache directory"}</button>
                                    </div>
                                </form>
                            {/form}
                        </div>

                        <div class="col-md-4">

                            {form name="thelia.images-and-documents-cache.flush"}
                                <form method="post" action="{url path="/admin/configuration/advanced/flush-images-and-documents"}">
                                    {form_hidden_fields}

                                    <div class="form-group">
                                        <button type="submit" class="btn btn-warning btn-sm btn-block">{intl l="Flush the images and documents cache"}</button>
                                    </div>
                                </form>
                            {/form}
                        </div>
                    </div>
                    {hook name="advanced-configuration" location="advanced-configuration"}
                </div>
            </div>
        </div>
    </div>
{/block}

{block name="javascript-last-call"}
    {hook name="advanced-configuration.js" location="advanced-configuration-js" }
{/block}
