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

View changes

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

This comment has been minimized.

Show comment Hide comment
@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.

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

This comment has been minimized.

Show comment Hide comment
@sarce

sarce Nov 17, 2012

Contributor

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

@sarce

sarce Nov 17, 2012

Contributor

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

This comment has been minimized.

Show comment Hide comment
@ADmad

ADmad Nov 17, 2012

Member

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

@ADmad

ADmad Nov 17, 2012

Member

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

@ADmad

View changes

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

This comment has been minimized.

Show comment Hide comment
@ADmad

ADmad Nov 17, 2012

Member

Method name should be next instead of Next.

@ADmad

ADmad Nov 17, 2012

Member

Method name should be next instead of Next.

This comment has been minimized.

Show comment Hide comment
@sarce

sarce Nov 17, 2012

Contributor

fixed!

@sarce

sarce Nov 17, 2012

Contributor

fixed!

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

This comment has been minimized.

Show comment Hide comment
@bar

bar Nov 17, 2012

Contributor

👍

Contributor

bar commented Nov 17, 2012

👍

@ADmad

This comment has been minimized.

Show comment Hide comment
@ADmad

ADmad Nov 18, 2012

Member

Anybody have an objection to merging this in?

Member

ADmad commented Nov 18, 2012

Anybody have an objection to merging this in?

@markstory

This comment has been minimized.

Show comment Hide comment
@markstory

markstory Nov 18, 2012

Owner

I think this looks good.

Owner

markstory commented Nov 18, 2012

I think this looks good.

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

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.

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

@ADmad

This comment has been minimized.

Show comment Hide comment
@ADmad

ADmad Nov 19, 2012

Member

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

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.

@sarce

This comment has been minimized.

Show comment Hide comment
@sarce

sarce Nov 19, 2012

Contributor

@ADmad of course. thanks!

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