Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GridView filter error indication added (#3154) #3164

Merged
merged 7 commits into from Apr 22, 2014
Merged

GridView filter error indication added (#3154) #3164

merged 7 commits into from Apr 22, 2014

Conversation

ivan-kolmychek
Copy link
Contributor

According to #3154.

@samdark samdark added this to the 2.0 RC milestone Apr 18, 2014
{
$filterClass .= ' ';
}
$this->filterOptions['class'] = $filterClass . 'has-error';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to use Html::addCssClass instead

@ivan-kolmychek
Copy link
Contributor Author

Updated the code, still interested in suggestions and comments. Thank you for your time.

@Ragazzo
Copy link
Contributor

Ragazzo commented Apr 22, 2014

are you sure that BaseListView still need renderErrors because this functionality only used with filter model and in ListView widget there is no such model?

@cebe
Copy link
Member

cebe commented Apr 22, 2014

Agree, this functionality is GridView specific so we do not need any code for it in BaseListView.

@Ragazzo
Copy link
Contributor

Ragazzo commented Apr 22, 2014

you should overwrite renderSection method with fallback of parent::renderSection, that would be better.

* - `{sorter}`: the sorter. See [[renderSorter()]].
* - `{pager}`: the pager. See [[renderPager()]].
*/
public $layout = "{summary}\n{errors}\n{items}\n{pager}";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain about that - should I place it here? It makes hard to overwrite the default by simply changing the BaseListView::$layout then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is okay if gridview has its own layout as its appearance is different anyway.

@cebe cebe self-assigned this Apr 22, 2014
cebe added a commit that referenced this pull request Apr 22, 2014
…or-indication

GridView filter error indication added (#3154)
@cebe cebe merged commit 6184134 into yiisoft:master Apr 22, 2014
@cebe
Copy link
Member

cebe commented Apr 22, 2014

Thanks!

@ivan-kolmychek ivan-kolmychek deleted the 3154-gridview-filter-error-indication branch April 23, 2014 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:to be verified Needs to be reproduced and validated. type:enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants