Skip to content

Commit

Permalink
Change les modes d'affichage des événements
Browse files Browse the repository at this point in the history
Cette validation met à disposition la variable de configuration
'eventDisplayMode', remplaçant 'articleView'.

Avant de passer à la suite, il faut :
* Valider la façon de présenter les choses ainsi que la
terminologie utilisée.
* Utiliser ce réglage pour confirmer la façon de faire.

Note : il faut déterminer un mode d'affichage par défaut lorsque la
variable de configuration est absente. Je suggère d'utiliser 'summary'
comme je l'ai spécifié à l'installation.

Ensuite, sur cette partie il restera à :
* Faire la traduction des termes.
* Peut-être veiller à la suppression de l'ancienne variable
  'articleView'.
  • Loading branch information
Sbgodin committed Mar 5, 2014
1 parent fb527a3 commit 619b1ea
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 1 addition & 0 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@
$configurationManager->put('articleDisplayAuthor',$_['articleDisplayAuthor']);
$configurationManager->put('articleDisplayHomeSort',$_['articleDisplayHomeSort']);
$configurationManager->put('articleDisplayFolderSort',$_['articleDisplayFolderSort']);
$configurationManager->put('eventDisplayMode',$_['eventDisplayMode']);
$configurationManager->put('synchronisationType',$_['synchronisationType']);
$configurationManager->put('synchronisationEnableCache',$_['synchronisationEnableCache']);
$configurationManager->put('synchronisationForceFeed',$_['synchronisationForceFeed']);
Expand Down
1 change: 1 addition & 0 deletions install.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class_exists('Update') or require_once('Update.class.php');
$configurationManager->add('articleDisplayHomeSort','1');
$configurationManager->add('articleDisplayFolderSort','1');
$configurationManager->add('displayOnlyUnreadFeedFolder','false');
$configurationManager->add('eventDisplayMode','summary');
$configurationManager->add('optionFeedIsVerbose',1);
$configurationManager->add('synchronisationType','auto');
$configurationManager->add('feedMaxEvents','50');
Expand Down
1 change: 1 addition & 0 deletions settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
$tpl->assign('articleDisplayFolderSort', $configurationManager->get('articleDisplayFolderSort'));
$tpl->assign('articleDisplayContent', $configurationManager->get('articleDisplayContent'));
$tpl->assign('articleView', $configurationManager->get('articleView'));
$tpl->assign('eventDisplayMode', $configurationManager->get('eventDisplayMode'));
$tpl->assign('optionFeedIsVerbose', $configurationManager->get('optionFeedIsVerbose'));

//Suppression de l'état des plugins inexistants
Expand Down
10 changes: 3 additions & 7 deletions templates/marigolds/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,9 @@ <h4>{function="_t('ALLOW_ANONYMOUS_READ_DESC')"}</h4>
</fieldset>
<fieldset>
<legend>{function="_t('SHOW_EVENT_CONTENT')"}</legend>
<input type="radio" onchange="$('.articleView').slideToggle(200);" {if="$articleDisplayContent=='1'"} checked="checked" {/if} value="1" id="articleDisplayContentYes" name="articleDisplayContent" /><label for="articleDisplayContentYes">{function="_t('YES')"}</label>
<input type="radio" onchange="$('.articleView').slideToggle(200);" {if="$articleDisplayContent=='0'"} checked="checked" {/if} value="0" id="articleDisplayContentNo" name="articleDisplayContent" /><label for="articleDisplayContentNo">{function="_t('NO')"}</label>
<div class="articleView"{$articleDisplayContent==0 ? 'style="display: none;"':''}>
<input type="radio" {if="$articleView=='partial'"} checked="checked" {/if} value="partial" id="articleViewPartial" name="articleView"{if="$articleDisplayContent=='0'"} disabled="disabled"{/if} /><label for="articleViewPartial">{function="_t('PARTIAL')"}</label>
<input type="radio" {if="$articleView=='complete'"} checked="checked" {/if} value="complete" id="articleViewComplete" name="articleView"{if="$articleDisplayContent=='0'"} disabled="disabled"{/if} /><label for="articleViewComplete">{function="_t('FULL')"}</label>
</div>
<h4>{function="_t('SHOW_PARTIAL_CONTENT_DESC')"}</h4>
<input type="radio" {if="$eventDisplayMode=='title'"} checked="checked" {/if} value="title" id="eventDisplayModeTitle" name="eventDisplayMode" /><label for="eventDisplayModeTitle">Title</label>
<input type="radio" {if="$eventDisplayMode=='summary'"} checked="checked" {/if} value="summary" id="eventDisplayModeSummary" name="eventDisplayMode" /><label for="eventDisplayModeSummary">Summary</label>
<input type="radio" {if="$eventDisplayMode=='content'"} checked="checked" {/if} value="content" id="eventDisplayModeContent" name="eventDisplayMode" /><label for="eventDisplayModeContent">Content</label>
</fieldset>
<fieldset>
<legend>{function="_t('KEEP_LAST_X_EVENTS_FEED',array('<input type="text" value="'.$configurationManager->get('feedMaxEvents').'" name="feedMaxEvents" size="4" />'))"}</legend>
Expand Down

2 comments on commit 619b1ea

@cobalt74
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

salut.

  • Summary en choix par défaut : Oui
  • Nom de la variable : EventDisplayMode => pourquoi ne pas rester sur articleDisplayMode (dans l'esprit des autres variables, plus facile pour la recherche)

@Sbgodin
Copy link
Member Author

@Sbgodin Sbgodin commented on 619b1ea Mar 6, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changement fait.

Please sign in to comment.