Problem/Motivation
As a great man said :
<dawehner> DuaelFr: this always confused me, but I am biased as the code is in my brain
From an user point of views, the fact is that "Display 'more' link only if there is more content" is not really natural to understand and its description does not help a lot.
From a developper point of view, '#default_value' => !$this->getOption('use_more_always'),
looks like a double negation.
In each case, this can lead to a lot of confusion.
Proposed resolution
Change title to "Always display the 'more' link"
Change the description to "Check this to display the 'more' link even if there are no more items to display."
Change the default value handling to remove the negation
Change the option save to remove the negation
User interface changes
Invert the use_more_always checkbox. It will have to be checked for the option to be active.
Credit
This issue was covered during the first Drupal Sprint of Montpellier (France).
Comments
Comment #1
DuaelFrHere is the patch !
Comment #2
dawehnerLet's use single-quotes.
We needed this fix as we haven't been allowed to change the behavior: #1102974: Performance fix: Make "always display more link" the default if "create more link" is selected
Comment #3
DuaelFr@dawehner Do you want me to put single-quotes around all occurences of "more" in the related fields titles and descriptions ?
Comment #4
dawehnerI re-RTBC it, because it is actually right to use double quotes here.
Comment #5
DuaelFrYou did not answer my question.
We have :
Two fields are using
more
without single-quotes and one is using'more'
with single-quotes.Do you want me to harmonize this ? With or without single-quotes around "more" ?
Comment #6
alexpottLet's remove the single quotes so that this is consistent with the other parts of the views ui. As we are changing this text here I don't think this is out of scope.
Comment #7
DuaelFrI'll do it on monday.
Comment #8
DuaelFrAs promised.
Comment #9
dawehnerIf we remove the single quotes we can reintroduce single quotes again!
Comment #10
DuaelFrI also single-quote'd the use_more_text description
Comment #11
dawehnerGreat!
Comment #12
alexpottCommitted 74cbf95 and pushed to 8.x. Thanks!
Comment #13
alexpottSetting to the correct status
Comment #14
dawehnerThe actual stored value did not change. I don't think that a UI change is worth of a change notice.