? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
25 Apr 2016

Summary of Changes

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.

  1. 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"
    />
  2. 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>
  3. Now it can autodetect if the filters button "Search Tools" should exist or not.

  4. Removed all the, now not needed, searchtools backend layout overrides.

  5. As PoC i implemented, in this PR, the changes in all views that currently have a "selector":

    • com_menus items view: selector menutype
    • com_cache cache view: selector client_id
    • com_modules modules view (default and modal layout): selector client_id
    • com_languages installed view: selector client_id

    image

  6. Also, as PoC implemented it in (views without selector):

    • com_checkin checkin view
    • com_modules modules view (frontend popup)

    image

Testing Instructions

  1. Test if the searchtools work fine in the several views changed in this PR.
  2. Test if the searchtools work fine in some of the unchanged views (ex: articles, categories, etc).

Observations

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)); ?>
avatar andrepereiradasilva andrepereiradasilva - open - 25 Apr 2016
avatar andrepereiradasilva andrepereiradasilva - change - 25 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Apr 2016
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - change - 25 Apr 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 25 Apr 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 25 Apr 2016
The description was changed
avatar brianteeman brianteeman - change - 25 Apr 2016
Category Components UI/UX
avatar grhcj
grhcj - comment - 27 Apr 2016

@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:
item_view_10090
(com_menus items view)

avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Apr 2016

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.

avatar grhcj grhcj - test_item - 27 Apr 2016 - Tested successfully
avatar grhcj
grhcj - comment - 27 Apr 2016

I have tested this item :white_check_mark: 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.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10090.

avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Apr 2016

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.

avatar tomartailored tomartailored - test_item - 21 Jul 2016 - Tested successfully
avatar tomartailored
tomartailored - comment - 21 Jul 2016

I have tested this item successfully on eaf1f01

Tested successfully


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10090.

avatar brianteeman brianteeman - change - 28 Jul 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 28 Jul 2016

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10090.

avatar brianteeman brianteeman - change - 2 Sep 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 Sep 2016
Category Components UI/UX Administration Components Front End Layout UI/UX
avatar brianteeman brianteeman - change - 2 Sep 2016
Milestone Added:
avatar wilsonge
wilsonge - comment - 4 Sep 2016

Can we fix conflicts please

avatar rdeutz
rdeutz - comment - 10 Sep 2016

@wilsonge shouldn't we change the base branch when they are conflicts so the conflicts are fixed in the right branch and you can merge it straight into the branch?

avatar wilsonge
wilsonge - comment - 18 Sep 2016

Yup. Branch changed. @andrepereiradasilva sorry to do this to you!

avatar rdeutz
rdeutz - comment - 1 Oct 2016

@andrepereiradasilva could you have a look at the conflicts and resolve them, thanks!

avatar zero-24 zero-24 - change - 3 Oct 2016
Labels Added: ?
Removed: ?
avatar brianteeman brianteeman - change - 29 Oct 2016
Labels Added: ?
Removed: ?
avatar zero-24
zero-24 - comment - 21 Dec 2016

@andrepereiradasilva If you get a minute or two?

avatar joomla-cms-bot joomla-cms-bot - change - 2 Jan 2017
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
avatar rdeutz rdeutz - change - 2 Jan 2017
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
avatar rdeutz rdeutz - close - 2 Jan 2017
avatar rdeutz rdeutz - merge - 2 Jan 2017
avatar infograf768
infograf768 - comment - 4 Jan 2017

REGRESSION:
Look at #13470

avatar infograf768
infograf768 - comment - 4 Jan 2017

Hmm, looks like some files have to be deleted for the new feature to work. Closing this.

avatar infograf768
infograf768 - comment - 9 Jan 2017

@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

avatar infograf768
infograf768 - comment - 9 Jan 2017

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

avatar infograf768
infograf768 - comment - 9 Jan 2017

OK, found out the way, no worry

Add a Comment

Login with GitHub to post a comment