I love being able to expose sort options, but I would like to disable the Order: Asc/Desc selectbox.

Files: 
CommentFileSizeAuthor
#9 views-948198-9.patch3.09 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 2,286 pass(es).
[ View ]
#6 views-948198-6.patch2.93 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 2,286 pass(es).
[ View ]
#5 views-hide-exposed-sort-order-948198-5.patch3.18 KBDarren Oh
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]
#3 views-hide-exposed-sort-order-948198-3.patch3.08 KBDarren Oh
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]
#1 948198-exposed-sort_options.patch2.97 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 948198-exposed-sort_options.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Comments

dawehner’s picture

Status:Active» Needs work
StatusFileSize
new2.97 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 948198-exposed-sort_options.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Sadly the settings are not stored.

dawehner’s picture

+++ plugins/views_plugin_exposed_form.incundefined
@@ -37,6 +37,7 @@ class views_plugin_exposed_form extends views_plugin {
+    $options['sort_options'] = array('default' => array('ASC', 'DESC'));

@@ -91,6 +92,17 @@ class views_plugin_exposed_form extends views_plugin {
+      '#type' => 'select',

Select isn't multiple so this can't work as expected.

Darren Oh’s picture

Version:6.x-3.0-alpha3» 7.x-3.5
Status:Needs work» Needs review
StatusFileSize
new3.08 KB
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]

I just finished a working patch for the Drupal 7 version. This patch will allow each sort use the order from its own settings.

dawehner’s picture

The patch looks great so far, though it would be probably helpful for the sitebuilder to tell here that instead the default order on the sort setting is used.

Darren Oh’s picture

StatusFileSize
new3.18 KB
PASSED: [[SimpleTest]]: [MySQL] 1,555 pass(es).
[ View ]

Additional explanation added.

dawehner’s picture

Version:7.x-3.5» 8.x-3.x-dev
StatusFileSize
new2.93 KB
PASSED: [[SimpleTest]]: [MySQL] 2,286 pass(es).
[ View ]

This looks perfect know, thanks!

Attached a port to d8, so it would be cool if someone would like to test it, else i think there is no reason not to commit it.

aspilicious’s picture

Well it uses ctools dependencies?

dawehner’s picture

Status:Needs review» Needs work

Good spot!

dawehner’s picture

Status:Needs work» Needs review
StatusFileSize
new3.09 KB
PASSED: [[SimpleTest]]: [MySQL] 2,286 pass(es).
[ View ]

This patch should better wait for the moving of ctools autosubmit.

Darren Oh’s picture

Version:8.x-3.x-dev» 7.x-3.5

I think the patch from #5 should be committed to the 7.x-3.x branch and ported afterwards.

dawehner’s picture

Version:7.x-3.5» 8.x-3.x-dev

It got already committed to 7.x-3.x

dawehner’s picture

Issue tags:+VDC

.

Darren Oh’s picture

Added to 7.x-3.x in commit bcd86c0. Thanks!

tim.plunkett’s picture

Status:Needs review» Fixed
tim.plunkett’s picture

Status:Fixed» Closed (fixed)
Issue tags:-VDC

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