It seems that view "tags" options (link titles - "next", "last"...) don't pass to theme_views_mini_pager (views/theme/theme.inc). it works for full pager, but not for mini pager.

Files: 
CommentFileSizeAuthor
#55 drupal-1625248-55.patch31.75 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 50,694 pass(es).
[ View ]
#48 drupal-1625248-48.patch31.75 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] 50,712 pass(es), 2 fail(s), and 0 exception(s).
[ View ]
#41 drupal-1625248-41.patch32.23 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1625248-41.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#39 drupal-1625248-39.patch41.49 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1625248-39.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#37 drupal-1625248-37.patch32.23 KBdawehner
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1625248-37.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#34 drupal-1625248-34.patch31.73 KBdawehner
Test request sent.
Previous result: PASSED: [[SimpleTest]]: [MySQL] 47,593 pass(es).
[ View ]
#30 drupal-1625248-30.patch9.57 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 46,463 pass(es).
[ View ]
#28 drupal-1625248-28.patch9.57 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 46,479 pass(es).
[ View ]
#26 drupal-1625248-26.patch9.98 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 46,452 pass(es).
[ View ]
#20 mini_pager.png8.52 KBaspilicious
#19 drupal-1625248-19.patch9.99 KBdawehner
PASSED: [[SimpleTest]]: [MySQL] 46,425 pass(es).
[ View ]
#11 views-mini-pager-tags-1625248-11.patch3.97 KBJorrit
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]
#9 views-mini-pager-tags-1625248-9.patch3.81 KBJorrit
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]
#5 views-mini-pager-tags-1625248-5.patch3.41 KBJorrit
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]
#3 views-mini-pager-tags-1625248-3.patch2.75 KBJorrit
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]

Comments

I get the same error/issue. The mini pager tags->text for links do not change the display. Also if you use a '-' it gives a 'Warning: Invalid argument supplied for foreach() in views_object->unpack_translatable() (line 305...' You can get around it here.

Title:Mini Pager ("tags")Mini Pager ("tags") aren't being applied.

Status:Active» Needs review
StatusFileSize
new2.75 KB
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]

Please see the attached patch for a fix.

The only problem i have with this patch at the moment is that it will probably change the current output
of mini pagers.

The defaults defined on the full pager are "« first" etc. so they will be also rendered like that.
You probably have to change the default values in options_definition as well.

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

Thanks for your remarks, you're right. I have found another small issue: the views_theme() definition and theme_views_form_views_form() expect a quantity variable, but that variable isn't actually used nor supplied. So my patch also removes that. I am interested to hear your comments on my new patch.

Status:Needs review» Needs work

