Ajaxified product modification tabs

This commit is contained in:
franck
2013-09-21 16:51:51 +02:00
parent bb9e1d6999
commit 72a2cdfd75
10 changed files with 329 additions and 192 deletions

View File

@@ -1,18 +1,21 @@
{*
A toolbar displayed in forms, to display language change flags, submit and close buttons.
Parameters:
- hide_submit_buttons: true / false. If true, only the close button will be deplayed.
- page_url: the current page URL. Dafault id $current_url. Used to switchedition anguage.
- close_url: no default. URL displayed when close button is clicked. If empty, the close button is not displayed.
*}
<div class="row inner-toolbar">
<div class="col-md-6 inner-actions">
{* Display the top form toolbar, with edition flags, and save buttons *}
{* When creating a new object, only default language is displayed *}
{if $action == 'create'}
{$default_only = 1}
{else}
{$default_only = 0}
{/if}
<ul class="nav nav-pills">
{loop name="lang_list" type="lang" default_only={$default_only}}
{loop name="lang_list" type="lang"}
<li {if $ID == $edit_language_id}class="active"{/if}>
<a href="{url path=$current_url edit_language_id=$ID}" title="{intl l="Edit information in %lng" lng=$TITLE}">
<a href="{url path={$page_url|default:$current_url} edit_language_id=$ID}" title="{intl l="Edit information in %lng" lng=$TITLE}">
<img src="{image file="../assets/img/flags/{$CODE}.gif"}" alt="{intl l=$TITLE}" />
</a>
</li>
@@ -22,11 +25,11 @@
<div class="col-md-6 inner-actions">
{if $hide_submit_buttons != true}
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-success" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
<button type="submit" name="save_mode" value="close" class="btn btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-success" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
<button type="submit" name="save_mode" value="close" class="btn btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
{/if}
{if ! empty($close_url)}
<a href="{$close_url}" class="btn btn-default">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
<a href="{$close_url}" class="btn btn-default">{intl l='Close'} <span class="glyphicon glyphicon-remove"></span></a>
{/if}
</div>
</div>
</div>