Skip to content

Commit c5963cb

Browse files
author
Stephane
committed
affichage du libellé actif
1 parent 79e528b commit c5963cb

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

css/admin.css

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#langs { width:100%; float:right; top:0; text-align:right; }
2-
#langs a { margin: 0 10px 0 0 }
3-
#langs a.lang img { padding: 2px 2px 2px 2px; border: 1px solid #cecece; }
4-
#langs a.active img { padding: 2px 2px 2px 2px; border: 1px solid red; }
1+
#langs { width:100%; float:right; top:0; text-align:right; }
2+
#langs a { margin: 0 10px 0 0; text-decoration: none }
3+
#langs a:hover { color: #db2020; }
4+
#langs a img { padding: 2px 2px 2px 2px; border: 1px solid #cecece; width: 25px }
5+
#langs a img.active { padding: 2px 2px 2px 2px; border: 1px solid red; }
6+
#langs a.active { padding: 2px 2px 2px 2px; border: 1px solid red; color: red }

css/site.css

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
#langs ul li { display:inline; list-style-type: none;}
2-
#langs a { margin: 0 10px 0 0; }
3-
#langs a.lang img { padding: 2px 2px 2px 2px; border: 1px solid #cecece; }
4-
#langs a.active img { padding: 2px 2px 2px 2px; border: 1px solid red; }
1+
#langs ul li { display:inline; list-style-type: none;}
2+
#langs a { margin: 0 10px 0 0; text-decoration: none }
3+
#langs a:hover { color: #db2020; }
4+
#langs a img { padding: 2px 2px 2px 2px; border: 1px solid #cecece; width: 25px }
5+
#langs a img.active { padding: 2px 2px 2px 2px; border: 1px solid red; }
6+
#langs a.active { padding: 2px 2px 2px 2px; border: 1px solid red; color: red }

plxMyMultiLingue.php

+14-6
Original file line numberDiff line numberDiff line change
@@ -440,9 +440,13 @@ public function AdminTopBottom() {
440440
echo '<div id="langs">';
441441
foreach($this->aLangs as $lang) {
442442
$sel = $this->lang==$lang ? " active" : "";
443-
$img = '<img class="lang'.$sel.'" src="'.PLX_PLUGINS.'plxMyMultiLingue/img/'.$lang.'.png" alt="'.$lang.'" style="width:25px" />';
444-
$display = $this->getParam('display')=='flag' ? $img : $aLabels[$lang];
445-
echo '<a class="lang'.$sel.'" href="?lang='.$lang.'">'.$display.'</a>';
443+
if($this->getParam('display')=='flag') {
444+
$img = '<img class="lang'.$sel.'" src="'.PLX_PLUGINS.'plxMyMultiLingue/img/'.$lang.'.png" alt="'.$lang.'" />';
445+
echo '<a href="?lang='.$lang.'">'.$img.'</a>';
446+
} else {
447+
echo '<a class="lang'.$sel.'" href="?lang='.$lang.'">'.$aLabels[$lang].'</a>';
448+
}
449+
446450
}
447451
echo '</div>';
448452
}
@@ -594,9 +598,13 @@ public function MyMultiLingue() {
594598
echo '<ul>';
595599
foreach($this->aLangs as $idx=>$lang) {
596600
$sel = $this->lang==$lang ? ' active':'';
597-
$img = '<img class=\"lang'.$sel.'\" src=\"'.PLX_PLUGINS.'plxMyMultiLingue/img/'.$lang.'.png\" alt=\"'.$lang.'\" style=\"width:25px\" />';
598-
$display = $this->getParam('display')=='flag' ? $img : $aLabels[$lang];
599-
echo '<li><?php echo "<a class=\"lang'.$sel.'\" href=\"".$plxShow->plxMotor->urlRewrite("?lang='.$lang.'")."\">'.$display.'</a></li>"; ?>';
601+
if($this->getParam('display')=='flag') {
602+
$img = '<img class=\"lang'.$sel.'\" src=\"'.PLX_PLUGINS.'plxMyMultiLingue/img/'.$lang.'.png\" alt=\"'.$lang.'\" />';
603+
echo '<li><?php echo "<a href=\"".$plxShow->plxMotor->urlRewrite("?lang='.$lang.'")."\">'.$img.'</a></li>"; ?>';
604+
} else {
605+
echo '<li><?php echo "<a class=\"lang'.$sel.'\" href=\"".$plxShow->plxMotor->urlRewrite("?lang='.$lang.'")."\">'. $aLabels[$lang].'</a></li>"; ?>';
606+
}
607+
600608
}
601609
echo '</ul>';
602610
echo '</div>';

0 commit comments

Comments
 (0)