+++ b/plugins/views_plugin_pager_mini.incundefined
@@ -18,9 +18,41 @@ class views_plugin_pager_mini extends views_plugin_pager_full {
+    // The 1, 3 index are correct. See theme_pager documentation.

We could add a // @see reference for that.

+++ b/theme/theme.incundefined
@@ -1040,19 +1040,13 @@ function theme_views_mini_pager($vars) {
-  $quantity = $vars['quantity'];
...
-  // Calculate various markers within this pager piece:
-  // Middle is used to "center" pages around the current page.
-  $pager_middle = ceil($quantity / 2);

Oh is this variable not used at all?

Yes. theme_views_pager_mini is a copy of cores theme_pager, but not everything that should have been removed, was removed.

Thank you for this clean solution!

Oh i see, so i think this is RTBC after a small // @see

Status:Needs work» Needs review
StatusFileSize
new3.81 KB
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]

Here you go. I guess versions 6.x-3.x and 8.x-3.x also needs an update, I'll look at that later.

Status:Needs review» Needs work

+++ b/plugins/views_plugin_pager_mini.incundefined
@@ -18,9 +18,53 @@ class views_plugin_pager_mini extends views_plugin_pager_full {
+   * Provides the definition and default values of settings for this pager.
...
+   * Provides the form for setting options.
...
+   * Renders the mini pager.

What about using Overrides views_plugin_pager_full::$function instead, but keep the extra comments?

The rest of the patch is certainly RTBC. No worries about d8, we can port this after the patch got in, even the othe way round makes us a bit happier.

Status:Needs work» Needs review
StatusFileSize
new3.97 KB
PASSED: [[SimpleTest]]: [MySQL] 1,603 pass(es).
[ View ]

Is that a Drupal convention? I didn't know about that. Here is a new patch.

I can't get Drupal 8 to work at this moment, perhaps the core 8.x branch is broken temporarily. I'll check later.

Status:Needs review» Reviewed & tested by the community
Issue tags:+Needs tests

Yeah, the handbook page http://drupal.org/node/1354 is pretty handy for that, i just use that one handbook page all the time :)

Tests maybe not be required for 7.x but at least for 8.x we really have to be sure that everything works (especially things which have been broken before), so adding tags. If you don't have the endurance to work on tests/d8 i will for sure do that.

I accidently saw your checkin at #1805674: Mini pagers should extend full pagers. I was already puzzled that the mini pager didn't extend the full pager in D8, thanks for fixing that. I still don't have Drupal 8 running, though.

Do you have any idea when the patch can be committed? Do other people need to take a look at it?

Project:Views» Drupal core
Version:7.x-3.x-dev» 8.x-dev
Component:Code» views.module
Status:Reviewed & tested by the community» Needs work

Is there are reason why the patch can't be applied to 7.x before I or someone else ports it to 8.x?

Well, per the core backport policy, issues should be fixed first in D8 and then backported. Since Views in D7 is in contrib, though, I guess it's up to @dawehner to decide whether #11 can go into 7.x-3.x as-is. However, this issue should stay in the core queue for a complete D8 fix since it's apparently a blocker for an accessibility bug.

I think it's okay to first get the patch in 7.x in.

Committed that patch to 7.x-3.x and working on a 8.x patch.

Status:Needs work» Needs review
Issue tags:-Needs tests+VDC
StatusFileSize
new9.99 KB
PASSED: [[SimpleTest]]: [MySQL] 46,425 pass(es).
[ View ]

Sadly the mini pager is horrible broken at the moment (it doesn't work for multiple reasons).

The menu_rebuild is something which needs to be done, for whatever reason at the moment.

StatusFileSize
new8.52 KB

I can't see a pager? Why is this thing green? What am I doing wrong?

I can't reproduce that, how does this happen?

I create a new view, set the number of items to 2 on the mini pager. Thats it.

I have no idea how/why this happens, i can't reproduce that at all.

Status:Needs review» Reviewed & tested by the community

I failed to apply the patch correctly. After a 2nd try I managed to get it working. Party!
All looking good now.

Status:Reviewed & tested by the community» Needs work

+++ b/core/modules/views/views.moduleundefined
@@ -1569,8 +1569,7 @@ function views_disable_view(ViewStorage $view) {
   $view->disable();
}
-/**
- * Loads a view from configuration.
+/*** Loads a view from configuration.

This hunk is wrong :(

Status:Needs work» Needs review
StatusFileSize
new9.98 KB
PASSED: [[SimpleTest]]: [MySQL] 46,452 pass(es).
[ View ]

oh, corrected that.

Status:Needs review» Needs work

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Mini.phpundefined
@@ -31,10 +65,23 @@ public function summaryTitle() {
-      'parameters' => $input, 'element' => $this->options['id']));
+    // The 1, 3 index are correct.
+    // @see theme_pager().

Can't use @see like this should be "See"

+++ b/core/modules/views/views.moduleundefined
@@ -1542,8 +1542,7 @@ function views_disable_view(View $view) {
-/**
- * Loads a view from configuration.
+/** Loads a view from configuration.
  *
  * @param string $name

Still incorrect :p

Status:Needs work» Needs review
StatusFileSize
new9.57 KB
PASSED: [[SimpleTest]]: [MySQL] 46,479 pass(es).
[ View ]

He, now it looks less ugly :)

Status:Needs review» Needs work

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Mini.phpundefined
@@ -31,10 +65,22 @@ public function summaryTitle() {
+      'element' => $this->options['id'],
+      'tags' => $tags,
+  ));
+    return $output;

Ow I hate to do this, the brackets needs spaces in front of them

Status:Needs work» Needs review
StatusFileSize
new9.57 KB
PASSED: [[SimpleTest]]: [MySQL] 46,463 pass(es).
[ View ]

Yeah they are looking awkward.

Status:Needs review» Reviewed & tested by the community

Unless I missed something this is rdy to go!

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/Mini.phpundefined
@@ -24,6 +24,40 @@
class Mini extends Full {
+  /**
+   * Overrides \Drupal\views\Plugin\views\pager\Full::defineOptions().
+   *
+   * Overrides the full pager options form by deleting unused settings.
+   */
+  public function defineOptions() {
+    $options = parent::defineOptions();
+
+    unset($options['quantity']);
+    unset($options['tags']['first']);
+    unset($options['tags']['last']);
+    $options['tags']['contains']['previous']['default'] = '‹‹';
+    $options['tags']['contains']['next']['default'] = '››';
+
+    return $options;
+  }

It's a little bit odd that Mini extends Full only to delete stuff. How hard would it be to make Full extend Mini and add stuff?

Assigned:Unassigned» dawehner

What about making a common SqlPagerBase base class, from which both implementations extend? Assign the issue to myself.

StatusFileSize
new31.73 KB
Test request sent.
Previous result: PASSED: [[SimpleTest]]: [MySQL] 47,593 pass(es).
[ View ]

So Full and Mini extends SqlBase now, an interdiff sadly doesn't make sense here,.

Status:Reviewed & tested by the community» Needs review

Update status.

#34: drupal-1625248-34.patch queued for re-testing.

StatusFileSize
new32.23 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1625248-37.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Funny the changes for theme('item_list') didn't got applied to the views code.

Also the reroll was needed for things like fieldset => details.

Status:Needs review» Needs work

The last submitted patch, drupal-1625248-37.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new41.49 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1625248-39.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

No idea, but for some odd reason this patch doesn't work with patch -p1 but fine with git apply,
so here a new patch which can be applied as there is no rename in there.

Status:Needs review» Needs work

The last submitted patch, drupal-1625248-39.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new32.23 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch drupal-1625248-41.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Forgot to pull recently, sorry.

Issue tags:-VDC

#41: drupal-1625248-41.patch queued for re-testing.

Status:Needs review» Needs work

The last submitted patch, drupal-1625248-41.patch, failed testing.

Status:Needs work» Needs review

#41: drupal-1625248-41.patch queued for re-testing.

#41: drupal-1625248-41.patch queued for re-testing.

#41: drupal-1625248-41.patch queued for re-testing.

Status:Needs review» Needs work
Issue tags:+VDC

The last submitted patch, drupal-1625248-41.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new31.75 KB
FAILED: [[SimpleTest]]: [MySQL] 50,712 pass(es), 2 fail(s), and 0 exception(s).
[ View ]

Okay rerolled against some issues like the one which provided better naming for all this different fields.

Title:Mini Pager ("tags") aren't being applied.Mini Pager ("tags") are broken

Status:Needs review» Needs work

Nice!!! This is some of the best clean up and refactoring I've seen in VDC! :)

SOrry, just the one pick. Aside from that, this looks great.

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/pager/SqlBase.phpundefined
@@ -247,7 +205,7 @@ public function validateOptionsForm(&$form, &$form_state) {
+            array('@items_per_page' => $items_per_page))

The indentation got messed up a bit here?

Status:Needs work» Needs review

Here is the context of the code:

        form_set_error('pager_options][expose][items_per_page_options', t('Please insert the items per page (@items_per_page) from above.',
            array('@items_per_page' => $items_per_page))

I think this looks fine :)

Status:Needs review» Reviewed & tested by the community

Ahh, yeah, sorry :(

Issue tags:-VDC

#48: drupal-1625248-48.patch queued for re-testing.

Status:Reviewed & tested by the community» Needs work
Issue tags:+VDC

The last submitted patch, drupal-1625248-48.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new31.75 KB
PASSED: [[SimpleTest]]: [MySQL] 50,694 pass(es).
[ View ]

Hopefully we will not need that long to fix bugs like that once core is stable.

Status:Needs review» Reviewed & tested by the community

back to rtbc.

Status:Reviewed & tested by the community» Fixed

6 files changed, 328 insertions(+), 553 deletions(-)

:)

Committed/pushed to 8.x.

Yeah! awesome patch Daniel.

Thanks a lot =]

Wow thanks, this is really really good that we got that in!

Status:Fixed» Closed (fixed)

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

So just upgraded to views 3.6 on D7 and I believe the patch which was applied to D7 has a regression.

I get these errors now.

<?php
Notice
: Undefined index: quantity in CUSTOMTHEME_views_mini_pager() (line 469 of themes/custom/yt/yt.theme.inc).
?>

It appears this code removed quantity from theme_views_mini_pager().

There's a couple places in the code I can see this getting done

<?php
/**
+   * Provides the definition and default values of settings for this pager.
+   *
+   * Overrides the full pager options form by deleting unused settings.
+   */
+  function option_definition() {
+   
$options = parent::option_definition();
+
+    unset(
$options['quantity']);
+    unset(
$options['tags']['first']);
+    unset(
$options['tags']['last']);
+   
$options['tags']['previous']['default'] = '‹‹';
+   
$options['tags']['next']['default'] = '››';
+
+    return
$options;
+  }
+
/**
+   * Provides the form for setting options.
+   *
+   * Overrides the full pager options form by deleting unused settings.
+   */
+  function options_form(&$form, &$form_state) {
+   
parent::options_form($form, $form_state);
+    unset(
$form['quantity']);
+    unset(
$form['tags']['first']);
+    unset(
$form['tags']['last']);
+  }
?>

Is there any reason to not pass quantity to the theme function? I understand you don't need it for the theme implementation you're using....but someone else might decide (like me) their mini pager implementation is not simply Forward and Backwards.