Browse Source

Modification des filtres

Affichage de l'ensemble des filtres disponibles en tout temps
Ajout d'un indicateur de sélection en CSS
Alexis Degrugillier 12 years ago
parent
commit
8f1a30ee88

+ 7 - 15
app/layout/nav_menu.phtml

@@ -130,45 +130,37 @@
 
 
 			<?php
 			<?php
 				$url_state = $url;
 				$url_state = $url;
-				if ($this->state !== 'all') {
-					$url_state['params']['state'] = 'all';
+				$url_state['params']['state'] = 'all';
 			?>
 			?>
-			<li class="item">
+			<li class="item <?php if ($this->state == 'all') echo "selected"?>">
 				<a class="print_all" href="<?php echo Minz_Url::display ($url_state); ?>">
 				<a class="print_all" href="<?php echo Minz_Url::display ($url_state); ?>">
 					<?php echo Minz_Translate::t ('show_all_articles'); ?>
 					<?php echo Minz_Translate::t ('show_all_articles'); ?>
 				</a>
 				</a>
 			</li>
 			</li>
 			<?php
 			<?php
-				}
-				if ($this->state !== 'not_read') {
-					$url_state['params']['state'] = 'not_read';
+				$url_state['params']['state'] = 'not_read';
 			?>
 			?>
-			<li class="item">
+			<li class="item <?php if ($this->state == 'not_read') echo "selected"?>">
 				<a class="print_non_read" href="<?php echo Minz_Url::display ($url_state); ?>">
 				<a class="print_non_read" href="<?php echo Minz_Url::display ($url_state); ?>">
 					<?php echo Minz_Translate::t ('show_not_reads'); ?>
 					<?php echo Minz_Translate::t ('show_not_reads'); ?>
 				</a>
 				</a>
 			</li>
 			</li>
 			<?php
 			<?php
-				}
-				if ($this->state !== 'read') {
 					$url_state['params']['state'] = 'read';
 					$url_state['params']['state'] = 'read';
 			?>
 			?>
-			<li class="item">
+			<li class="item <?php if ($this->state == 'read') echo "selected"?>">
 				<a class="print_read" href="<?php echo Minz_Url::display ($url_state); ?>">
 				<a class="print_read" href="<?php echo Minz_Url::display ($url_state); ?>">
 					<?php echo Minz_Translate::t ('show_read'); ?>
 					<?php echo Minz_Translate::t ('show_read'); ?>
 				</a>
 				</a>
 			</li>
 			</li>
 			<?php
 			<?php
-				}
-				if ($this->state != 'favorite') {
 					$url_state['params']['state'] = 'favorite';
 					$url_state['params']['state'] = 'favorite';
 			?>
 			?>
-			<li class="item">
-				<a class="print_read" href="<?php echo Minz_Url::display ($url_state); ?>">
+			<li class="item <?php if ($this->state == 'favorite') echo "selected"?>">
+				<a class="print_favorite" href="<?php echo Minz_Url::display ($url_state); ?>">
 					<?php echo Minz_Translate::t ('show_favorite'); ?>
 					<?php echo Minz_Translate::t ('show_favorite'); ?>
 				</a>
 				</a>
 			</li>
 			</li>
-			<?php } ?>
 
 
 			<li class="separator"></li>
 			<li class="separator"></li>
 
 

+ 6 - 0
p/themes/default/global.css

@@ -397,6 +397,12 @@ input, select, textarea {
 			height: 30px;
 			height: 30px;
 			font-size: 90%;
 			font-size: 90%;
 			line-height: 30px;
 			line-height: 30px;
+		}
+		.dropdown-menu .item.selected{
+			background: #0062be;
+		}
+		.dropdown-menu .item.selected a{
+			color: #fff;
 		}
 		}
 			.dropdown-menu .item > * {
 			.dropdown-menu .item > * {
 				display: block;
 				display: block;

+ 6 - 0
p/themes/default_dark/global.css

@@ -385,6 +385,12 @@ input, select, textarea {
 			height: 30px;
 			height: 30px;
 			font-size: 90%;
 			font-size: 90%;
 			line-height: 30px;
 			line-height: 30px;
+		}
+		.dropdown-menu .item.selected{
+			background: #26303f;
+		}
+		.dropdown-menu .item.selected a{
+			color: #888;
 		}
 		}
 			.dropdown-menu .item > * {
 			.dropdown-menu .item > * {
 				display: block;
 				display: block;

+ 7 - 0
p/themes/flat-design/global.css

@@ -386,6 +386,13 @@ input, select, textarea {
 			height: 30px;
 			height: 30px;
 			font-size: 90%;
 			font-size: 90%;
 			line-height: 30px;
 			line-height: 30px;
+		}
+		.dropdown-menu .item.selected{
+			background: #2980b9;
+		}
+		.dropdown-menu .item.selected a{
+			background: #2980b9;
+			color: #fff;
 		}
 		}
 			.dropdown-menu .item > * {
 			.dropdown-menu .item > * {
 				display: block;
 				display: block;