Feature request - option to put filters above the list view table #378

Closed
opened 2019-02-22 09:46:24 +00:00 by renekreijveld · 25 comments
renekreijveld commented 2019-02-22 09:46:24 +00:00 (Migrated from github.com)

In newer Joomla versions nowadays list view filters are placed above the list view table instead of in the left column left of the list view table. The filters become visible by clicking on a Search Tools button. (see for example a standard backend categories view:
index.php?option=com_categories&extension=com_content

image

Would it be possible to add an option to JCB where to place a filter?

In newer Joomla versions nowadays list view filters are placed above the list view table instead of in the left column left of the list view table. The filters become visible by clicking on a Search Tools button. (see for example a standard backend categories view: index.php?option=com_categories&extension=com_content ![image](https://user-images.githubusercontent.com/522849/53234171-3e013300-368f-11e9-8985-94876f391358.png) Would it be possible to add an option to JCB where to place a filter?
mwweb commented 2019-02-22 10:13:09 +00:00 (Migrated from github.com)

I was thinking about this myself earlier today. Ther above list views would keep the look standardized with joomla.

I was thinking about this myself earlier today. Ther above list views would keep the look standardized with joomla.

Thanks for opening this as per our chat on the google group. Will take a look soon as I can.

Thanks for opening this as per our chat on the [google group](https://groups.google.com/a/vdm.io/forum/#!topic/jcb/6Kg6pzSjSx0). Will take a look soon as I can.
jcodewalker commented 2019-04-10 08:15:41 +00:00 (Migrated from github.com)

The filters on the left let you have them always under your eyes, not to mention having 8 filters (like in fields view) on top of the page is a mess from my personal point of view.
Joomla! is content management system, not a development system... so standardizing to the user layout could not be the best for development environment (still my personal point of view, no offense).
I would prefer to keep this layout and save time.

The filters on the left let you have them always under your eyes, not to mention having 8 filters (like in fields view) on top of the page is a mess from my personal point of view. Joomla! is content management system, not a development system... so standardizing to the user layout could not be the best for development environment (still my personal point of view, no offense). I would prefer to keep this layout and save time.

When I get to add this, I will leave both options available. The default will remain the way it works now.

So like most improvements in JCB, we do not want to lose what already works... just add more.

When I get to add this, I will leave both options available. The default will remain the way it works now. So like most improvements in JCB, we do not want to lose what already works... just add more.

@renekreijveld just a few notes worth mentioning. JCB is still using an old way of building the filters, where the new xml file way seems much easier to automate. So adding or adapting to the newer implementation is not that hard.

I have scanned over the article mangers implementation of this and want to make sure I follow the logic or convention if you will. So please help me if I missed something.

Bascily there is a new xml file with all the static filters as normal fields notated with a few extras like onchange="this.form.submit();" and a search field of course.

<field
	name="search"
	type="text"
	label="COM_CONTENT_FILTER_SEARCH_LABEL"
	description="COM_CONTENT_FILTER_SEARCH_DESC"
	hint="JSEARCH_FILTER"
/>

Okay in the view.html.php we simply now have this call $this->filterForm = $this->get('FilterForm'); and $this->activeFilters = $this->get('ActiveFilters'); which basically gets the form based on this new xml file. Which by the way has a naming convention of filter_viewsname since the method in the ListModel class will then pick up the fields/file and build the form.

Then in the tmpl default.php we then load the filters with JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)) and that is the basic total of snippets needed.

I did see the option to dynamically based on other needs add more fields like language.

So if you look at the current way JCB builds filters is much more complex and indeed the new way seems straightforward and easy.

I have not fully tested these changes, but as a 10 minutes overview I am wondering if you can give more input to insure when I do add this I am fully aware of any tricks I may have overlooked at first glance.

@renekreijveld just a few notes worth mentioning. JCB is still using an old way of building the filters, where the new xml file way seems much easier to automate. So adding or adapting to the newer implementation is not that hard. I have scanned over the article mangers implementation of this and want to make sure I follow the logic or convention if you will. So please help me if I missed something. Bascily there is a new xml file with all the static filters as normal fields notated with a few extras like `onchange="this.form.submit();"` and a search field of course. ``` <field name="search" type="text" label="COM_CONTENT_FILTER_SEARCH_LABEL" description="COM_CONTENT_FILTER_SEARCH_DESC" hint="JSEARCH_FILTER" /> ``` Okay in the view.html.php we simply now have this call `$this->filterForm = $this->get('FilterForm');` and `$this->activeFilters = $this->get('ActiveFilters');` which basically gets the form based on this new xml file. Which by the way has a naming convention of `filter_viewsname` since the method in the `ListModel` class will then pick up the fields/file and build the form. Then in the `tmpl default.php` we then load the filters with `JLayoutHelper::render('joomla.searchtools.default', array('view' => $this))` and that is the basic total of snippets needed. I did see the option to dynamically based on other needs add more fields like language. So if you look at the current way JCB builds filters is much more complex and indeed the new way seems straightforward and easy. I have not fully tested these changes, but as a 10 minutes overview I am wondering if you can give more input to insure when I do add this I am fully aware of any tricks I may have overlooked at first glance.
renekreijveld commented 2019-04-11 12:23:38 +00:00 (Migrated from github.com)

Thanks Llewellyn will have a look into it tomorrow.

Thanks Llewellyn will have a look into it tomorrow.
studio16 commented 2020-09-03 16:13:20 +00:00 (Migrated from github.com)

what happend to this issue, is there a way throught the builder to have the filterlike the Joomla core search tools filters?
or do i have to add it manually via the xml form?

what happend to this issue, is there a way throught the builder to have the filterlike the Joomla core search tools filters? or do i have to add it manually via the xml form?

Hi @studio16 this has not happened as yet. I have been asking for help, but nothing has actually been forth coming. My investigation proved the new filter path is far easier actually, but I have just not have time to fully code this up.

So if you are willing to help let me know, and then please read the above post. You could take any of the demo components like SD, and code this in to one admin view and make a pull request (this veiw needs to have a few custom filters of course). I will then be able to see what changed and add it to JCB. This part I will do, I just need someone to do the work of adding it manually to a repository that still uses the old method, so I can see what are all the changes needed.

Once this is done it will take just a few days to add it to JCB, and then we can choose between the filter options. Either to use the old path, or the new in each admin view or per/component or globally.

Hi @studio16 this has not happened as yet. I have been asking for help, but nothing has actually been forth coming. My investigation proved the new filter path is far easier actually, but I have just not have time to fully code this up. So if you are willing to help let me know, and then please read [the above post](https://github.com/vdm-io/Joomla-Component-Builder/issues/378#issuecomment-482091104). You could take any of the demo components like [SD](https://github.com/SermonDistributor/Joomla-3-Component), and code this in to one admin view and make a pull request (this veiw needs to have a few custom filters of course). I will then be able to see what changed and add it to JCB. This part I will do, I just need someone to do the work of adding it manually to a repository that still uses the old method, so I can see what are all the changes needed. Once this is done it will take just a few days to add it to JCB, and then we can choose between the filter options. Either to use the old path, or the new in each admin view or per/component or globally.
studio16 commented 2020-09-06 18:24:11 +00:00 (Migrated from github.com)

I will dive into it tommorrow

Verstuurd vanaf mijn iPhone

Op 6 sep. 2020 om 18:35 heeft Llewellynvdm notifications@github.com het volgende geschreven:


Hi @studio16 this has not happened as yet. I have been asking for help, but nothing has actually been forth coming. My investigation proved the new filter path is far easier actually, but I have just not have time to fully code this up.

So if you are willing to help let me know, and then please read the above post. You could take any of the demo components like SD, and code this in to one admin view and make a pull request (this veiw needs to have a few custom filters of course). I will then be able to see what changed and add it to JCB. This part I will do, I just need someone to do the work of adding it manually to a repository that still uses the old method, so I can see what are all the changes needed.

Once this is done it will take just a few days to add it to JCB, and then we can choose between the filter options. Either to use the old path, or the new in each admin view or per/component or globally.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.

I will dive into it tommorrow Verstuurd vanaf mijn iPhone > Op 6 sep. 2020 om 18:35 heeft Llewellynvdm <notifications@github.com> het volgende geschreven: > >  > Hi @studio16 this has not happened as yet. I have been asking for help, but nothing has actually been forth coming. My investigation proved the new filter path is far easier actually, but I have just not have time to fully code this up. > > So if you are willing to help let me know, and then please read the above post. You could take any of the demo components like SD, and code this in to one admin view and make a pull request (this veiw needs to have a few custom filters of course). I will then be able to see what changed and add it to JCB. This part I will do, I just need someone to do the work of adding it manually to a repository that still uses the old method, so I can see what are all the changes needed. > > Once this is done it will take just a few days to add it to JCB, and then we can choose between the filter options. Either to use the old path, or the new in each admin view or per/component or globally. > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub, or unsubscribe.
studio16 commented 2020-09-09 16:08:46 +00:00 (Migrated from github.com)

Were the updated files any help to you guys?

Were the updated files any help to you guys?

Hi, thanks I received the file, but have not had the time to have a look, will do so in the next few days and revert back to you here.

Hi, thanks I received the file, but have not had the time to have a look, will do so in the next few days and revert back to you here.
studio16 commented 2020-11-06 18:13:15 +00:00 (Migrated from github.com)

Hi it has been 2 months now that i gave u the joomla code to add this to JCb, what is the status?

Hi it has been 2 months now that i gave u the joomla code to add this to JCb, what is the status?

I have not manage to get to this yet... I saw your email again just yesterday and looked over some of the code, but I am actually also waiting for another developer @vistamedia who also has done much work in this area to get back to me.

Then as a side note, the changes you send me is not the direction I see Joomla take, they have moved all the fields to an XML file and cut down on the PHP code needed to make this work. I explained it earlier in this issue.

I have not manage to get to this yet... I saw your email **again** just yesterday and looked over some of the code, but I am actually also waiting for another developer @vistamedia who also has done much work in this area to get back to me. Then as a side note, the changes you send me is not the direction I see Joomla take, they have moved all the fields to an XML file and cut down on the PHP code needed to make this work. I explained it earlier in this issue.

@studio16 you can see the correct implementation in this pull request from @vistamedia

I will work on the integration with the compiler now.

@studio16 you can see the correct implementation in [this pull request](https://github.com/Llewellynvdm/Joomla-Sermon-Distributor/pull/33/files) from @vistamedia I will work on the integration with the compiler now.
studio16 commented 2020-11-14 09:41:44 +00:00 (Migrated from github.com)

The implementation itself wasn’t my issue, already did this many times. Question was when it will be implemented in jcb itself.

Thanks anyway for the update.

The implementation itself wasn’t my issue, already did this many times. Question was when it will be implemented in jcb itself. Thanks anyway for the update.

This part mean I am going to implement it into JCB itself ;)

I will work on the integration with the compiler now.

This part mean I am going to implement it into JCB itself ;) > I will work on the integration with the compiler now.

The implementation itself wasn’t my issue, already did this many times.

The code you send me is not the same as what @vistamedia has done, his implementation is making use of the new XML fields approach, and if you read this issues first posts, then you will see that is what I was asking @renekreijveld to do. I also explained I did not have the time to fully implement the whole transition, and was asking for someone to do that. Not just to move the filter to the top, but to go over to the new Joomla filtertools.

Anyway... I am working on adding this to JCB so all components can make use of this path for filters instead/as-well 👍

> The implementation itself wasn’t my issue, already did this many times. The code you send me is not the same as what @vistamedia has done, his implementation is making use of the new XML fields approach, and if you read this issues first posts, then you will see that is what I was asking @renekreijveld to do. I also explained I did not have the time to fully implement the whole transition, and was asking for someone to do that. Not just to move the filter to the top, but to go over to the new Joomla filtertools. Anyway... I am working on adding this to JCB so all components can make use of this path for filters instead/as-well :+1:
studio16 commented 2020-11-14 17:06:54 +00:00 (Migrated from github.com)

I did use the xml fields

Met vriendelijke groeten,

Ivo Huissen

I did use the xml fields Met vriendelijke groeten, Ivo Huissen

I am nearly finished with the changes needed in the compiler 👍

At this point 95% of the work is done, just a few more tweaks and we can start testing the new filters above the list view on the Joomla-Sermon-Distributor component.

@vistamedia there where a few unexpected hurdles that has been quite precarious... like when radio buttons are used as filters, and text fields. The whole batch integration had to be decoupled from the filters side in the compiler. I also had to move a number of static code... that use to never change into the the compiler.

The current staging branch should work for the normal old path of sidebar filters, so that part can be tested. Well in fact JCB it self has now been compiled with the change compiler, but still with the old implementation.

I am nearly finished with the changes needed in the compiler :+1: At this point 95% of the work is done, just a few more tweaks and we can start testing the new filters above the list view on the [Joomla-Sermon-Distributor](https://github.com/Llewellynvdm/Joomla-Sermon-Distributor) component. @vistamedia there where a few unexpected hurdles that has been quite precarious... like when radio buttons are used as filters, and text fields. The whole batch integration had to be decoupled from the filters side in the compiler. I also had to move a number of static code... that use to never change into the the compiler. The current staging branch should work for the normal old path of sidebar filters, so that part can be tested. Well in fact JCB it self has now been compiled with the change compiler, but still with the old implementation.

Okay @renekreijveld @mwweb @jcodewalker @studio16 @vistamedia The JCB staging branch is ready for testing the new filters. To use the new filters, there is an extra option now showing when adding a view to a component, and also when adding a field to a view. Let me know if you have any questions... feedback welcome!

Okay @renekreijveld @mwweb @jcodewalker @studio16 @vistamedia The JCB staging branch is ready for testing the new filters. To use the new filters, there is an extra option now showing when adding a view to a component, and also when adding a field to a view. Let me know if you have any questions... feedback welcome!

The SD component has been compiled with the new feature, all is working as expected 👍 .

Thank you everyone for your help!!!!

The [SD component](https://github.com/Llewellynvdm/Joomla-Sermon-Distributor/commit/e726e758b414eb862eac23b7285a8b2058a86a8f) has been compiled with the new feature, all is working as expected :+1: . Thank you everyone for your help!!!!
studio16 commented 2020-11-30 18:11:04 +00:00 (Migrated from github.com)

Great will Check it asap

Met vriendelijke groeten,

Ivo Huissen

Great will Check it asap Met vriendelijke groeten, Ivo Huissen
vistamedia commented 2020-12-01 07:16:11 +00:00 (Migrated from github.com)

I updated my sermon distributor instance and everything works as expected. The only little thing I noticed is the label of the states and categories filters.
2020-12-01_08-05-56
Thanks a lot Llewellyn, I can't wait to recompile all my components ;-)

I updated my sermon distributor instance and everything works as expected. The only little thing I noticed is the label of the states and categories filters. ![2020-12-01_08-05-56](https://user-images.githubusercontent.com/9335926/100708873-5d250c80-33ad-11eb-9505-9dd5230a2ccb.jpeg) Thanks a lot Llewellyn, I can't wait to recompile all my components ;-)

Hmmm strange... I am using the default placeholders from your example... maybe I should use the JCB generated once instead?

Hmmm strange... I am using the [default placeholders](https://github.com/vdm-io/Joomla-Component-Builder/blob/staging/admin/helpers/compiler/c_Fields.php#L5633) from [your example](https://github.com/Llewellynvdm/Joomla-Sermon-Distributor/pull/33/files#diff-441b194d07973c10503881860bab8f1d4cf644286dc40c446b8aa45429c57a2eR30)... maybe I should use the JCB generated once instead?

@vistamedia I updated the language selection strings and this should fix the issue 👍 let me know

@vistamedia I updated the language selection strings and this should fix the issue :+1: let me know
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joomla/Component-Builder#378
No description provided.