Changeset 11853 for trunk/admin/themes


Ignore:
Timestamp:
Jul 30, 2011, 6:49:02 AM (13 years ago)
Author:
rvelices
Message:

feature 2387: addd a filter by tag in the batch manager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/themes/default/template/batch_manager_global.tpl

    r11754 r11853  
    1212{footer_script require='jquery.tokeninput'}
    1313jQuery(document).ready(function() {ldelim}
     14        var tag_src = [{foreach from=$tags item=tag name=tags}{ldelim}name:"{$tag.name|@escape:'javascript'}",id:"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}];
    1415  jQuery("#tags").tokenInput(
    15     [{foreach from=$tags item=tag name=tags}{ldelim}"name":"{$tag.name|@escape:'javascript'}","id":"{$tag.id}"{rdelim}{if !$smarty.foreach.tags.last},{/if}{/foreach}],
     16    tag_src,
    1617    {ldelim}
    1718      hintText: '{'Type in a search term'|@translate}',
     
    2425    }
    2526  );
     27       
     28  jQuery("#tagsFilter").tokenInput(
     29    tag_src,
     30    {ldelim}
     31      hintText: '{'Type in a search term'|@translate}',
     32      noResultsText: '{'No results'|@translate}',
     33      searchingText: '{'Searching...'|@translate}',
     34      animateDropdown: false,
     35      preventDuplicates: true,
     36      allowCreation: false
     37    }
     38  );
     39
    2640});
    2741{/footer_script}
     
    467481        <label><input type="checkbox" name="filter_category_recursive" {if isset($filter.category_recursive)}checked="checked"{/if}> {'include child albums'|@translate}</label>
    468482      </li>
     483                        <li id="filter_tags" {if !isset($filter.tags)}style="display:none"{/if}>
     484                                <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
     485                                <input type="checkbox" name="filter_tags_use" class="useFilterCheckbox" {if isset($filter.tags)}checked="checked"{/if}>
     486                                {'Tags'|@translate}
     487                                <select id="tagsFilter" name="filter_tags">
     488                                        {foreach from=$filter_tags item=tag}
     489                                        <option value="{$tag.id}">{$tag.name}</option>
     490                                        {/foreach}
     491                                </select>
     492                        </li>
    469493      <li id="filter_level" {if !isset($filter.level)}style="display:none"{/if}>
    470494        <a href="#" class="removeFilter" title="remove this filter"><span>[x]</span></a>
     
    483507        <option value="filter_prefilter">{'predefined filter'|@translate}</option>
    484508        <option value="filter_category">{'album'|@translate}</option>
     509                                <option value="filter_tags">{'Tags'|@translate}</option>
    485510        <option value="filter_level">{'Who can see these photos?'|@translate}</option>
    486511      </select>
Note: See TracChangeset for help on using the changeset viewer.