Browse Source

Fix issue #97 : amélioration page de configuration

Utilisation de checkbox au lieu de radio boutons pour le lazyload et
affichage des articles dépliés
Réorganisation de certaines options
Marien Fressinaud 12 years ago
parent
commit
c4dcda6b47
3 changed files with 21 additions and 29 deletions
  1. 1 1
      app/i18n/en.php
  2. 1 1
      app/i18n/fr.php
  3. 19 27
      app/views/configure/display.phtml

+ 1 - 1
app/i18n/en.php

@@ -150,7 +150,7 @@ return array (
 	'sort_order'			=> 'Sort order',
 	'display_articles_unfolded'	=> 'Show articles unfolded by default',
 	'img_with_lazyload'		=> 'Use "lazy load" mode to load pictures',
-	'auto_read_when'		=> 'Mark automatically as read when',
+	'auto_read_when'		=> 'Mark as read when',
 	'article_selected'		=> 'Article is selected',
 	'article_open_on_website'	=> 'Article is opened on its original website',
 	'scroll'			=> 'Page scrolls',

+ 1 - 1
app/i18n/fr.php

@@ -150,7 +150,7 @@ return array (
 	'sort_order'			=> 'Ordre de tri',
 	'display_articles_unfolded'	=> 'Afficher les articles dépliés par défaut',
 	'img_with_lazyload'		=> 'Utiliser le mode "lazy load" pour charger les images',
-	'auto_read_when'		=> 'Marquer automatiquement comme lu lorsque',
+	'auto_read_when'		=> 'Marquer comme lu lorsque',
 	'article_selected'		=> 'L\'article est sélectionné',
 	'article_open_on_website'	=> 'L\'article est ouvert sur le site d\'origine',
 	'scroll'			=> 'Au défilement de la page',

+ 19 - 27
app/views/configure/display.phtml

@@ -27,7 +27,7 @@
 
 		<div class="form-group">
 			<label class="group-name" for="mail_login"><?php echo Translate::t ('persona_connection_email'); ?></label>
-		<?php $mail = $this->conf->mailLogin (); ?>
+			<?php $mail = $this->conf->mailLogin (); ?>
 			<div class="group-controls">
 				<input type="email" id="mail_login" name="mail_login" value="<?php echo $mail ? $mail : ''; ?>" placeholder="<?php echo Translate::t ('blank_to_disable'); ?>" />
 				<noscript><b><?php echo Translate::t ('javascript_should_be_activated'); ?></b></noscript>
@@ -43,6 +43,16 @@
 			</div>
 		</div>
 
+		<div class="form-group">
+			<label class="group-name" for="sort_order"><?php echo Translate::t ('sort_order'); ?></label>
+			<div class="group-controls">
+				<select name="sort_order" id="sort_order">
+					<option value="low_to_high"<?php echo $this->conf->sortOrder () == 'low_to_high' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('newer_first'); ?></option>
+					<option value="high_to_low"<?php echo $this->conf->sortOrder () == 'high_to_low' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('older_first'); ?></option>
+				</select>
+			</div>
+		</div>
+
 		<div class="form-group">
 			<label class="group-name"><?php echo Translate::t ('default_view'); ?></label>
 			<div class="group-controls">
@@ -63,39 +73,21 @@
 		</div>
 
 		<div class="form-group">
-			<label class="group-name" for="sort_order"><?php echo Translate::t ('sort_order'); ?></label>
-			<div class="group-controls">
-				<select name="sort_order" id="sort_order">
-					<option value="low_to_high"<?php echo $this->conf->sortOrder () == 'low_to_high' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('newer_first'); ?></option>
-					<option value="high_to_low"<?php echo $this->conf->sortOrder () == 'high_to_low' ? ' selected="selected"' : ''; ?>><?php echo Translate::t ('older_first'); ?></option>
-				</select>
-			</div>
-		</div>
-
-		<div class="form-group">
-			<label class="group-name"><?php echo Translate::t ('img_with_lazyload'); ?></label>
 			<div class="group-controls">
-				<label class="radio" for="lazyload_yes">
-					<input type="radio" name="lazyload" id="lazyload_yes" value="yes"<?php echo $this->conf->lazyload () == 'yes' ? ' checked="checked"' : ''; ?> />
-					<?php echo Translate::t ('yes'); ?><noscript> - <b><?php echo Translate::t ('javascript_should_be_activated'); ?></b></noscript>
-				</label>
-				<label class="radio" for="lazyload_no">
-					<input type="radio" name="lazyload" id="lazyload_no" value="no"<?php echo $this->conf->lazyload () == 'no' ? ' checked="checked"' : ''; ?> />
-					<?php echo Translate::t ('no'); ?>
+				<label class="checkbox" for="display_posts">
+					<input type="checkbox" name="display_posts" id="display_posts" value="yes"<?php echo $this->conf->displayPosts () == 'yes' ? ' checked="checked"' : ''; ?> />
+					<?php echo Translate::t ('display_articles_unfolded'); ?>
+					<?php echo $this->conf->displayPosts () == 'no' ? '<noscript> - <b>' . Translate::t ('javascript_should_be_activated') . '</b></noscript>' : ''; ?>
 				</label>
 			</div>
 		</div>
 
 		<div class="form-group">
-			<label class="group-name"><?php echo Translate::t ('display_articles_unfolded'); ?></label>
 			<div class="group-controls">
-				<label class="radio" for="radio_yes">
-					<input type="radio" name="display_posts" id="radio_yes" value="yes"<?php echo $this->conf->displayPosts () == 'yes' ? ' checked="checked"' : ''; ?> />
-					<?php echo Translate::t ('yes'); ?>
-				</label>
-				<label class="radio" for="radio_no">
-					<input type="radio" name="display_posts" id="radio_no" value="no"<?php echo $this->conf->displayPosts () == 'no' ? ' checked="checked"' : ''; ?> />
-					<?php echo Translate::t ('no'); ?><noscript> - <b><?php echo Translate::t ('javascript_should_be_activated'); ?></b></noscript>
+				<label class="checkbox" for="lazyload">
+					<input type="checkbox" name="lazyload" id="lazyload" value="yes"<?php echo $this->conf->lazyload () == 'yes' ? ' checked="checked"' : ''; ?> />
+					<?php echo Translate::t ('img_with_lazyload'); ?>
+					<?php echo $this->conf->lazyload () == 'yes' ? '<noscript> - <b>' . Translate::t ('javascript_should_be_activated') . '</b></noscript>' : ''; ?>
 				</label>
 			</div>
 		</div>