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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marvil07’s picture

Status: Active » Needs review
FileSize
6.05 KB

This also adds an option at the exposed_form views plugin.

mikeker’s picture

I 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.

marvil07’s picture

Minor improvement to avoid recalculating a value that can be calculated once before the iteration.

ipwa’s picture

Btw, 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 :)

Edit view case_studies | re.volution

dgastudio’s picture

can it be ported to d7?

lukus’s picture

I love this idea. +1 for the Drupal 7 port.

chichilatte’s picture

Marvilous! I went a step further and made it so that...

  • the current link is given an "active" class
  • every link has a sort_order class, e.g. "asc" or "desc"
  • the link texts can show the sort name only, with no sort_order text on the end

I'll post a patch if i can figure out how to get Netbeans to do it.

chichilatte’s picture

ipwa’s picture

Awesome Chichi, looking forward to your patch and for this feature to be committed.

chichilatte’s picture

Here she is, patch for comment#7. Sourcetree was the better patchmaker. Note, you'll have to apply the #3 patch before this one.

queryblitz’s picture

Will 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

gapple’s picture

Version: 6.x-3.x-dev » 7.x-3.0-beta3
FileSize
4.88 KB

Here's a patch to implement the toggle links based on 7.x-3.0-beta3

Status: Needs review » Needs work

The last submitted patch, issue-1240238-12-7x30-beta3.patch, failed testing.

ibit’s picture

Status: Needs work » Needs review

#12: issue-1240238-12-7x30-beta3.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, issue-1240238-12-7x30-beta3.patch, failed testing.

maximkashuba’s picture

Version: 7.x-3.0-beta3 » 7.x-3.x-dev
Status: Needs work » Needs review
FileSize
5.67 KB
Gregory Claeyssens’s picture

Patch from #16 seems to work fine for me. How can I still contribute to this?

mikeker’s picture

Status: Needs review » Active

@#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!

mikeker’s picture

Issue summary: View changes

changing ipwa to ipwa's

Gregory Claeyssens’s picture

Sorry 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!

Gregory Claeyssens’s picture

So 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)

Gregory Claeyssens’s picture

Issue summary: View changes
Status: Active » Reviewed & tested by the community
maximpodorov’s picture

@mikeker
Is this supposed to be committed?

ThuleNB’s picture

This 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.

mikeker’s picture

@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.

mikeker’s picture

Status: Reviewed & tested by the community » Fixed
ipwa’s picture

This makes me so happy!!! Thanks to everyone involved you guys rock!!!

ThuleNB’s picture

Great, 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?

mikeker’s picture

@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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.