Changeset 10381


Ignore:
Timestamp:
04/15/11 14:08:56 (7 years ago)
Author:
patdenice
Message:

merge r10380 from trunk to branch 2.2
feature:2264
Modify triggers for prefilters: there is now two triggers.
Order prefilters by alphabetic order.

Location:
branches/2.2/admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/admin/batch_manager.php

    r10355 r10381  
    251251  } 
    252252 
    253   $filter_sets = trigger_event('bulk_manager_prefilter', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']); 
     253  $filter_sets = trigger_event('perform_batch_manager_prefilters', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']); 
    254254} 
    255255 
  • branches/2.2/admin/batch_manager_global.php

    r10009 r10381  
    405405$base_url = get_root_url().'admin.php'; 
    406406 
     407$prefilters = array(); 
     408 
     409array_push($prefilters, 
     410  array('ID' => 'caddie', 'NAME' => l10n('caddie')), 
     411  array('ID' => 'last import', 'NAME' => l10n('last import')), 
     412  array('ID' => 'with no album', 'NAME' => l10n('with no album')), 
     413  array('ID' => 'with no tag', 'NAME' => l10n('with no tag')), 
     414  array('ID' => 'duplicates', 'NAME' => l10n('duplicates')), 
     415  array('ID' => 'all photos', 'NAME' => l10n('All')) 
     416); 
     417 
     418if ($conf['enable_synchronization']) 
     419{ 
     420  array_push($prefilters, 
     421    array('ID' => 'with no virtual album', 'NAME' => l10n('with no virtual album')) 
     422  ); 
     423} 
     424 
     425$prefilters = trigger_event('get_batch_manager_prefilters', $prefilters); 
     426usort($prefilters, 'UC_name_compare'); 
     427 
    407428$template->assign( 
    408429  array( 
     430    'prefilters' => $prefilters, 
    409431    'filter' => $_SESSION['bulk_manager_filter'], 
    410432    'selection' => $collection, 
  • branches/2.2/admin/themes/default/template/batch_manager_global.tpl

    r10355 r10381  
    331331        {'predefined filter'|@translate} 
    332332        <select name="filter_prefilter"> 
    333           <option value="caddie" {if $filter.prefilter eq 'caddie'}selected="selected"{/if}>{'caddie'|@translate}</option> 
    334           <option value="last import" {if $filter.prefilter eq 'last import'}selected="selected"{/if}>{'last import'|@translate}</option> 
    335           <option value="with no album" {if $filter.prefilter eq 'with no album'}selected="selected"{/if}>{'with no album'|@translate}</option> 
    336 {if $ENABLE_SYNCHRONIZATION} 
    337           <option value="with no virtual album" {if $filter.prefilter eq 'with no virtual album'}selected="selected"{/if}>{'with no virtual album'|@translate}</option> 
    338 {/if} 
    339           <option value="with no tag" {if $filter.prefilter eq 'with no tag'}selected="selected"{/if}>{'with no tag'|@translate}</option> 
    340           <option value="duplicates" {if $filter.prefilter eq 'duplicates'}selected="selected"{/if}>{'duplicates'|@translate}</option> 
    341           <option value="all photos" {if $filter.prefilter eq 'all photos'}selected="selected"{/if}>{'All'|@translate}</option> 
    342           {foreach from=$bulk_manager_plugins_prefilters item=plugin_prefilter} 
    343           <option value="{$plugin_prefilter.ID}" {if $filter.prefilter eq $plugin_prefilter.ID}selected="selected"{/if}>{$plugin_prefilter.NAME}</option> 
     333          {foreach from=$prefilters item=prefilter} 
     334          <option value="{$prefilter.ID}" {if $filter.prefilter eq $prefilter.ID}selected="selected"{/if}>{$prefilter.NAME}</option> 
    344335          {/foreach} 
    345336        </select> 
Note: See TracChangeset for help on using the changeset viewer.