272 lines
13 KiB
HTML
272 lines
13 KiB
HTML
{extends file="admin-layout.tpl"}
|
|
|
|
{block name="page-title"}{intl l='Thelia Languages'}{/block}
|
|
|
|
{block name="check-permissions"}admin.configuration.languages.view{/block}
|
|
|
|
{block name="main-content"}
|
|
<div class="languages">
|
|
|
|
<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><a href="{url path='/admin/configuration/languages'}">{intl l="Languages"}</a></li>
|
|
</ul>
|
|
|
|
{module_include location='languages_top'}
|
|
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="general-block-decorator">
|
|
|
|
<form action="" method="">
|
|
|
|
<table class="table table-striped table-condensed table-left-aligned">
|
|
<caption>
|
|
{intl l="Languages management"}
|
|
{loop type="auth" name="can_create" roles="ADMIN" permissions="admin.configuration.languages.create"}
|
|
<a class="btn btn-default btn-primary action-btn" title="{intl l='Add a new language'}" href="#creation_dialog" data-toggle="modal">
|
|
<span class="glyphicon glyphicon-plus-sign"></span>
|
|
</a>
|
|
{/loop}
|
|
|
|
</caption>
|
|
<thead>
|
|
<tr>
|
|
<th>{intl l="Language name"}</th>
|
|
<th>{intl l="ISO 639 Code"}</th>
|
|
<th>{intl l="Default"}</th>
|
|
<th>{intl l="Actions"}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><input type="text" class="form-control" name="" value="France"></td>
|
|
<td><input type="text" class="form-control" name="" value="fr"></td>
|
|
<td>
|
|
<div class="make-switch switch-small switch-radio" 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="radio" name="" checked>
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="btn-group">
|
|
<a href="#delete_dialog" data-toggle="modal" class="btn btn-default btn-xs" title="{intl l="Delete this language"}"><span class="glyphicon glyphicon-trash"></span></a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="text" class="form-control" name="" value="English"></td>
|
|
<td><input type="text" class="form-control" name="" value="en"></td>
|
|
<td>
|
|
<div class="make-switch switch-small switch-radio" 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="radio" name="">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="btn-group">
|
|
<a href="#delete_dialog" data-toggle="modal" class="btn btn-default btn-xs" title="{intl l="Delete this language"}"><span class="glyphicon glyphicon-trash"></span></a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="text" class="form-control" name="" value="Spanish"></td>
|
|
<td><input type="text" class="form-control" name="" value="es"></td>
|
|
<td>
|
|
<div class="make-switch switch-small switch-radio" 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="radio" name="">
|
|
</div>
|
|
</td>
|
|
<td>
|
|
<div class="btn-group">
|
|
<a href="#delete_dialog" data-toggle="modal" class="btn btn-default btn-xs" title="{intl l="Delete this language"}"><span class="glyphicon glyphicon-trash"></span></a>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4">
|
|
<button type="submit" class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="general-block-decorator">
|
|
|
|
<div class="title title-without-tabs">{intl l="Parameters"}</div>
|
|
|
|
<form action="" method="post">
|
|
|
|
<div class="form-group">
|
|
<label for="" class="label-control">{intl l="If a translation is missing or incomplete :"}</label>
|
|
<div class="input-group">
|
|
<select name="" id="" data-toggle="selectpicker">
|
|
<option value="">Replace by the default language</option>
|
|
<option value="">Strictly use the requested language</option>
|
|
</select>
|
|
<div class="input-group-btn">
|
|
<button type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span></button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="general-block-decorator clearfix">
|
|
|
|
<div class="title title-without-tabs">{intl l="Association language/URL"}</div>
|
|
|
|
<form action="" method="post">
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<label for="" class="label-control"><input type="radio" name="" checked> {intl l="Using a same domain for all languages"}</label>
|
|
<input type="url" class="form-control" name="" placeholder="http://www.domain.com">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="form-group">
|
|
<label for="" class="label-control"><input type="radio" name=""> {intl l="Using a domain or subdomain for each language"}</label>
|
|
</div>
|
|
|
|
<table class="table table-striped table-condensed table-left-aligned">
|
|
<tbody>
|
|
<tr>
|
|
<th>{intl l="France"}</th>
|
|
<td><input type="text" class="form-control" name="" placeholder="http://www.domain.com" readonly></td>
|
|
</tr>
|
|
<tr>
|
|
<th>{intl l="English"}</th>
|
|
<td><input type="text" class="form-control" name="" placeholder="http://www.domain.com" readonly></td>
|
|
</tr>
|
|
<tr>
|
|
<th>{intl l="Spanish"}</th>
|
|
<td><input type="text" class="form-control" name="" placeholder="http://www.domain.com" readonly></td>
|
|
</tr>
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="2">
|
|
<button type="submit" disabled class="btn btn-default btn-primary pull-right"><span class="glyphicon glyphicon-check"></span> {intl l="Save"}</button>
|
|
</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{module_include location='languages_bottom'}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
{form name="thelia.admin.language.creation"}
|
|
|
|
{* Capture the dialog body, to pass it to the generic dialog *}
|
|
{capture "creation_dialog"}
|
|
|
|
{form_hidden_fields form=$form}
|
|
|
|
{* Be sure to get the language_id, even if the form could not be validated *}
|
|
<input type="hidden" name="language_id" value="{$language_id}" />
|
|
|
|
{form_field form=$form field='success_url'}
|
|
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
|
<input type="hidden" name="{$name}" value="{url path='/admin/configuration/languages/update' language_id='_ID_'}" />
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='title'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='Language title'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='isocode'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l="{$label}"}" placeholder="{intl l='ISO Code'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
{module_include location='language_create_form'}
|
|
|
|
{/capture}
|
|
|
|
{include
|
|
file = "includes/generic-create-dialog.html"
|
|
|
|
dialog_id = "creation_dialog"
|
|
dialog_title = {intl l="Create a new language"}
|
|
dialog_body = {$smarty.capture.creation_dialog nofilter}
|
|
|
|
dialog_ok_label = {intl l="Create this language"}
|
|
|
|
form_action = {url path='/admin/configuration/languages/create'}
|
|
form_enctype = {form_enctype form=$form}
|
|
form_error_message = $form_error_message
|
|
}
|
|
{/form}
|
|
|
|
{* Delete confirmation dialog *}
|
|
|
|
{capture "delete_dialog"}
|
|
<input type="hidden" name="message_id" id="language_delete_id" value="" />
|
|
|
|
{module_include location='languages_delete_form'}
|
|
|
|
{/capture}
|
|
|
|
{include
|
|
file = "includes/generic-confirm-dialog.html"
|
|
|
|
dialog_id = "delete_dialog"
|
|
dialog_title = {intl l="Delete language"}
|
|
dialog_message = {intl l="Do you really want to delete this language ?"}
|
|
|
|
form_action = {url path='/admin/configuration/languages/delete'}
|
|
form_content = {$smarty.capture.delete_dialog nofilter}
|
|
}
|
|
|
|
{/block}
|
|
|
|
{block name="javascript-initialization"}
|
|
{javascripts file='assets/js/bootstrap-switch/bootstrap-switch.js'}
|
|
<script src="{$asset_url}"></script>
|
|
|
|
<script>
|
|
// Toogle switch on input radio
|
|
$('.switch-radio').on('switch-change', function () {
|
|
$('.switch-radio').bootstrapSwitch('toggleRadioState');
|
|
});
|
|
</script>
|
|
{/javascripts}
|
|
|
|
{javascripts file='assets/js/main.js'}
|
|
<script src="{$asset_url}"></script>
|
|
{/javascripts}
|
|
|
|
{javascripts file='assets/js/bootstrap-select/bootstrap-select.js'}
|
|
<script src="{$asset_url}"></script>
|
|
{/javascripts}
|
|
{/block} |