? ? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
22 Apr 2016

Summary of Changes

This PR normalizes this view by adding the ordering to the searchtools in com_finder filters view.

Also:

  • Corrects some bugs in the searchtools (for instance, on select the state filter is not selected, ordering by type is wrong).
  • Some code style improvements.
  • Some code improvements.
  • Normalizes layout with other views.
  • Moves messages to the view.html file.
  • Improves the mobile/tablet views.
Before PR

image

After PR

image

Testing Instructions

  1. Use latest staging and apply patch
  2. Go to Components -> Smart Search
  3. Press Index
  4. Test if search, filters, ordering and page limit (aka searchtools) are working properly.
  5. Test in mobile and tablet views.
avatar andrepereiradasilva andrepereiradasilva - open - 22 Apr 2016
avatar andrepereiradasilva andrepereiradasilva - change - 22 Apr 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Apr 2016
Labels Added: ? ?
avatar brianteeman
brianteeman - comment - 22 Apr 2016

Presumably there was a specific reason for the full non-sef url being presented @chrisdavenport

avatar andrepereiradasilva andrepereiradasilva - change - 22 Apr 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 22 Apr 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 22 Apr 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - change - 22 Apr 2016
The description was changed
a8813db 22 Apr 2016 avatar andrepereiradasilva cs
avatar mbabker
mbabker - comment - 22 Apr 2016

Generating front-end SEF URLs for display in the admin involves some trickery. You can't use JRoute::_() to do it because of the coupling to JFactory::getApplication(). This method will do the trick if you really wanted to show SEF URLs:

/**
 * Replacement for JRoute::_() for routing from Joomla's backend
 *
 * @param   string  $url  The URL to process
 *
 * @return  string  The routed URL
 */
public static function getFrontendRoute($url)
{
    // Get the router.
    $router = JApplicationCms::getInstance('site')->getRouter();

    // Make sure that we have our router
    if (!$router)
    {
        return null;
    }

    if ((strpos($url, '&') !== 0) && (strpos($url, 'index.php') !== 0))
    {
        return $url;
    }

    // Build route.
    $uri = $router->build($url);
    $url = $uri->toString(['path', 'query', 'fragment']);

    // Replace spaces.
    $url = preg_replace('/\s/u', '%20', $url);

    // Replace '/administrator'
    $url = str_replace('/administrator', '', $url);

    $url = htmlspecialchars($url);

    return $url;
}
avatar andrepereiradasilva
andrepereiradasilva - comment - 22 Apr 2016

@mbabker yeah i notice that.

Could the php 5.3 version of that method be in https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/router/administrator.php?

avatar brianteeman brianteeman - change - 22 Apr 2016
Category Components Language & Strings UI/UX
avatar brianteeman brianteeman - change - 22 Apr 2016
Labels
avatar andrepereiradasilva andrepereiradasilva - change - 22 Apr 2016
Labels
avatar chrisdavenport
chrisdavenport - comment - 22 Apr 2016

Presumably there was a specific reason for the full non-sef url being presented @chrisdavenport

Both SEF and non-SEF URLs would be useful during debugging. Since this component originates from something that was originally written for Joomla 1.5, I suspect that the non-SEF link was shown mainly because the SEF link was hard to reliably generate.

avatar chrisdavenport
chrisdavenport - comment - 22 Apr 2016

@andrepereiradasilva While you're messing with this component, there is a small issue that I noticed a while back that you can probably fix at the same time:

If you use Search Tools to make some selection which results in an empty list, you will see this message: "No content has been indexed. Start the indexer by pressing the Index button in the toolbar." which is actually wrong in that context.

avatar mbabker
mbabker - comment - 22 Apr 2016

Could the php 5.3 version of that method be in https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/router/administrator.php?

I'd throw it in JRoute instead of JRouterAdministrator personally. I'd also battle test it a bit harder than I did with my hack (if you ever get a frontend path with /administrator in it that'll get string replaced and it doesn't cope with the HTTP(S) detection like JRoute::_() does. Otherwise, it's GPL code ripped off from a GPL project, do as you please ????

avatar andrepereiradasilva
andrepereiradasilva - comment - 22 Apr 2016

@chrisdavenport, i solved that now. this is how it looks after the latest commit

Without index

image

With index

image

@mbabker thanks, i will check that later

avatar chrisdavenport chrisdavenport - test_item - 22 Apr 2016 - Tested successfully
avatar chrisdavenport
chrisdavenport - comment - 22 Apr 2016

I have tested this item :white_check_mark: successfully on f56c2d6


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

avatar brianteeman brianteeman - test_item - 23 Apr 2016 - Tested successfully
avatar brianteeman
brianteeman - comment - 23 Apr 2016

I have tested this item :white_check_mark: successfully on f56c2d6


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

avatar brianteeman brianteeman - change - 23 Apr 2016
Status Pending Ready to Commit
Labels
avatar brianteeman
brianteeman - comment - 23 Apr 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 23 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 23 Apr 2016
Milestone Added:
avatar rdeutz rdeutz - close - 23 Apr 2016
avatar rdeutz rdeutz - reference | e535020 - 23 Apr 16
avatar rdeutz rdeutz - merge - 23 Apr 2016
avatar rdeutz rdeutz - change - 23 Apr 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-04-23 12:35:14
Closed_By rdeutz
avatar andrepereiradasilva andrepereiradasilva - head_ref_deleted - 23 Apr 2016
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Added:
avatar rdeutz rdeutz - change - 1 May 2016
Milestone Removed:
avatar brianteeman brianteeman - change - 11 May 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment