{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'configuration'} {/block} {block name="page-title"}{intl l='Currencies'}{/block} {block name="check-resource"}admin.configuration.currency{/block} {block name="check-access"}view{/block} {block name="main-content"}
{hook name="currencies.top" location="currencies_top" }
{if ! empty($undefined_rates)}
{$currencyList = ''} {loop type="currency" visible="*" name="err-currencies" id={","|implode:$undefined_rates}} {$currencyList = "$currencyList, $NAME ($ISOCODE)"} {/loop} {intl l="Warning, an exchange rate was not found for at least one currency: %list" list=$currencyList|ltrim:', '}
{/if}
{hook name="currencies.table-header" location="currencies_table_header" } {loop name="currencies" type="currency" backend_context="1" visible="*" lang=$lang_id order=$order} {hook name="currencies.table-row" location="currencies_table_row" currency_id={$ID} } {/loop} {elseloop rel="currencies"} {/elseloop}
{intl l='Currencies'} {include file='renderer/buttons.html' btn_group=false buttons=[ [ 'type' => 'create', 'class' => 'action-btn', 'title' => {intl l='Add a new currency'}, 'href' => '#creation_dialog', 'auth' => ['resource' => 'admin.configuration.currency'], 'data' => [ 'toggle' => 'modal' ] ], [ 'type' => 'info', 'class' => 'action-btn', 'title' => {intl l='Update rates'}, 'auth' => ['resource' => 'admin.configuration.currency'], 'icon' => ['class' => 'glyphicon glyphicon-globe'], 'with_text' => true, 'tag' => 'button' ] ]}
{admin_sortable_header current_order=$order order='id' reverse_order='id_reverse' path='/admin/configuration/currencies' label={intl l='ID'} } {admin_sortable_header current_order=$order order='name' reverse_order='name_reverse' path='/admin/configuration/currencies' label={intl l='Name'} } {admin_sortable_header current_order=$order order='code' reverse_order='code_reverse' path='/admin/configuration/currencies' label={intl l="ISO 4217 Code"} } {admin_sortable_header current_order=$order order='symbol' reverse_order='symbol_reverse' path='/admin/configuration/currencies' label={intl l="Symbol"} } {admin_sortable_header current_order=$order order='rate' reverse_order='rate_reverse' path='/admin/configuration/currencies' label={intl l="Exchange rate"} } {admin_sortable_header current_order=$order order='visible' reverse_order='visible_reverse' path='/admin/configuration/currencies' label={intl l="Visible"} } {admin_sortable_header current_order=$order order='manual' reverse_order='manual_reverse' path='/admin/configuration/currencies' label={intl l="Position"} } {admin_sortable_header current_order=$order order='is_default' reverse_order='is_default_reverse' path='/admin/configuration/currencies' label={intl l="Default"} } {intl l='Actions'}
{$ID} {loop type="auth" name="can_change" role="ADMIN" resource="admin.configuration.currency" access="UPDATE"} {$NAME} {/loop} {elseloop rel="can_change"} {$NAME} {/elseloop} {$ISOCODE} {$SYMBOL} {format_number number="$RATE" decimals="4"}
{admin_position_block resource="admin.configuration.currency" access="UPDATE" path="/admin/configuration/currencies/update-position" url_parameter="currency_id" in_place_edit_class="currencyPositionChange" position="$POSITION" id="$ID" }
{$buttons = [ [ 'type' => 'edit', 'class' => 'currency-change', 'title' => {intl l='Change this currency'}, 'href' => {url path='/admin/configuration/currencies/update' currency_id=$ID}, 'auth' => ['resource' => 'admin.configuration.currency'] ] ]} {if !$IS_DEFAULT} {$buttons[] = [ 'type' => 'delete', 'class' => 'country-delete', 'title' => {intl l='Delete this country'}, 'href' => '#delete_dialog', 'data' => [ 'id' => $ID, 'toggle' => 'modal' ], 'auth' => ['resource' => 'admin.configuration.country'] ]} {/if} {include file='renderer/buttons.html' buttons=$buttons}
{intl l="No currency has been created yet. Click the + button to create one."}
{hook name="currencies.bottom" location="currencies_bottom" }
{* Adding a new currency *} {form name="thelia.admin.currency.creation"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "creation_dialog"} {form_hidden_fields} {form_field field='success_url'} {* on success, redirect to the edition page, _ID_ is replaced with the created currency ID, see controller *} {/form_field} {form_field field='name'}
{loop type="lang" name="default-lang" default_only="1"}
{$TITLE}
{intl l="Enter here the currency name in the default language (%title)" title={$TITLE}}
{* Switch edition to the current locale *} {form_field field='locale'} {/form_field} {/loop}
{/form_field} {form_field field='code'}
{intl l='More information about ISO 4217'}
{/form_field} {form_field field='symbol'}
{/form_field} {form_field field='rate'}
{intl l="The rate from Euro (Price in Euro * rate = Price in this currency)"}
{/form_field} {form_field field='format'}
{$label_attr.help}
{/form_field} {hook name="currency.create-form" location="currency_create_form" } {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "creation_dialog" dialog_title = {intl l="Create a new currency"} dialog_body = {$smarty.capture.creation_dialog nofilter} dialog_ok_label = {intl l="Create this currency"} form_action = {url path='/admin/configuration/currencies/create'} form_enctype = {form_enctype} form_error_message = $form_error_message } {/form} {* Delete confirmation dialog *} {capture "delete_dialog"} {hook name="currency.delete-form" location="currency_delete_form" } {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_dialog" dialog_title = {intl l="Delete currency"} dialog_message = {intl l="Do you really want to delete this currency ?"} form_action = {token_url path='/admin/configuration/currencies/delete'} form_content = {$smarty.capture.delete_dialog nofilter} } {/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'} {/javascripts} {javascripts file='assets/js/bootstrap-editable/bootstrap-editable.js'} {/javascripts} {/block} {block name="javascript-last-call"} {hook name="currencies.js" location="currencies-js" } {/block}