Changeset 10354 for trunk


Ignore:
Timestamp:
Apr 13, 2011, 3:16:38 PM (13 years ago)
Author:
patdenice
Message:

feature:2264
new trigger to add prefilter on batch manager

Location:
trunk/admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/batch_manager.php

    r9912 r10354  
    5656  if (isset($_POST['filter_prefilter_use']))
    5757  {
    58     $prefilters = array('caddie', 'last import', 'with no album', 'with no tag', 'with no virtual album', 'duplicates', 'all photos');
    59     if (in_array($_POST['filter_prefilter'], $prefilters))
    60     {
    61       $_SESSION['bulk_manager_filter']['prefilter'] = $_POST['filter_prefilter'];
    62     }
     58    $_SESSION['bulk_manager_filter']['prefilter'] = $_POST['filter_prefilter'];
    6359  }
    6460
     
    254250      );
    255251  }
     252
     253  $filter_sets = trigger_event('bulk_manager_prefilter', $filter_sets, $_SESSION['bulk_manager_filter']['prefilter']);
    256254}
    257255
  • trunk/admin/themes/default/template/batch_manager_global.tpl

    r10164 r10354  
    340340          <option value="duplicates" {if $filter.prefilter eq 'duplicates'}selected="selected"{/if}>{'duplicates'|@translate}</option>
    341341          <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>
     344          {/foreach}
    342345        </select>
    343346      </li>
Note: See TracChangeset for help on using the changeset viewer.