Feature request - option to put filters above the list view table #378
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#378
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Would it be possible to add an option to JCB where to place a filter?
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.
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.
@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.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 offilter_viewsname
since the method in theListModel
class will then pick up the fields/file and build the form.Then in the
tmpl default.php
we then load the filters withJLayoutHelper::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.
Thanks Llewellyn will have a look into it tomorrow.
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.
I will dive into it tommorrow
Verstuurd vanaf mijn iPhone
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 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.
@studio16 you can see the correct implementation in this pull request from @vistamedia
I will work on the integration with the compiler now.
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 ;)
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 👍
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.
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!!!!
Great will Check it asap
Met vriendelijke groeten,
Ivo Huissen
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.
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?
@vistamedia I updated the language selection strings and this should fix the issue 👍 let me know