Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is for tracking ipwa's idea about use toggle links.
In summary, show only one of the sorts(per sort_by type) when using links as select replacement.
Comments
Comment #1
marvil07 CreditAttribution: marvil07 commentedThis also adds an option at the exposed_form views plugin.
Comment #2
mikeker CreditAttribution: mikeker commentedI like this idea a lot and thanks for the patch! However I won't be able to review patches until the end of the month (I'm out of town and don't have time).
If anyone else is looking at this issue, please test the patch and add any feedback to this issue.
Comment #3
marvil07 CreditAttribution: marvil07 commentedMinor improvement to avoid recalculating a value that can be calculated once before the iteration.
Comment #4
ipwa CreditAttribution: ipwa commentedBtw, I'm using this patch in a live site and I'm loving it. Thanks so much @marvil07, you totally rock.
This is my config in case it helps anyone (on the actual site however I use CSS to display the arrow images :)
Comment #5
dgastudio CreditAttribution: dgastudio commentedcan it be ported to d7?
Comment #6
lukusI love this idea. +1 for the Drupal 7 port.
Comment #7
chichilatte CreditAttribution: chichilatte commentedMarvilous! I went a step further and made it so that...
I'll post a patch if i can figure out how to get Netbeans to do it.
Comment #8
chichilatte CreditAttribution: chichilatte commentedComment #9
ipwa CreditAttribution: ipwa commentedAwesome Chichi, looking forward to your patch and for this feature to be committed.
Comment #10
chichilatte CreditAttribution: chichilatte commentedHere she is, patch for comment#7. Sourcetree was the better patchmaker. Note, you'll have to apply the #3 patch before this one.
Comment #11
queryblitz CreditAttribution: queryblitz commentedWill you post the patched file(s) somewhere so they can be installed by me, a newbie to patching?
edit:
Ah nevermind I'm just doing it manually. Too impatient :P
Comment #12
gappleHere's a patch to implement the toggle links based on 7.x-3.0-beta3
Comment #14
ibit CreditAttribution: ibit commented#12: issue-1240238-12-7x30-beta3.patch queued for re-testing.
Comment #16
maximkashubaComment #17
Gregory Claeyssens CreditAttribution: Gregory Claeyssens commentedPatch from #16 seems to work fine for me. How can I still contribute to this?
Comment #18
mikeker CreditAttribution: mikeker commented@#17: Best way to contribute is to thoroughly test the patch in question. If you have Dreditor installed, you'll see a "simplytest.me" button next to the patch. That will launch a 30-minute sandbox of the latest version of Drupal with that patch installed. Once you've got that up and running, test, test, test. (if you don't have Dreditor installed, do it!)
Check how it works with AJAX Views. See what happens when the filter is set to accept multiple entries vs a single entry. What about if BEF is set to show the filter as links?
And, most importantly, report your results back here. If you're confident, based on your testing, that this patch doesn't cause any regressions and correctly implements the feature you can set the status to "reviewed & tested by the community." That really gets the attention of maintainers! Especially those of us that have precious few hours to devote to their modules these days... :)
Thanks!
Comment #18.0
mikeker CreditAttribution: mikeker commentedchanging ipwa to ipwa's
Comment #19
Gregory Claeyssens CreditAttribution: Gregory Claeyssens commentedSorry about the inactivity from my part on this. It has been busy, I'll try to do it tomorrow and post results as soon as i have some.
Thanks mikeker for the information!
Comment #20
Gregory Claeyssens CreditAttribution: Gregory Claeyssens commentedSo here are my results:
- Toggle links are only available to sort criteria (not filter criteria, which is a good thing -> no multiple entries!)
- Show the filter as links: No problem, it shows all combinations as it should do
- Doesn't seem to sort by AJAX, but when I set it to links instead of toggle links it doesn't load with ajaax either so is this wrong? (the basic select lists do work correctly with AJAX)
Comment #21
Gregory Claeyssens CreditAttribution: Gregory Claeyssens commentedComment #22
maximpodorov CreditAttribution: maximpodorov commented@mikeker
Is this supposed to be committed?
Comment #23
ThuleNB CreditAttribution: ThuleNB commentedThis is a very helpful functionality which I'd like to use on my website, too. Way better than the default links.
Is there a chance that it will be committed soon? Unfortunately, I am no coder and had some bad experience when trying to apply a patch.
Comment #24
mikeker CreditAttribution: mikeker commented@maximpodorov: Now that it's RTBC'ed it can be committed! :)
Thanks to all that contributed and my apologies for the delay getting this in.
re: 6.x branch: at this point the 6.x branch is strictly maintenance-only so toggle links will be a 7.x (and Views 3.x) option.
Comment #25
mikeker CreditAttribution: mikeker commentedComment #26
ipwa CreditAttribution: ipwa commentedThis makes me so happy!!! Thanks to everyone involved you guys rock!!!
Comment #27
ThuleNB CreditAttribution: ThuleNB commentedGreat, it works for me just fine.
Now I am trying to show arrows instead of "descend" and "ascend". What would be the best way to achieve this?
Comment #28
mikeker CreditAttribution: mikeker commented@ThuleNB: If you use the rewrite option, you should be able to add HTML to replace the text of the ascending/descending text. If that doesn't work, please open it as a separate issue.
Thanks.