Skip to content

Commit

Permalink
affichage du libellé actif
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephane committed May 12, 2014
1 parent 79e528b commit c5963cb
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 14 deletions.
10 changes: 6 additions & 4 deletions css/admin.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#langs { width:100%; float:right; top:0; text-align:right; }
#langs a { margin: 0 10px 0 0 }
#langs a.lang img { padding: 2px 2px 2px 2px; border: 1px solid #cecece; }
#langs a.active img { padding: 2px 2px 2px 2px; border: 1px solid red; }
#langs { width:100%; float:right; top:0; text-align:right; }
#langs a { margin: 0 10px 0 0; text-decoration: none }
#langs a:hover { color: #db2020; }
#langs a img { padding: 2px 2px 2px 2px; border: 1px solid #cecece; width: 25px }
#langs a img.active { padding: 2px 2px 2px 2px; border: 1px solid red; }
#langs a.active { padding: 2px 2px 2px 2px; border: 1px solid red; color: red }
10 changes: 6 additions & 4 deletions css/site.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#langs ul li { display:inline; list-style-type: none;}
#langs a { margin: 0 10px 0 0; }
#langs a.lang img { padding: 2px 2px 2px 2px; border: 1px solid #cecece; }
#langs a.active img { padding: 2px 2px 2px 2px; border: 1px solid red; }
#langs ul li { display:inline; list-style-type: none;}
#langs a { margin: 0 10px 0 0; text-decoration: none }
#langs a:hover { color: #db2020; }
#langs a img { padding: 2px 2px 2px 2px; border: 1px solid #cecece; width: 25px }
#langs a img.active { padding: 2px 2px 2px 2px; border: 1px solid red; }
#langs a.active { padding: 2px 2px 2px 2px; border: 1px solid red; color: red }
20 changes: 14 additions & 6 deletions plxMyMultiLingue.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,13 @@ public function AdminTopBottom() {
echo '<div id="langs">';
foreach($this->aLangs as $lang) {
$sel = $this->lang==$lang ? " active" : "";
$img = '<img class="lang'.$sel.'" src="'.PLX_PLUGINS.'plxMyMultiLingue/img/'.$lang.'.png" alt="'.$lang.'" style="width:25px" />';
$display = $this->getParam('display')=='flag' ? $img : $aLabels[$lang];
echo '<a class="lang'.$sel.'" href="?lang='.$lang.'">'.$display.'</a>';
if($this->getParam('display')=='flag') {
$img = '<img class="lang'.$sel.'" src="'.PLX_PLUGINS.'plxMyMultiLingue/img/'.$lang.'.png" alt="'.$lang.'" />';
echo '<a href="?lang='.$lang.'">'.$img.'</a>';
} else {
echo '<a class="lang'.$sel.'" href="?lang='.$lang.'">'.$aLabels[$lang].'</a>';
}

}
echo '</div>';
}
Expand Down Expand Up @@ -594,9 +598,13 @@ public function MyMultiLingue() {
echo '<ul>';
foreach($this->aLangs as $idx=>$lang) {
$sel = $this->lang==$lang ? ' active':'';
$img = '<img class=\"lang'.$sel.'\" src=\"'.PLX_PLUGINS.'plxMyMultiLingue/img/'.$lang.'.png\" alt=\"'.$lang.'\" style=\"width:25px\" />';
$display = $this->getParam('display')=='flag' ? $img : $aLabels[$lang];
echo '<li><?php echo "<a class=\"lang'.$sel.'\" href=\"".$plxShow->plxMotor->urlRewrite("?lang='.$lang.'")."\">'.$display.'</a></li>"; ?>';
if($this->getParam('display')=='flag') {
$img = '<img class=\"lang'.$sel.'\" src=\"'.PLX_PLUGINS.'plxMyMultiLingue/img/'.$lang.'.png\" alt=\"'.$lang.'\" />';
echo '<li><?php echo "<a href=\"".$plxShow->plxMotor->urlRewrite("?lang='.$lang.'")."\">'.$img.'</a></li>"; ?>';
} else {
echo '<li><?php echo "<a class=\"lang'.$sel.'\" href=\"".$plxShow->plxMotor->urlRewrite("?lang='.$lang.'")."\">'. $aLabels[$lang].'</a></li>"; ?>';
}

}
echo '</ul>';
echo '</div>';
Expand Down

0 comments on commit c5963cb

Please sign in to comment.