12100 Fix traduction du site position des boutons utilitaires

This commit is contained in:
Fred Tempez 2022-12-30 09:35:09 +01:00
parent 3ec95e1776
commit 1c16e14bac
2 changed files with 35 additions and 25 deletions

View File

@ -17,12 +17,10 @@ $(document).ready(function() {
if (translateLayout == null) {
translateLayout = "content";
setCookie("translateLayout", "content");
// Afficher les boutons liés au contenu
$(".contentButtonContainer").show();
}
$("#contentContainer").hide();
$("#uiContainer").hide();
$(".contentButtonContainer").hide();
$("#" + translateLayout + "Container").show();
$("#translate" + capitalizeFirstLetter(translateLayout) + "Button").addClass("activeButton");
@ -37,8 +35,6 @@ $("#translateUiButton").on("click", function() {
$(this).addClass("activeButton");
$("#translateContentButton").removeClass("activeButton");
setCookie("translateLayout", "ui");
// Cacher les boutons liés au contenu
$(".contentButtonContainer").hide();
});
$("#translateContentButton").on("click", function() {

View File

@ -16,22 +16,7 @@
'help' => 'Consulter l\'aide en ligne'
]);*/ ?>
</div>
<div class="col1 offset8 contentButtonContainer">
<?php echo template::button('translateButtonCopyContent', [
'href' => helper::baseUrl() . 'translate/copy',
'value' => template::ico('docs'),
'disabled' => $module::$siteCopy,
'help' => 'Copie de contenus localisés'
]); ?>
</div>
<div class="col1 contentButtonContainer">
<?php echo template::button('translateButtonAddContent', [
'href' => helper::baseUrl() . 'translate/add',
'value' => template::ico('plus'),
'class' => 'buttonGreen',
'help' => 'Nouveau contenu localisé'
]); ?>
</div>
</div>
<div class="tab">
@ -72,11 +57,40 @@
<div id="contentContainer" class="tabContent">
<div class="row">
<div class="col12">
<?php if ($module::$languagesInstalled) : ?>
<?php echo template::table([2, 6, 1, 1], $module::$languagesInstalled, ['Langues', '', '', '']); ?>
<?php endif; ?>
<div class="block">
<h4>
<?php echo helper::translate('Paramètres'); ?>
</h4>
<div class="col4 offset2">
<?php echo template::button('translateButtonCopyContent', [
'href' => helper::baseUrl() . 'translate/copy',
'ico' =>'docs',
'disabled' => $module::$siteCopy,
'value' => 'Copie de contenus localisés'
]); ?>
</div>
<div class="col4">
<?php echo template::button('translateButtonAddContent', [
'href' => helper::baseUrl() . 'translate/add',
'ico' => 'plus',
'class' => 'buttonGreen',
'value' => 'Nouveau contenu localisé'
]); ?>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col12">
<div class="block">
<h4>
<?php echo helper::translate('Langues installées'); ?>
</h4>
<?php if ($module::$languagesInstalled) : ?>
<?php echo template::table([2, 6, 1, 1], $module::$languagesInstalled, ['Langues', '', '', '']); ?>
<?php endif; ?>
</div>
</div>
</div>
</div>
<?php echo template::formClose(); ?>