User tests: Successful: Unsuccessful:
In sequence of #9738, this PR does some improvements to searchtools with the goal of providing more flexibility and to remove all backend searchtools layout overrides.
Adds a attribute noresults
to the search field in the filter fields xml. This attribute contains the language string of the no results message of the searchtools
Example:
<field
name="search"
type="text"
label="JSEARCH_FILTER"
description="JSEARCH_FILTER"
hint="JSEARCH_FILTER"
noresults="COM_CHECKIN_NO_ITEMS"
/>
Adds a attribute layout
to the selector field in the filter fields xml. This attribute contains the layout where the field should be rendered (no attribute for all). This is useful for views that have 2 layouts. example modules has default layout and modal layout.
Adds also a attribute filtermode
to the selector field in the filter fields xml. This attribute has only one value selector
. This is used to identify which field is the selector, when exists.
Example:
<field
name="client_id"
type="list"
onchange="this.form.submit();"
filtermode="selector"
layout="default"
>
<option value="0">JSITE</option>
<option value="1">JADMINISTRATOR</option>
</field>
Now it can autodetect if the filters button "Search Tools" should exist or not.
Removed all the, now not needed, searchtools backend layout overrides.
As PoC i implemented, in this PR, the changes in all views that currently have a "selector":
Also, as PoC implemented it in (views without selector):
After, and if, this is merged i will change all the other views to use this new searchtools model, by replacing something like this:
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => false))); ?>
<div class="clearfix"></div>
<?php if (empty($this->items)) : ?>
<div class="alert alert-no-items">
<?php echo JText::_('COM_CHECKIN_NO_ITEMS'); ?>
</div>
By this (moving also the no results message to the xml file noresults="COM_CHECKIN_NO_ITEMS"
)
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this)); ?>
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Category | ⇒ | Components UI/UX |
did you refreshed the browser cache? (sorry for the lack of that in the test instructions)
the searchtools css was modified to centralize that css (https://github.com/joomla/joomla-cms/pull/10090/files#diff-df9a9362098cb8fae66146329910baa3R22) and remove it from the searchtools layout overrides.
I have tested this item successfully on eaf1f01
I should always clear the cache if something seems to be wrong :)
Yes, refreshing the browser cache helped.
Sorry and thanks for remembering.
IMO the browser cache thing is something Joomla should improve.
Joomla shouldn't force users to clean their browser cache on update. All static files (css, js and image, fonts, etc) should have versions, so their version change on update.
I opened an issue for that some time ago #9638 but no volunteers for that task.
I have tested this item
Tested successfully
Status | Pending | ⇒ | Ready to Commit |
Labels |
Added:
?
|
Category | Components UI/UX | ⇒ | Administration Components Front End Layout UI/UX |
Milestone |
Added: |
Can we fix conflicts please
Yup. Branch changed. @andrepereiradasilva sorry to do this to you!
@andrepereiradasilva could you have a look at the conflicts and resolve them, thanks!
Labels |
Added:
?
Removed: ? |
Labels |
Added:
?
Removed: ? |
@andrepereiradasilva If you get a minute or two?
Category | Components UI/UX Administration Front End Layout | ⇒ | Administration com_admin com_cache com_checkin com_languages com_menus com_modules Front End Layout Components UI/UX |
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-02 19:47:35 |
Closed_By | ⇒ | rdeutz |
Hmm, looks like some files have to be deleted for the new feature to work. Closing this.
@andrepereiradasilva
Robert is redoing com_associations and we have a B/C issue
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this, 'options' => array('filterButton' => !is_null($this->itemType)))); ?>
does not work anymore.
If I exchange the new bar.php and default.php with the old ones, it works again
I tested using this code in the xml and in the default tmpl but it looks like it is working only when ONE 'selectorFieldName' , i.e. I can't use it when I have 2 selectors...
OK, found out the way, no worry
@andrepereiradasilva All well from my point of view, except one thing: After applying this PR, dropdowns being next to the search field before are now above:
(com_menus items view)