feature:2264
Modify triggers for prefilters: there is now two triggers. Order prefilters by alphabetic order. git-svn-id: http://piwigo.org/svn/trunk@10380 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
fda50a256b
commit
22fd670ad5
3 changed files with 25 additions and 12 deletions
|
|
@ -250,7 +250,7 @@ SELECT id
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$filter_sets = trigger_event('bulk_manager_prefilter', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']);
|
$filter_sets = trigger_event('perform_batch_manager_prefilters', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($_SESSION['bulk_manager_filter']['category']))
|
if (isset($_SESSION['bulk_manager_filter']['category']))
|
||||||
|
|
|
||||||
|
|
@ -404,8 +404,30 @@ $template->set_filenames(array('batch_manager_global' => 'batch_manager_global.t
|
||||||
|
|
||||||
$base_url = get_root_url().'admin.php';
|
$base_url = get_root_url().'admin.php';
|
||||||
|
|
||||||
|
$prefilters = array();
|
||||||
|
|
||||||
|
array_push($prefilters,
|
||||||
|
array('ID' => 'caddie', 'NAME' => l10n('caddie')),
|
||||||
|
array('ID' => 'last import', 'NAME' => l10n('last import')),
|
||||||
|
array('ID' => 'with no album', 'NAME' => l10n('with no album')),
|
||||||
|
array('ID' => 'with no tag', 'NAME' => l10n('with no tag')),
|
||||||
|
array('ID' => 'duplicates', 'NAME' => l10n('duplicates')),
|
||||||
|
array('ID' => 'all photos', 'NAME' => l10n('All'))
|
||||||
|
);
|
||||||
|
|
||||||
|
if ($conf['enable_synchronization'])
|
||||||
|
{
|
||||||
|
array_push($prefilters,
|
||||||
|
array('ID' => 'with no virtual album', 'NAME' => l10n('with no virtual album'))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
$prefilters = trigger_event('get_batch_manager_prefilters', $prefilters);
|
||||||
|
usort($prefilters, 'UC_name_compare');
|
||||||
|
|
||||||
$template->assign(
|
$template->assign(
|
||||||
array(
|
array(
|
||||||
|
'prefilters' => $prefilters,
|
||||||
'filter' => $_SESSION['bulk_manager_filter'],
|
'filter' => $_SESSION['bulk_manager_filter'],
|
||||||
'selection' => $collection,
|
'selection' => $collection,
|
||||||
'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')),
|
'U_DISPLAY'=>$base_url.get_query_string_diff(array('display')),
|
||||||
|
|
|
||||||
|
|
@ -330,17 +330,8 @@ jQuery(window).load(function() {
|
||||||
<input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
|
<input type="checkbox" name="filter_prefilter_use" class="useFilterCheckbox" {if isset($filter.prefilter)}checked="checked"{/if}>
|
||||||
{'predefined filter'|@translate}
|
{'predefined filter'|@translate}
|
||||||
<select name="filter_prefilter">
|
<select name="filter_prefilter">
|
||||||
<option value="caddie" {if $filter.prefilter eq 'caddie'}selected="selected"{/if}>{'caddie'|@translate}</option>
|
{foreach from=$prefilters item=prefilter}
|
||||||
<option value="last import" {if $filter.prefilter eq 'last import'}selected="selected"{/if}>{'last import'|@translate}</option>
|
<option value="{$prefilter.ID}" {if $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option>
|
||||||
<option value="with no album" {if $filter.prefilter eq 'with no album'}selected="selected"{/if}>{'with no album'|@translate}</option>
|
|
||||||
{if $ENABLE_SYNCHRONIZATION}
|
|
||||||
<option value="with no virtual album" {if $filter.prefilter eq 'with no virtual album'}selected="selected"{/if}>{'with no virtual album'|@translate}</option>
|
|
||||||
{/if}
|
|
||||||
<option value="with no tag" {if $filter.prefilter eq 'with no tag'}selected="selected"{/if}>{'with no tag'|@translate}</option>
|
|
||||||
<option value="duplicates" {if $filter.prefilter eq 'duplicates'}selected="selected"{/if}>{'duplicates'|@translate}</option>
|
|
||||||
<option value="all photos" {if $filter.prefilter eq 'all photos'}selected="selected"{/if}>{'All'|@translate}</option>
|
|
||||||
{foreach from=$bulk_manager_plugins_prefilters item=plugin_prefilter}
|
|
||||||
<option value="{$plugin_prefilter.ID}" {if $filter.prefilter eq $plugin_prefilter.ID}selected="selected"{/if}>{$plugin_prefilter.NAME}</option>
|
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue