Explorar o código

Liste catégories en select à la place de radio

Le changement est maintenant effectif lors de l'ajout d'un flux
Marien Fressinaud %!s(int64=12) %!d(string=hai) anos
pai
achega
a2f5826d67

+ 8 - 7
app/layout/aside_feed.phtml

@@ -13,14 +13,15 @@
 
 					<li class="dropdown-header"><?php echo Translate::t ('category'); ?></li>
 
-					<?php foreach ($this->categories as $cat) { ?>
-					<li class="item">
-					<label class="radio" for="radio_<?php echo $cat->id (); ?>">
-						<input type="radio" name="category" id="radio_<?php echo $cat->id (); ?>" value="<?php echo $cat->id (); ?>"<?php echo $cat->id ()=='000000' ? ' checked="checked"' : ''; ?>/>
-						<?php echo $cat->name (); ?>
-					</label>
+					<li class="input">
+						<select name="category" id="category">
+						<?php foreach ($this->categories as $cat) { ?>
+						<option value="<?php echo $cat->id (); ?>"<?php echo $cat->id () == '000000' ? ' selected="selected"' : ''; ?>>
+							<?php echo $cat->name (); ?>
+						</option>
+						<?php } ?>
+						</select>
 					</li>
-					<?php } ?>
 
 					<li class="separator"></li>
 

+ 5 - 0
public/themes/default/global.css

@@ -386,6 +386,7 @@ input, select, textarea {
 			font-size: 90%;
 			line-height: 30px;
 		}
+			.dropdown .dropdown-menu .input select,
 			.dropdown .dropdown-menu .input input {
 				display: block;
 				height: 20px;
@@ -394,6 +395,10 @@ input, select, textarea {
 				padding: 2px 5px;
 				border-radius: 3px;
 			}
+			.dropdown .dropdown-menu .input select {
+				width: 70%;
+				height: auto;
+			}
 		.dropdown .dropdown-menu .separator {
 			display: block;
 			height: 0;

+ 5 - 0
public/themes/flat-design/global.css

@@ -380,6 +380,7 @@ input, select, textarea {
 			.dropdown .dropdown-menu label {
 				font-weight: normal;
 			}
+			.dropdown .dropdown-menu .input select,
 			.dropdown .dropdown-menu .input input {
 				display: block;
 				height: 20px;
@@ -388,6 +389,10 @@ input, select, textarea {
 				padding: 2px 5px;
 				border-radius: 3px;
 			}
+			.dropdown .dropdown-menu .input select {
+				width: 70%;
+				height: auto;
+			}
 		.dropdown .dropdown-menu .separator {
 			display: block;
 			height: 0;