-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart Search - move Filters - v2 to correct merge conflict #8140
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
9a763fb
Smart Search - move Filters - v2 to correct merge conflict
2fe05b9
removed clearfix
64fae2e
Merge branch 'staging' of https://github.com/joomla/joomla-cms into s…
df5f6f2
corrected Select Branch filter
ef2c89b
Merge branch 'staging' of https://github.com/joomla/joomla-cms into s…
0f93069
changed default option value of filter_index.xml
fa198ab
fixed Select Branch dropdown in Smart Search Content Maps
26670dd
undoing: fixed Select Branch dropdown in Smart Search Content Maps
1a321f0
Merge branch 'staging' of https://github.com/joomla/joomla-cms into s…
069aa85
branches now retrieved via fields
b14cbd4
removed SQL query from fields/branches.php
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
administrator/components/com_finder/models/fields/branches.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_finder | ||
* | ||
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE | ||
*/ | ||
|
||
defined('JPATH_BASE') or die(); | ||
|
||
JFormHelper::loadFieldClass('list'); | ||
|
||
/** | ||
* Search Filter field for the Finder package. | ||
* | ||
* @since 3.5 | ||
*/ | ||
class JFormFieldBranches extends JFormFieldList | ||
{ | ||
/** | ||
* The form field type. | ||
* | ||
* @var string | ||
* @since 3.5 | ||
*/ | ||
protected $type = 'Branches'; | ||
|
||
/** | ||
* Method to get the field options. | ||
* | ||
* @return array The field option objects. | ||
* | ||
* @since 3.5 | ||
*/ | ||
public function getOptions() | ||
{ | ||
return JHtml::_('finder.mapslist'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
administrator/components/com_finder/models/forms/filter_filters.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<form> | ||
<fields name="filter"> | ||
<field | ||
name="search" | ||
type="text" | ||
label="COM_FINDER_FILTER_SEARCH_DESC" | ||
hint="JSEARCH_FILTER" | ||
/> | ||
<field | ||
name="state" | ||
type="status" | ||
filter="*,0,1" | ||
label="COM_FINDER_FILTER_PUBLISHED" | ||
description="COM_FINDER_FILTER_PUBLISHED_DESC" | ||
onchange="this.form.submit();" | ||
> | ||
<option value="">JOPTION_SELECT_PUBLISHED</option> | ||
</field> | ||
</fields> | ||
<fields name="list"> | ||
<field | ||
name="limit" | ||
type="limitbox" | ||
class="input-mini" | ||
default="25" | ||
label="COM_FINDER_LIST_LIMIT" | ||
description="COM_FINDER_LIST_LIMIT_DESC" | ||
onchange="this.form.submit();" | ||
/> | ||
</fields> | ||
</form> |
43 changes: 43 additions & 0 deletions
43
administrator/components/com_finder/models/forms/filter_index.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<form> | ||
<fields name="filter"> | ||
<field | ||
name="search" | ||
type="text" | ||
label="COM_FINDER_FILTER_SEARCH_DESC" | ||
hint="JSEARCH_FILTER" | ||
/> | ||
<field | ||
name="state" | ||
type="status" | ||
filter="*,0,1" | ||
label="COM_FINDER_FILTER_PUBLISHED" | ||
description="COM_FINDER_FILTER_PUBLISHED_DESC" | ||
onchange="this.form.submit();" | ||
> | ||
<option value="">JOPTION_SELECT_PUBLISHED</option> | ||
</field> | ||
<field | ||
name="type" | ||
type="sql" | ||
default="0" | ||
query="SELECT id AS value, title AS type FROM #__finder_types ORDER BY title" | ||
label="JOPTION_FILTER_CATEGORY" | ||
description="JOPTION_FILTER_CATEGORY_DESC" | ||
onchange="this.form.submit();" | ||
> | ||
<option value="">COM_FINDER_MAPS_SELECT_TYPE</option> | ||
</field> | ||
</fields> | ||
<fields name="list"> | ||
<field | ||
name="limit" | ||
type="limitbox" | ||
class="input-mini" | ||
default="25" | ||
label="COM_FINDER_LIST_LIMIT" | ||
description="COM_FINDER_LIST_LIMIT_DESC" | ||
onchange="this.form.submit();" | ||
/> | ||
</fields> | ||
</form> |
44 changes: 44 additions & 0 deletions
44
administrator/components/com_finder/models/forms/filter_maps.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<form> | ||
<fieldset addfieldpath="/administrator/components/com_templates/models/fields" /> | ||
|
||
<fields name="filter"> | ||
<field | ||
name="search" | ||
type="text" | ||
label="COM_FINDER_FILTER_SEARCH_DESC" | ||
hint="JSEARCH_FILTER" | ||
/> | ||
<field | ||
name="state" | ||
type="status" | ||
filter="*,0,1" | ||
label="COM_FINDER_FILTER_PUBLISHED" | ||
description="COM_FINDER_FILTER_PUBLISHED_DESC" | ||
onchange="this.form.submit();" | ||
> | ||
<option value="">JOPTION_SELECT_PUBLISHED</option> | ||
</field> | ||
|
||
<field | ||
name="branch" | ||
type="branches" | ||
default="0" | ||
onchange="this.form.submit();" | ||
> | ||
<option value="">COM_FINDER_MAPS_SELECT_BRANCHE</option> | ||
</field> | ||
|
||
</fields> | ||
<fields name="list"> | ||
<field | ||
name="limit" | ||
type="limitbox" | ||
class="input-mini" | ||
default="25" | ||
label="COM_FINDER_LIST_LIMIT" | ||
description="COM_FINDER_LIST_LIMIT_DESC" | ||
onchange="this.form.submit();" | ||
/> | ||
</fields> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,10 +33,12 @@ public function display($tpl = null) | |
FinderHelperLanguage::loadPluginLanguage(); | ||
|
||
// Load the view data. | ||
$this->items = $this->get('Items'); | ||
$this->total = $this->get('Total'); | ||
$this->items = $this->get('Items'); | ||
$this->total = $this->get('Total'); | ||
$this->pagination = $this->get('Pagination'); | ||
$this->state = $this->get('State'); | ||
$this->state = $this->get('State'); | ||
$this->filterForm = $this->get('FilterForm'); | ||
$this->activeFilters = $this->get('ActiveFilters'); | ||
|
||
FinderHelper::addSubmenu('maps'); | ||
|
||
|
@@ -92,20 +94,5 @@ protected function addToolbar() | |
JToolbarHelper::deleteList('', 'maps.delete'); | ||
JToolbarHelper::divider(); | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pe7er In your old PR this line is still there, should it remain or be removed? |
||
|
||
JHtmlSidebar::setAction('index.php?option=com_finder&view=maps'); | ||
|
||
JHtmlSidebar::addFilter( | ||
'', | ||
'filter_branch', | ||
JHtml::_('select.options', JHtml::_('finder.mapslist'), 'value', 'text', $this->state->get('filter.branch')), | ||
true | ||
); | ||
|
||
JHtmlSidebar::addFilter( | ||
JText::_('COM_FINDER_INDEX_FILTER_BY_STATE'), | ||
'filter_state', | ||
JHtml::_('select.options', JHtml::_('finder.statelist'), 'value', 'text', $this->state->get('filter.state')) | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have to put back the default value here?