Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

prev() and next() methods of PaginatorHelper now possible to place the '... #963

Merged
merged 1 commit into from Nov 19, 2012

Conversation

Projects
None yet
4 participants
Contributor

sarce commented Nov 17, 2012

prev() and next() methods of PaginatorHelper now possible to place the 'tag' option to 'false' for disable the wrapper.

@ADmad ADmad and 1 other commented on an outdated diff Nov 17, 2012

lib/Cake/View/Helper/PaginatorHelper.php
@@ -453,6 +453,9 @@ protected function _pagingLink($which, $title = null, $options = array(), $disab
$paging = $this->params($options['model']);
if (empty($disabledOptions)) {
$disabledOptions = $options;
+ if ($disabledOptions['tag'] === false) {
@ADmad

ADmad Nov 17, 2012

Member

I don't think this if block is needed since we already check for non empty tag value and use default at line 483. All tests should pass even after removing this.

@sarce

sarce Nov 17, 2012

Contributor

yes ... you're right. I need to update the branch and then do another pull request?

@ADmad

ADmad Nov 17, 2012

Member

Just amend the commit and force push your patch branch. The PR will be automatically updated.

@ADmad ADmad and 1 other commented on an outdated diff Nov 17, 2012

lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php
@@ -1016,6 +1040,14 @@ public function testPagingLinks() {
);
$this->assertTags($result, $expected);
+ $result = $this->Paginator->Next('Next', array(), null, array('tag' => false));
@ADmad

ADmad Nov 17, 2012

Member

Method name should be next instead of Next.

@sarce

sarce Nov 17, 2012

Contributor

fixed!

@sarce sarce prev() and next() methods of PaginatorHelper now possible to place th…
…e 'tag' option to 'false' for disable the wrapper.
d0d1570
Contributor

bar commented Nov 17, 2012

👍

Member

ADmad commented Nov 18, 2012

Anybody have an objection to merging this in?

Owner

markstory commented Nov 18, 2012

I think this looks good.

@ADmad ADmad added a commit that referenced this pull request Nov 19, 2012

@ADmad ADmad Merge pull request #963 from sarce/paginator-tag
prev() and next() methods of PaginatorHelper now possible to place the 'tag' option to 'false' for disable the wrapper.
165035f

@ADmad ADmad merged commit 165035f into cakephp:2.3 Nov 19, 2012

Member

ADmad commented Nov 19, 2012

@sarce Could you please update the 2.3 migration guide and relevant section on manual regarding this new feature.

Contributor

sarce commented Nov 19, 2012

@ADmad of course. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment